forked from yhuse/SunnyUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFCheckBox.cs
48 lines (41 loc) · 1.37 KB
/
FCheckBox.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
using System;
using System.Collections.Generic;
using System.Text;
namespace Sunny.UI.Demo
{
public partial class FCheckBox : UITitlePage
{
public FCheckBox()
{
InitializeComponent();
uiCheckBoxGroup1.SelectedIndexes = new List<int>() { 2, 4 };
}
private void uiCheckBoxGroup1_ValueChanged(object sender, int index, string text, bool isChecked)
{
StringBuilder sb = new StringBuilder();
sb.Append("SelectedIndexes: ");
foreach (var selectedIndex in uiCheckBoxGroup1.SelectedIndexes)
{
sb.Append(selectedIndex);
sb.Append(", ");
}
Console.WriteLine("SelectedIndex: " + index + ", SelectedText: " + text + "\n" + sb.ToString());
}
private void uiButton1_Click(object sender, System.EventArgs e)
{
uiCheckBoxGroup1.SelectAll();
}
private void uiButton2_Click(object sender, System.EventArgs e)
{
uiCheckBoxGroup1.UnSelectAll();
}
private void uiButton3_Click(object sender, System.EventArgs e)
{
uiCheckBoxGroup1.ReverseSelected();
}
private void uiButton4_Click(object sender, EventArgs e)
{
uiCheckBoxGroup1.SelectedIndexes = new List<int>() { 2, 4 };
}
}
}