public static string SelectDiagramToOpen() { var selector = new DiagramOpenDialog() { Text = "Choose a diagram to open" }; return(ShowDialogCore(selector)); }
protected static string ShowDialogCore(DiagramOpenDialog dialog) { dialog.ShowDialog(); return(dialog.DialogResult == DialogResult.OK ? dialog.SelectedItem : null); }