-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathFormMain.cs
58 lines (50 loc) · 1.83 KB
/
FormMain.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
using System;
using System.Drawing;
using System.Windows.Forms;
using Sample_OOP_Pro.Forms;
namespace Sample_OOP_Pro
{
public partial class FormMain : Form
{
Config config = new Config();
public Button[] menu;
public FormMain()
{
InitializeComponent();
this.menu = new Button[]{ btnDashboard, btnDataGridView, btnInputs, btnProfile, btnLogout};
}
private void btnDashboard_Click(object sender, EventArgs e)
{
config.ui.FormShow(new FormDashboard(), "Fill");
config.ui.active("FormDashboard", btnDashboard, Color.Blue, menu, Color.Gray);
}
private void btnDataGridView_Click(object sender, EventArgs e)
{
config.ui.FormShow(new FormDataGridView(), "Fill");
config.ui.active("FormDataGridView", btnDataGridView, Color.Blue, menu, Color.Gray);
}
private void btnInputs_Click(object sender, EventArgs e)
{
config.ui.FormShow(new FormInputs(), "Fill");
config.ui.active("FormInputs", btnInputs, Color.Blue, menu, Color.Gray);
}
private void btnLogout_Click(object sender, EventArgs e)
{
config.ui.Show(new FormLogin(), this);
}
private void lblExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void btnProfile_Click(object sender, EventArgs e)
{
config.ui.FormShow(new FormUpload(), "Fill");
config.ui.active("FormUpload", btnProfile, Color.Blue, menu, Color.Gray);
}
private void FormMain_Load(object sender, EventArgs e)
{
config.ui.FormShow(new FormDashboard(), "Fill");
config.ui.active("FormDashboard", btnDashboard, Color.Blue, menu, Color.Gray);
}
}
}