public override void Load(System.Xml.XmlNode Node) { base.Load(Node); StringList.Clear(); foreach (System.Xml.XmlNode ChildNode in Node.ChildNodes) { if (ChildNode.Name.ToUpper() == "CHOICE") { string Name; string Text = GetValue(ChildNode); string File = null; string ID = ""; foreach (System.Xml.XmlAttribute attr in ChildNode.Attributes) { Name = attr.Name.ToUpper(); if (Name == "TEXT") { Text = attr.InnerText; } else if (Name == "FILE") { File = attr.InnerText; } else if (Name == "ID") { ID = attr.InnerText; } } if (File != null && File != "") { // TODO : Finish this. Help.FileArrayManager file = Help.FileArrayManager.Create(File); if (file.Exists == false) { return; } foreach (FuzzyData.FuzzyObject obj in file.Value.Data) { object id = Help.PathHelper.LoadChild(obj, ID); int OwnID = -1; if (id is int) { OwnID = Convert.ToInt32(id); } else if (id is FuzzyData.FuzzyFixnum) { OwnID = Convert.ToInt32((id as FuzzyData.FuzzyFixnum).Value); } StringList[OwnID] = new Help.TextManager(Text, obj); } } else { int id = GetInt(ID); StringList[id] = new Help.TextManager(Text); } } } }
public override void Pull() { if (base.Value == null || model == null || Binding == null) { return; } FuzzyArray arr = base.Value as FuzzyArray; Prototype.ProtoFullListBox origin = Binding as Prototype.ProtoFullListBox; if (arr == null || arr == null) { return; } Prototype.ProtoLeftListBox lb = origin.ListBox; Link.Clear(); TextManager.Clear(); lb.Items.Clear(); int i = -1, j = 0; foreach (object Child in arr) { i++; if (Child == null || Child is FuzzyNil) { continue; } FuzzyObject child = Child as FuzzyObject; if (child == null) { continue; } Help.TextManager text = new Help.TextManager(model, child); lb.Items.Add(text); Link.Add(i, j++); } base.Pull(); Help.TaintRecord.Multi[arr] = Taint; }