protected bool AppendTextToCmdLine(string text)
        {
            CommandLinePanel CommandLine = CurrentCommandLine;

            if (CommandLine != null)
            {
                CommandLine.CommandLine += PathHelper.EnquoteString(text) + ' ';
                return(true);
            }
            return(false);
        }
Example #2
0
 private static void AddCommandLineToTab(ITab tab)
 {
   IFolderView FolderView = tab as IFolderView;
   if (FolderView != null)
   {
     CommandLinePanel CmdLinePanel = new CommandLinePanel();
     CmdLinePanel.MaxCommandLength = _MaxCommandLength;
     CmdLinePanel.HistoryDepth = _HistoryDepth;
     tab.DockControl(DockStyle.Bottom, CmdLinePanel);
     FolderView.CurrentFolderChanged += (sender2, e2) => CmdLinePanel.CurrentFolder = FolderView.CurrentFolder;
   }
 }
Example #3
0
        public ActionState Update(object source, object target)
        {
            CommandLinePanel CommandLine = CurrentCommandLine;

            if ((CommandLine != null) && !string.IsNullOrEmpty(CommandLine.CommandLine))
            {
                return(ActionState.Visible | ActionState.Enabled);
            }
            if (_OpenCommand != null)
            {
                return(_OpenCommand.Update(source, target));
            }
            return(ActionState.Visible);
        }
Example #4
0
        public bool Execute(object source, object target)
        {
            CommandLinePanel CommandLine = CurrentCommandLine;

            if ((CommandLine != null) && !string.IsNullOrEmpty(CommandLine.CommandLine))
            {
                if (!CommandLine.ExecuteCommandLine())
                {
                    CommandLine.Select();
                }
                return(true);
            }
            if (_OpenCommand != null)
            {
                return(_OpenCommand.Execute(source, target));
            }
            return(false);
        }
Example #5
0
        public bool Execute(object source, object target)
        {
            CommandLinePanel CommandLine = CurrentCommandLine;

            return((CommandLine != null) && CommandLine.SelectNextControl(null, true, false, false, false));
        }