-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUICreator.cs
More file actions
41 lines (38 loc) · 1.54 KB
/
UICreator.cs
File metadata and controls
41 lines (38 loc) · 1.54 KB
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
namespace VideoAudioTransfer
{
public class UICreator
{
public static TextBox CreateTextBox(int sizew, int sizeh, int posx, int posy)
{
TextBox textBox = new TextBox();
textBox.Text = "Selected File...";
textBox.Size = new System.Drawing.Size(sizew, sizeh);
textBox.Location = new System.Drawing.Point(posx, posy);
textBox.ReadOnly = true;
textBox.BorderStyle = BorderStyle.None;
textBox.BackColor = System.Drawing.Color.White;
textBox.ForeColor = System.Drawing.Color.DarkGray;
textBox.TabStop = false;
textBox.BorderStyle = BorderStyle.FixedSingle;
return textBox;
}
public static Panel CreatePanel(int sizew, int sizeh, int posx, int posy)
{
Panel panel = new Panel();
panel.Size = new System.Drawing.Size(sizew, sizeh);
panel.Location = new System.Drawing.Point(posx, posy);
panel.BackColor = System.Drawing.Color.LightGray;
return panel;
}
public static PictureBox CreatePictureBox(int sizew, int sizeh, int posx, int posy)
{
PictureBox picBox = new PictureBox();
picBox.Size = new System.Drawing.Size(sizew, sizeh);
picBox.Location = new System.Drawing.Point(posx, posy);
picBox.BackColor = System.Drawing.Color.White;
picBox.BorderStyle = BorderStyle.FixedSingle;
picBox.AllowDrop = true;
return picBox;
}
}
}