Example #1
0
        //重载EXECUTE函数
        public override void Execute(string argument)
        {
            if (string.IsNullOrEmpty(argument))
            {
                Execute();
                return;
            }
            string[] parts = argument.Split('|');
            if (parts.Length != 3 && parts.Length != 2)
            {
                Execute();
                return;
            }
            CloseOpenedScripts();
            ISmartViewer        wnd  = new PythonEditorWindow();
            IPythonEditorWindow wnd2 = wnd as IPythonEditorWindow;

            wnd2.CreateTB(parts[2]);
            ToolWindow wnd3 = wnd as ToolWindow;

            wnd3.Tag  = parts[2];
            wnd3.Text = parts[2];
            if (wnd == null)
            {
                return;
            }
            _smartSession.SmartWindowManager.DisplayWindow(wnd);
        }
Example #2
0
        FastColoredTextBox getCurrentEditorView()
        {
            IPythonEditorWindow ipw = _smartSession.SmartWindowManager.ActiveViewer as IPythonEditorWindow;

            if (ipw != null)
            {
                return(ipw.getTB());
            }
            return(null);
        }