public static DialogResult ShowDialog(string dialogCaption, string caption, ref string value) { InputDialog inputDlg = new InputDialog(); inputDlg.Text = dialogCaption; inputDlg.lblInput.Text = caption; inputDlg.edtInput.Text = value; DialogResult result = inputDlg.ShowDialog(); if (result == DialogResult.OK) { value = inputDlg.edtInput.Text; } return(result); }
private void RenameList( ) { CodeCompletionList selList = lbLists.SelectedItem as CodeCompletionList; if (selList == null) { return; } string name = String.Empty; if (InputDialog.ShowDialog("Rename List", "Name", ref name) != DialogResult.OK) { return; } selList.Name = name; _isModified = true; }
public static DialogResult ShowDialog(string caption, ref string value) { return(InputDialog.ShowDialog("Input Dialog", caption, ref value)); }