Example #1
0
        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);
        }
Example #2
0
 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);
     }
 }
Example #3
0
        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);
            }
        }
Example #4
0
        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);
        }