Exemplo n.º 1
0
        internal ExecuteScriptCommand()
            : base("Execute")
        {
            ExecuteScriptCommand.instance = this;
            Guid textEditorGuid = new Guid(ContextGuids.vsContextGuidTextEditor);

            this.VsContextGuids = new Guid[] { textEditorGuid };
        }
Exemplo n.º 2
0
        public override void Execute(VsCommandEventArgs e)
        {
            ExecuteScriptCommand executeCommand = ExecuteScriptCommand.Instance;

            if (executeCommand == null)
            {
                return;
            }

            executeCommand.CancelExecution();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Check if a script is currently executed.
        /// </summary>
        /// <returns><c>true</c> if a script is currently executed. <c>false</c> otherwise.</returns>
        public override bool CanExecute(VsCommandEventArgs e)
        {
            ExecuteScriptCommand executeCommand = ExecuteScriptCommand.Instance;

            if (executeCommand == null)
            {
                return(false);
            }

            return(executeCommand.IsExecuting);
        }