Example #1
0
 public void LoadFromXml(XmlElement xml)
 {
     Root = new AppTreeTplNode();
     Root.LoadFromXml(xml.FindElement("Tree"));
     if (xml.FindElement("Database") != null)
     {
         Database = (IDatabaseSource)DatabaseSourceAddonType.Instance.LoadAddon(xml.FindElement("Database"));
     }
 }
Example #2
0
        public void AddChild()
        {
            string name = InputBox.Run("s_name_of_new_child", "newnode");

            if (name != null)
            {
                var node = new AppTreeTplNode(this);
                node.m_title = name;
                m_children.Add(node);
                this.CompleteRefresh();
            }
        }
Example #3
0
 public void LoadFromXml(XmlElement xml)
 {
     if (xml.HasAttribute("title"))
     {
         m_title = xml.GetAttribute("title");
     }
     foreach (XmlElement chx in xml.SelectNodes("Node"))
     {
         var node = new AppTreeTplNode(this);
         node.LoadFromXml(chx);
         m_children.Add(node);
     }
     foreach (XmlElement chx in xml.SelectNodes("Page"))
     {
         var pg = new AppPage();
         pg.LoadFromXml(chx);
         Pages.Add(pg);
     }
     if (xml.FindElement("Icon") != null)
     {
         m_icon = IOTool.ImageFromText(xml.FindElement("Icon").InnerText);
     }
 }
Example #4
0
 public AppInstanceTreeNode(ITreeNode parent, AppTreeTplNode tpl)
     : base(parent, tpl.Title)
 {
     m_tpl = tpl;
 }