public DemoGuiListData SearchChildList(SearchListData sKey,DemoGuiListData parent) { DemoGuiListData tmp = parent.child; while (tmp != null) { if(tmp.key.key==sKey.key){ return tmp; } tmp = tmp.next; } return null; }
public DemoGuiListData AddList(SearchListData key,Label lb,PictureBox pic) { DemoGuiListData tmp = new DemoGuiListData(); tmp.key = key; tmp.lb = lb; tmp.bx = pic; if (root == null) { root = tmp; } else { DemoGuiListData t = root; while (t.next != null) { t = t.next; } t.next = tmp; } return tmp; }
public DemoGuiListData AddChildList(SearchListData key, Label lb, PictureBox pic,DemoGuiListData parent) { DemoGuiListData tmp = new DemoGuiListData(); tmp.key = key; tmp.lb = lb; tmp.bx = pic; if (parent.child == null) { parent.child = tmp; } else { DemoGuiListData d = parent.child; while (d.next!=null) { d = d.next; } d.next = tmp; } return tmp; }
//DemoGuiListData curr; public DemoGuiList() { root = null; //curr = null; }
public DemoGuiListData() { this.key = null; this.next = null; this.parent = null; this.child = null; this.lb = null; this.bx = null; }