PIbd-31_Putincev.D.M._COP_29/COP/WinForms/Form1.cs

53 lines
1.8 KiB
C#
Raw Permalink Normal View History

2024-10-11 02:06:27 +04:00
using WinForms.TestClasses;
using PutincevLibrary;
2024-09-06 11:04:45 +04:00
namespace WinForms
{
2024-10-11 02:06:27 +04:00
public partial class Form1 : Form
{
List<User> users = new List<User>();
public Form1()
{
DateTime min = DateTime.Parse("2009-05-08");
DateTime max = DateTime.Today;
User user1 = new User("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
User user2 = new User("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
User user3 = new User("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
User user4 = new User("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD>");
User user5 = new User("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>.<2E>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
users.Add(user1);
users.Add(user2);
users.Add(user3);
users.Add(user4);
users.Add(user5);
InitializeComponent();
dateTimePickerControl.MaxValue = max;
dateTimePickerControl.MinValue = min;
treeViewControl.hierarchy = new List<(string, bool)> { ("Country", false), ("AccessLevel", false), ("FIO", false) };
foreach (User user in users)
{
treeViewControl.addItems(users);
}
}
private void buttonFillCheckedList_Click(object sender, EventArgs e)
{
List<string> list = new List<string>();
list.Add("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
list.Add("<22><><EFBFBD><EFBFBD>");
list.Add("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
list.Add("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
list.Add("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
checkedListBoxControl.SetCheckedListBoxValues(list);
checkedListBoxControl.CheckedItem = list[2];
}
private void buttonClearList_Click(object sender, EventArgs e)
{
checkedListBoxControl.ClearCheckedListBoxValues();
}
}
2024-09-06 11:04:45 +04:00
}