-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBatchForm.cs
More file actions
86 lines (75 loc) · 2.51 KB
/
BatchForm.cs
File metadata and controls
86 lines (75 loc) · 2.51 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
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
namespace Numeric_List_Generator
{
/// <summary>
///
/// </summary>
public partial class BatchForm : Form
{
/// <summary>
///
/// </summary>
public BatchForm()
{
InitializeComponent();
}
/// <summary>
/// Set a specific text to the status bar
/// </summary>
/// <param name="text">text with some information</param>
private void SetStatusBar(string text)
{
toolStripStatusLabelInformation.Enabled = !string.IsNullOrEmpty(value: text);
toolStripStatusLabelInformation.Text = text;
}
private void BatchForm_Load(object sender, EventArgs e) => SetStatusBar(text: string.Empty);
/// <summary>
/// Detect the accessibility description to set as information text in the status bar
/// </summary>
/// <param name="sender">object sender</param>
/// <param name="e">event arguments</param>
/// <remarks>The parameter <paramref name="e"/> is not needed, but must be indicated.</remarks>
private void SetStatusBar_Enter(object sender, EventArgs e)
{
// Set the status bar text based on the sender's accessible description
switch (sender)
{
// If the sender is a control with an accessible description, set the status bar text
// If the sender is a ToolStripItem with an accessible description, set the status bar text
case Control { AccessibleDescription: not null } control:
SetStatusBar(text: control.AccessibleDescription);
break;
case ToolStripItem { AccessibleDescription: not null } item:
SetStatusBar(text: item.AccessibleDescription);
break;
}
}
/// <summary>
/// Clear the information text of the status bar
/// </summary>
/// <param name="sender">object sender</param>
/// <param name="e">event arguments</param>
/// <remarks>The parameters <paramref name="e"/> and <paramref name="sender"/> are not needed, but must be indicated.</remarks>
private void ClearStatusBar_Leave(object sender, EventArgs e) => SetStatusBar(text: string.Empty);
private void ButtonAddToList_Click(object sender, EventArgs e)
{
}
private void ButtonUndo_Click(object sender, EventArgs e)
{
}
private void ButtonRedo_Click(object sender, EventArgs e)
{
}
private void ButtonCreateList_Click(object sender, EventArgs e)
{
}
private void ButtonDeleteList_Click(object sender, EventArgs e)
{
}
private void ButtonCopyList_Click(object sender, EventArgs e)
{
}
private void ButtonSaveList_Click(object sender, EventArgs e)
{
}
}
}