예제 #1
0
 private void worker_OnInitComplete()
 {
     foreach (HeroDefinition definition in GOM.Instance.Definitions.Values)
     {
         HeroNodeDef node = definition as HeroNodeDef;
         if (node != null)
         {
             string[]      strArray  = node.Name.Split(new char[] { '.' });
             TreeDirectory directory = this.directory;
             for (int i = 0; i < (strArray.Length - 1); i++)
             {
                 if (!directory.Folders.ContainsKey(strArray[i]))
                 {
                     directory.Folders[strArray[i]] = new TreeDirectory(strArray[i]);
                 }
                 directory = directory.Folders[strArray[i]];
             }
             directory.Folders[strArray[strArray.Length - 1]] = new TreeDirectory(strArray[strArray.Length - 1], node);
         }
     }
     if (base.InvokeRequired)
     {
         base.Invoke(new Worker.InitCompleteHandler(this.worker_OnInitComplete));
     }
     else
     {
         this.treeViewNodes.Nodes.AddRange(this.directory.Children);
     }
 }
예제 #2
0
 public FormMain()
 {
     this.InitializeComponent();
     this.directory = new TreeDirectory(null);
     this.logViewControl1.Log = Log.Instance;
     this.worker = new Worker();
     this.worker.OnInitComplete += new Worker.InitCompleteHandler(this.worker_OnInitComplete);
     ImageList list = new ImageList();
     list.Images.Add(new Bitmap(8, 8));
     this.listViewVariables.SmallImageList = list;
 }
예제 #3
0
        public FormMain()
        {
            this.InitializeComponent();
            this.directory           = new TreeDirectory(null);
            this.logViewControl1.Log = Log.Instance;
            this.worker = new Worker();
            this.worker.OnInitComplete += new Worker.InitCompleteHandler(this.worker_OnInitComplete);
            ImageList list = new ImageList();

            list.Images.Add(new Bitmap(8, 8));
            this.listViewVariables.SmallImageList = list;
        }
예제 #4
0
 private void worker_OnInitComplete()
 {
     foreach (HeroDefinition definition in GOM.Instance.Definitions.Values)
     {
         HeroNodeDef node = definition as HeroNodeDef;
         if (node != null)
         {
             string[] strArray = node.Name.Split(new char[] { '.' });
             TreeDirectory directory = this.directory;
             for (int i = 0; i < (strArray.Length - 1); i++)
             {
                 if (!directory.Folders.ContainsKey(strArray[i]))
                 {
                     directory.Folders[strArray[i]] = new TreeDirectory(strArray[i]);
                 }
                 directory = directory.Folders[strArray[i]];
             }
             directory.Folders[strArray[strArray.Length - 1]] = new TreeDirectory(strArray[strArray.Length - 1], node);
         }
     }
     if (base.InvokeRequired)
     {
         base.Invoke(new Worker.InitCompleteHandler(this.worker_OnInitComplete));
     }
     else
     {
         this.treeViewNodes.Nodes.AddRange(this.directory.Children);
     }
 }