-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathProgram.cs
46 lines (41 loc) · 1.23 KB
/
Program.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
using Chapter05.Components;
using Chapter05.Containers;
using Chapter05.Persistence;
namespace Chapter05;
internal class Program
{
static void Main()
{
var csvSaver = new CsvPersistence();
// var dbSaver = new DbPersistence();
Form mainForm = new(csvSaver);
Button btnSave = new(101, "btnSave", (0, 100))
{
Text = "Save"
};
Button btnClose = new(102, "btnClose", (0, 500))
{
Text = "Close"
};
CheckBox chkIsActiveProfile = new(104, "chkIsActive", (0, 10))
{
Text = "Is Active Profile",
IsChecked = true
};
Label lblTitle = new(106, "lblTitle", (50, 50))
{
Text = "Title"
};
LinkButton lnkAbout = new(204, "lnkAbout", (400, 50))
{
Url = new Uri("https://www.azon.com.tr/about")
};
DbConnector dbConnector = new(90, "dbConnector", (0, 0))
{
ConnectionString = "data source=localhost:database=Northwind;integrated security=sspi"
};
mainForm.AddControls(btnSave, btnClose, lblTitle, lnkAbout, chkIsActiveProfile, dbConnector);
mainForm.DrawAll();
mainForm.Save();
}
}