-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf_message.cs
116 lines (107 loc) · 3.5 KB
/
f_message.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
using System;
using System.Windows.Forms;
namespace Aiche_Bois
{
public partial class f_message : Form
{
public String Message = "";
String Title = "";
bool OK;
bool Yes;
bool No;
FontAwesome.Sharp.IconChar icon;
/// <summary>
/// COnstructor:: by default
/// </summary>
public f_message()
{
InitializeComponent();
}
/// <summary>
/// Constructor:: String Message, bool OK
/// </summary>
/// <param name="Message"></param>
/// <param name="OK"></param>
public f_message(String Message, bool OK)
{
this.Message = Message;
this.OK = OK;
InitializeComponent();
}
/// <summary>
/// Constructor:: String Message, String Title, bool OK
/// </summary>
/// <param name="Message"></param>
/// <param name="Title"></param>
/// <param name="OK"></param>
public f_message(String Message, String Title, bool OK)
{
this.Title = Title;
this.Message = Message;
this.OK = OK;
InitializeComponent();
}
/// <summary>
/// Constructor:: String Message, String Title, bool OK, FontAwesome.Sharp.IconChar icon
/// </summary>
/// <param name="Message"></param>
/// <param name="Title"></param>
/// <param name="OK"></param>
/// <param name="icon"></param>
public f_message(String Message, String Title, bool OK, FontAwesome.Sharp.IconChar icon)
{
this.Title = Title;
this.Message = Message;
this.OK = OK;
this.icon = icon;
InitializeComponent();
}
/// <summary>
/// Constructor:: String Message, String Title, bool Yes, bool No, FontAwesome.Sharp.IconChar icon
/// </summary>
/// <param name="Message"></param>
/// <param name="Title"></param>
/// <param name="Yes"></param>
/// <param name="No"></param>
/// <param name="icon"></param>
public f_message(String Message, String Title, bool Yes, bool No, FontAwesome.Sharp.IconChar icon)
{
this.Title = Title;
this.Message = Message;
this.No = No;
this.Yes = Yes;
this.icon = icon;
InitializeComponent();
}
/// <summary>
/// on the load event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void FormShowFacture_Load(object sender, EventArgs e)
{
if (icon == FontAwesome.Sharp.IconChar.Ban)
{
i_message.IconColor = System.Drawing.Color.FromArgb(217, 15, 70);
}
else if (icon == FontAwesome.Sharp.IconChar.ExclamationTriangle)
{
i_message.IconColor = System.Drawing.Color.FromArgb(240, 205, 01);
}
else if (icon == FontAwesome.Sharp.IconChar.CheckCircle)
{
i_message.IconColor = System.Drawing.Color.FromArgb(11, 244, 132);
}
else
{
i_message.IconColor = System.Drawing.Color.White;
}
l_show_message.Text = Message;
this.Text = Title;
b_ok.Visible = OK;
b_yes.Visible = No;
b_no.Visible = Yes;
i_message.IconChar = icon;
}
}
}