public TypeClass(int ID, string TypeName, string Description, TypeClass Parent) { this.id = ID; this.typeName = TypeName; this.description = Description; this.parent = Parent; }
private void Form1_Load(object sender, EventArgs e) { kellAdvertisingBar1.ListPageUrl = ConfigurationManager.AppSettings["ListPageUrl"]; kellAdvertisingBar1.MaxWebCount = int.Parse(ConfigurationManager.AppSettings["MaxWebCount"]); tf = new KellAdvertisingForm(); numericUpDown2.Value = kellPermissionEditor1.NameWidth; numericUpDown1.Value = kellPermissionEditor1.ItemWidth; TypeClass type = new TypeClass(1, "类型0", DateTime.Now.ToString(), null); List <TypeClass> types = new List <TypeClass>(); TypeClass type1 = new TypeClass(2, "类型1", DateTime.Now.ToString(), type); TypeClass type2 = new TypeClass(3, "类型2", DateTime.Now.ToString(), type); TypeClass type3 = new TypeClass(4, "类型3", DateTime.Now.ToString(), type); TypeClass type4 = new TypeClass(5, "类型4", DateTime.Now.ToString(), type2); TypeClass type5 = new TypeClass(6, "类型5", DateTime.Now.ToString(), type2); types.Add(type1); types.Add(type2); types.Add(type3); types.Add(type4); types.Add(type5); TypeNode node = new TypeNode(type, types); kellLinkComboBox1.Node = node; int year = DateTime.Today.Year; int month = DateTime.Today.Month; int day = DateTime.Today.Day - 1; List <KellCalendarEx.LinkObject> links = new List <KellCalendarEx.LinkObject>(); KellCalendarEx.LinkObject link = new KellCalendarEx.LinkObject("故障信息", Color.Red, true, null, new Action <string>(ShowErr), this, new object[] { "过车时出现故障,故障代码[1002]" }); KellCalendarEx.LinkObject link2 = new KellCalendarEx.LinkObject("提醒信息", Color.Blue, true, null, new Action <string>(ShowErr), this, new object[] { "过车时缓慢,速度为10km/h" }); links.Add(link); links.Add(link2); kellCalendarEx1.AddLinkMsg(year, month, day, links); kellCalendarEx1.MonthChanged += KellCalendarEx1_MonthChanged; }
public TypeNode(TypeClass type, List <TypeClass> types) : base() { this.type = type; this.types = types; }