void BrowseClick(object sender, EventArgs e) { try { DialogResult Result = this.Browser.ShowDialog(); if (Result == DialogResult.OK) { CurrentDirectory = Browser.SelectedPath; PathBox.Clear(); PathBox.Paste(Browser.SelectedPath); } } catch (Exception E) { MessageBox.Show(E.Message); } }
void OnDragDrop(object sender, DragEventArgs e) { try { string[] FileDrop = (string[])e.Data.GetData(DataFormats.FileDrop); if (Directory.Exists(FileDrop[0])) { PathBox.Clear(); PathBox.Paste(FileDrop[0]); CurrentDirectory = FileDrop[0]; } } catch (Exception E) { MessageBox.Show(E.Message); } }
void ContextClick(object sender, ToolStripItemClickedEventArgs e) { PathBox.Clear(); PathBox.Paste(e.ClickedItem.Text); CurrentDirectory = e.ClickedItem.Text; }