public static void PopulateStringListEditor(string title, string listCaption, TextBox textBox, bool browseForDirectoty) { var stringListDialog = new StringListEditorDialog(); stringListDialog.TitleText = title; stringListDialog.ListCaption = listCaption; stringListDialog.ShowBrowse = browseForDirectoty; string[] strings = textBox.Text.Split(';'); stringListDialog.LoadList(strings); stringListDialog.ShowDialog(); if (stringListDialog.DialogResult ?? false) { textBox.Text = String.Join(";", stringListDialog.GetList()); } }
public void Event(object source, EventArgs evt) { using (StringListEditorDialog editor = new StringListEditorDialog()) { string[] strings = sourceControl.Text.Split(';'); editor.BrowseForDirectory = true; editor.ListCaption = listCaption; editor.TitleText = editor.TitleText = StringParser.Parse("${res:Dialog.ExportProjectToHtml.FolderLabel}"); editor.LoadList(strings); if (editor.ShowDialog() == DialogResult.OK) { strings = editor.GetList(); sourceControl.Text = string.Join(";", strings); } } }
public void Event(object source, EventArgs evt) { using (StringListEditorDialog editor = new StringListEditorDialog()) { string[] strings = sourceControl.Text.Split(';'); editor.BrowseForDirectory = ShowBrowseButton; editor.ListCaption = listCaption; if (TitleText != null) { editor.TitleText = TitleText; } editor.LoadList(strings); if (editor.ShowDialog() == DialogResult.OK) { strings = editor.GetList(); sourceControl.Text = string.Join(";", strings); } } }