private void OnOutputFoldersButtonClick(object sender, ButtonPressedEventArgs e) { var outputFolder = (OutputFolder)gridViewOutputFolders.GetFocusedRow(); switch (e.Button.Index) { case 0: using (var dialog = new FolderBrowserDialogEx()) { dialog.ShowEditBox = true; dialog.ShowFullPathInEditBox = true; dialog.SelectedPath = outputFolder.Path; if (dialog.ShowDialog(this) != DialogResult.OK) { return; } outputFolder.Path = dialog.SelectedPath; gridViewOutputFolders.CloseEditor(); LoadOutputFolders(); } break; case 1: if (PopupMessageHelper.Instance.ShowWarningQuestion("Are you sure want to delete path?") == DialogResult.Yes) { AppManager.Instance.AppSettings.OutputFolders.Remove(outputFolder); LoadOutputFolders(); } break; } }
public static FolderBrowserDialogEx ComputerBrowser() { FolderBrowserDialogEx x = new FolderBrowserDialogEx(); // avoid MBRO comppiler warning when passing _rootFolderLocation as a ref: x.BecomeComputerBrowser(); return(x); }