37 lines
1.2 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|