-
Notifications
You must be signed in to change notification settings - Fork 0
/
Screen.cs
76 lines (65 loc) · 2.09 KB
/
Screen.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
using System;
using System.Drawing;
using System.Windows.Forms;
namespace KanbanSystem
{
public partial class Screen : Form
{
#region Variaveis
Button task;
public static int taskState = 0;
public static bool removeTask = false;
#endregion
public Screen()
{
InitializeComponent();
}
private void btn_newTask_Click(object sender, EventArgs e)
{
task = new Button();
new TaskName().ShowDialog();
task.Text = TaskName.name;
task.Size = new Size(247, 42);
task.Click += Task_Click;
flp_ToDo.Controls.Add(task);
}
private void Task_Click(object sender, EventArgs e)
{
var button = (Button)sender;
new TaskMenu().ShowDialog();
button.Name = "btn_" + task.Text;
if (taskState == 0)
flp_ToDo.Controls.Add(button);
else if (taskState == 1)
flp_Doing.Controls.Add(button);
else if (taskState == 2)
flp_Done.Controls.Add(button);
if (removeTask == true)
{
flp_ToDo.Controls.Remove(button);
flp_Doing.Controls.Remove(button);
flp_Done.Controls.Remove(button);
}
}
private void lbl_Title_Click(object sender, EventArgs e)
{
new BoardName().ShowDialog();
lbl_Title.Text = BoardName.name;
}
private void lbl_ToDo_Click(object sender, EventArgs e)
{
new ListName().ShowDialog();
lbl_ToDo.Text = ListName.name;
}
private void lbl_Doing_Click(object sender, EventArgs e)
{
new ListName().ShowDialog();
lbl_Doing.Text = ListName.name;
}
private void lbl_Done_Click(object sender, EventArgs e)
{
new ListName().ShowDialog();
lbl_Done.Text = ListName.name;
}
}
}