예제 #1
0
 private void BrowseButtonClick(object sender, EventArgs e)
 {
     FolderDialog dialog = new FolderDialog();
     if (dialog.DisplayDialog("Select folder") == DialogResult.OK)
     {
         string path = dialog.Path;
         if (!(path.EndsWith(@"\") || path.EndsWith("/")))
         {
             path = path + @"\";
         }
         this.editTextBox.Text = path;
     }
 }
 public void Event(object sender, EventArgs e)
 {
     FolderDialog dialog = new FolderDialog();
     if (dialog.DisplayDialog(this.description) == DialogResult.OK)
     {
         string path = dialog.Path;
         if (this.panel.baseDirectory != null)
         {
             path = FileUtility.GetRelativePath(this.panel.baseDirectory, path);
         }
         if (!(path.EndsWith(@"\") || path.EndsWith("/")))
         {
             path = path + @"\";
         }
         this.panel.ControlDictionary[this.target].Text = path;
     }
 }