Exemplo n.º 1
0
 private void btnOpen_Click(object sender, EventArgs e)
 {
     OpenDirectoryDialogFix dialog = new OpenDirectoryDialogFix();
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         this.textBox1.Text = dialog.method_0();
     }
 }
Exemplo n.º 2
0
 private void btnOpenDirectory_Click(object sender, EventArgs e)
 {
     if (!this.bool_0 || (MessageBox.Show("当前所做的修改还没有保存,如果继续,那么所做的修改将会丢失,确定还要继续吗?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.No))
     {
         OpenDirectoryDialogFix dialog = new OpenDirectoryDialogFix();
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.fileSystemWatcher_0.EnableRaisingEvents = false;
             string str = dialog.method_0();
             this.treeView1.BeginUpdate();
             this.treeView1.Nodes.Clear();
             try
             {
                 this.method_3(str);
                 this.labCurrentPath.Text = str;
                 RegistryHelper.SetValue("XmlCommandFilePath", str);
                 this.string_0 = str;
                 this.bool_0 = false;
                 this.list_0.Clear();
                 this.txtSQL.SetText(string.Empty);
                 this.txtXML.SetText(string.Empty);
                 this.method_0();
                 this.treeView1.Focus();
                 this.fileChangedDialog_0.method_2();
                 this.fileSystemWatcher_0.Path = str;
                 this.fileSystemWatcher_0.EnableRaisingEvents = true;
             }
             catch (Exception exception)
             {
                 MessageBox.Show(exception.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand);
             }
             finally
             {
                 this.treeView1.EndUpdate();
             }
         }
     }
 }