public override IMapsDirectlyToDatabaseTable SelectOne(string prompt, IMapsDirectlyToDatabaseTable[] availableObjects, string initialSearchText = null, bool allowAutoSelect = false) { var dlg = new ConsoleGuiSelectOne(CoreChildProvider, availableObjects); if (dlg.ShowDialog()) { return(dlg.Selected); } return(null); }
private void OpenTree() { try { var dlg = new ConsoleGuiSelectOne(_activator.CoreChildProvider); if (dlg.ShowDialog()) { var edit = new ConsoleGuiTree(_activator, dlg.Selected); edit.ShowDialog(); } } catch (Exception e) { _activator.ShowException("Unexpected error in open/edit tree", e); } }
private void Find() { try { var dlg = new ConsoleGuiSelectOne(_activator); if (dlg.ShowDialog()) { Show(dlg.Selected); } } catch (Exception e) { _activator.ShowException("Unexpected error in open/edit tree", e); } }
public override IMapsDirectlyToDatabaseTable SelectOne(DialogArgs args, IMapsDirectlyToDatabaseTable[] availableObjects) { if (args.AllowAutoSelect && availableObjects.Length == 1) { return(availableObjects[0]); } var dlg = new ConsoleGuiSelectOne(CoreChildProvider, availableObjects); if (dlg.ShowDialog()) { return(dlg.Selected); } return(null); }