Beispiel #1
0
 private void btnFindCommand_Click(object sender, EventArgs e)
 {
     InputNameDialogFix dialog = new InputNameDialogFix();
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         string strB = dialog.method_0();
         foreach (TreeNode node2 in this.treeView1.Nodes)
         {
             IEnumerator enumerator2 = node2.Nodes.GetEnumerator();
             {
                 TreeNode current;
                 while (enumerator2.MoveNext())
                 {
                     current = (TreeNode) enumerator2.Current;
                     if (string.Compare(current.Text, strB, StringComparison.OrdinalIgnoreCase) == 0)
                     {
                         goto Label_0079;
                     }
                 }
                 continue;
             Label_0079:
                 this.treeView1.SelectedNode = current;
                 current.EnsureVisible();
                 return;
             }
         }
         MessageBox.Show("指定的命令名称不存在。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Beispiel #2
0
 private void btnAddFile_Click(object sender, EventArgs e)
 {
     InputNameDialogFix dialog = new InputNameDialogFix();
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         TreeNode node = new TreeNode(dialog.method_0(), int_0, int_1);
         this.treeView1.Nodes.Add(node);
         this.treeView1.SelectedNode = node;
         node.EnsureVisible();
         this.method_1();
     }
 }