-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfirmationDialog.cs
53 lines (45 loc) · 1.29 KB
/
ConfirmationDialog.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Windows.Forms;
using System.Drawing;
namespace Instagram
{
public partial class ConfirmationDialog : DraggableForm
{
bool lightModeOn = false;
public ConfirmationDialog(bool lightModeOn, string actionToBePerformed)
{
this.lightModeOn = lightModeOn;
InitializeComponent();
Configure_Theme();
this.actionLabel.Text += actionToBePerformed;
}
private void Configure_Theme()
{
Color backColor, textColor;
if (lightModeOn)
{
backColor = Color.FromArgb(209, 209, 209);
textColor = Color.FromArgb(0, 0, 0);
}
else
{
backColor = Color.FromArgb(31, 31, 31);
textColor = Color.FromArgb(255, 255, 255);
}
this.BackColor = backColor;
}
private void confirm_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
private void cancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void lbl_Name_Click(object sender, EventArgs e)
{
}
}
}