コード例 #1
0
 /// <summary>
 /// Loads the config file.
 /// </summary>
 private void LoadConfigFile()
 {
     var file = string.Format("{0}\\{1}", Application.StartupPath, this._configFile);
     var xml = new XmlDocument();
     xml.Load(file);
     var nodeList = xml.ChildNodes;
     if (nodeList.Count < 2) throw new Exception(string.Format("MenuFile is invalid format. [ File Name: {0}]", this._configFile));
     this._rootItem = new TopMenuItem(nodeList[1]);
 }
コード例 #2
0
 /// <summary>
 /// Bindings the menu item. 
 /// </summary>
 /// <param name="cntrl">The CNTRL.</param>
 /// <param name="item">The item.</param>
 public void BindingMenuItem(Control cntrl, TopMenuItem item)
 {
 }
コード例 #3
0
 private void GetNote(TreeNode node, TopMenuItem item) {
     if (item == null) return;
     if (item.Childs.Count == 0) return;
     foreach (var child in item.Childs) {
         var childNode = new TreeNode(child.Name);
         childNode.Name = child.Key;
         GetNote(childNode, child);
         node.Nodes.Add(childNode);
     }
 }