private object ProcessDialog(object value, IWindowsFormsEditorService editorService) { GumpArtSelectorDialog dialog = new GumpArtSelectorDialog(); dialog.Index = Convert.ToInt32(value); if (editorService.ShowDialog(dialog) == DialogResult.OK) { if (!Ultima.Gumps.IsValidIndex(dialog.Index)) { MessageBox.Show("You may not select invalid images.", "RunUO: GDK"); dialog.Dispose(); return ProcessDialog(value, editorService); } returnValue = dialog.Index; return returnValue; } return value; }
private object ProcessDialog(object value, IWindowsFormsEditorService editorService) { GumpArtSelectorDialog dialog = new GumpArtSelectorDialog(); dialog.Index = Convert.ToInt32(value); if (editorService.ShowDialog(dialog) == DialogResult.OK) { if (!Ultima.Gumps.IsValidIndex(dialog.Index)) { MessageBox.Show("You may not select invalid images.", "RunUO: GDK"); dialog.Dispose(); return(ProcessDialog(value, editorService)); } returnValue = dialog.Index; return(returnValue); } return(value); }