PIbd-31_Afanasev.S.S._COP_5/Component/Forms/Form1.cs
2024-10-04 00:24:05 +04:00

37 lines
1.2 KiB
C#

using ComponentProgramming;
using ComponentProgramming.Classes;
namespace Forms
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
userCheckedListBox1.AddToList("Item 1");
userCheckedListBox1.AddToList("Item 2");
userCheckedListBox1.AddToList("Item 3");
userTextBox1.MinValue = 5;
userTextBox1.MaxValue = 15;
var hierarchy = new List<string> { "Age", "Name", "FullName" };
var forcedNewBranch = new Dictionary<string, bool> { { "FullName", true } };
userTreeView1.SetHierarchy(hierarchy);
var characters = new List<Character>() {
new Character { Age = "ghgh", Name = "Warrior", FullName = "Gimli" },
new Character { Age = "hghg", Name = "Archer", FullName = "Legolas" },
new Character { Age = "ghg", Name = "Ranger", FullName = "Aragorn" },
new Character { Age = "hh", Name = "Paladin", FullName = "Boromir" }
};
foreach (var character in characters)
{
userTreeView1.AddObjectToTree(character);
}
}
}
}