-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrm_Main.cs
104 lines (90 loc) · 2.88 KB
/
Frm_Main.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ProjectManagementSystem
{
public partial class Frm_Main : Form
{
bool _sidebarrExpanded = true;
bool _isContainerExpanded = false;
bool _isProfilePanelExpanded = false;
public Frm_Main()
{
InitializeComponent();
}
private void btnMenu_Click(object sender, EventArgs e)
{
SideBarTimer.Start();
}
private void SideBarTimer_Tick(object sender, EventArgs e)
{
if (_sidebarrExpanded)
{
Sidebar.Width -= 10;
Pages.Width += 10;
if (Sidebar.Width == Sidebar.MinimumSize.Width)
{
_sidebarrExpanded = false;
SideBarTimer.Stop();
}
}
else
{
Sidebar.Width += 10;
Pages.Width-=10;
if (Sidebar.Width == Sidebar.MaximumSize.Width)
{
_sidebarrExpanded = true;
SideBarTimer.Stop();
}
}
}
private void btnProfile_Click(object sender, EventArgs e)
{
ProfileTimer.Start();
}
private void ProfileTimer_Tick(object sender, EventArgs e)
{
if (_isProfilePanelExpanded)
{
UserPanel.Height -= 10;
if (UserPanel.Height == UserPanel.MinimumSize.Height)
{
_isProfilePanelExpanded = false;
ProfileTimer.Stop();
}
}
else
{
UserPanel.Height += 10;
if (UserPanel.Height == UserPanel.MaximumSize.Height)
{
_isProfilePanelExpanded = true;
ProfileTimer.Stop();
}
}
}
private void lblProjectName_Click(object sender, EventArgs e)
{
Pages.SelectTab(tabDashboard);
}
private void Frm_Main_Load(object sender, EventArgs e)
{
//this.Size = Screen.PrimaryScreen.WorkingArea.Size;
//this.Location = new Point(0, 0);
// TODO: This line of code loads data into the 'projectManagementSystemDataSet.tbl_Project' table. You can move, or remove it, as needed.
this.tbl_ProjectTableAdapter.Fill(this.projectManagementSystemDataSet.tbl_Project);
}
private void btnAddProject_Click(object sender, EventArgs e)
{
var addProjects = new AddProject();
addProjects.Show(this);
}
}
}