-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFormFilter.cs
61 lines (51 loc) · 1.66 KB
/
FormFilter.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
using System.Windows.Forms;
namespace UM_Monitor
{
public partial class FormFilter : Form
{
FilterConfig fc;
public FormFilter()
{
InitializeComponent();
}
public FormFilter(FilterConfig fc)
: this()
{
this.fc = fc;
switch (fc.mode)
{
case FilterConfig.FcMode.fromto:
this.radioButton3.Checked = true;
break;
case FilterConfig.FcMode.lastxseconds:
this.radioButton2.Checked = true;
break;
default:
this.radioButton1.Checked = true;
break;
}
this.numericUpDown1.Value = fc.seconds;
this.dateTimePicker1 = fc.dtmin;
this.dateTimePicker1 = fc.dtmax;
}
private void numericUpDown1_ValueChanged(object sender, System.EventArgs e)
{
this.fc.seconds = (int)this.numericUpDown1.Value;
}
private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
{
if (this.radioButton1.Checked)
this.fc.mode = FilterConfig.FcMode.all;
}
private void radioButton2_CheckedChanged(object sender, System.EventArgs e)
{
if (this.radioButton2.Checked)
this.fc.mode = FilterConfig.FcMode.lastxseconds;
}
private void radioButton3_CheckedChanged(object sender, System.EventArgs e)
{
if (this.radioButton3.Checked)
this.fc.mode = FilterConfig.FcMode.fromto;
}
}
}