Пример #1
0
 public void Callback(ZeusProcessStatusEventArgs args)
 {
     if (CallbackHandlers != null)
     {
         CallbackHandlers(args);
     }
 }
Пример #2
0
        private void ExecutionCallback(ZeusProcessStatusEventArgs args)
        {
            if (args.Message != null)
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(_executionCallback, args);
                }
                else
                {
                    if (_consoleWriteGeneratedDetails)
                    {
                        if (this._mdi.Console.DockContent.IsHidden) this._mdi.Console.DockContent.Show(_mdi.DockPanel);
                        if (!this._mdi.Console.DockContent.IsActivated) this._mdi.Console.DockContent.Activate();
                    }

                    if (args.Message.StartsWith(ZeusProcessManager.GENERATED_FILE_TAG))
                    {
                        string generatedFile = args.Message.Substring(ZeusProcessManager.GENERATED_FILE_TAG.Length);
                        this._mdi.WriteConsole("File Generated: " + generatedFile);
                        this._mdi.SendAlert(this, "FileGenerated", generatedFile);
                    }
                    else
                    {
                        if (_consoleWriteGeneratedDetails) this._mdi.WriteConsole(args.Message);
                    }

                    if (!args.IsRunning)
                    {
                        this._mdi.PerformMdiFuntion(this, "ExecutionQueueUpdate");
                    }
                }
            }
        }
Пример #3
0
 private void ExecutionCallback(ZeusProcessStatusEventArgs args)
 {
     if (args.Message != null)
     {
         if (this.InvokeRequired)
         {
             this.Invoke(_executionCallback, args);
         }
         else
         {
             this.OnExecutionStatusUpdate(args.IsRunning, args.Message);
             if (!args.IsRunning)
             {
                 Cursor.Current = Cursors.Default;
             }
         }
     }
 }
Пример #4
0
        private void ExecutionCallback(ZeusProcessStatusEventArgs args)
        {
            if (args.Message != null)
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(_executionCallback, args);
                }
                else
                {
                    if (_consoleWriteGeneratedDetails)
                    {
                        if (this._mdi.Console.DockContent.IsHidden)
                        {
                            this._mdi.Console.DockContent.Show(_mdi.DockPanel);
                        }
                        if (!this._mdi.Console.DockContent.IsActivated)
                        {
                            this._mdi.Console.DockContent.Activate();
                        }
                    }

                    if (args.Message.StartsWith(ZeusProcessManager.GENERATED_FILE_TAG))
                    {
                        string generatedFile = args.Message.Substring(ZeusProcessManager.GENERATED_FILE_TAG.Length);
                        this._mdi.WriteConsole("File Generated: " + generatedFile);
                        this._mdi.SendAlert(this, "FileGenerated", generatedFile);
                    }
                    else
                    {
                        if (_consoleWriteGeneratedDetails)
                        {
                            this._mdi.WriteConsole(args.Message);
                        }
                    }

                    if (!args.IsRunning)
                    {
                        this._mdi.PerformMdiFuntion(this, "ExecutionQueueUpdate");
                    }
                }
            }
        }
Пример #5
0
        private void ExecutionCallback(ZeusProcessStatusEventArgs args)
        {
            if (args.Message != null)
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(_executionCallback, args);
                }
                else
                {
                    /*if (_consoleWriteGeneratedDetails)
                     * {
                     *  if (this._mdi.Console.DockContent.IsHidden) this._mdi.Console.DockContent.Show(_mdi.DockPanel);
                     *  if (!this._mdi.Console.DockContent.IsActivated) this._mdi.Console.DockContent.Activate();
                     * }*/

                    if (args.Message.StartsWith(ZeusProcessManager.BEGIN_RECORDING_TAG))
                    {
                        _collectedInput  = new StringBuilder();
                        _insideRecording = true;
                    }
                    else if (args.Message.StartsWith(ZeusProcessManager.END_RECORDING_TAG))
                    {
                        this._savedObject.XML = _collectedInput.ToString();
                        _insideRecording      = false;
                    }
                    else if (_insideRecording)
                    {
                        _collectedInput.AppendLine(args.Message);
                    }

                    if (!args.IsRunning)
                    {
                        this.Cursor = Cursors.Default;
                        this.buttonCollectInput.Enabled = true;
                    }
                }
            }
        }
        private void ProcessOperation(ZeusProcessStatusEventArgs args)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(processCallback, args);
            }
            else
            {
                if (args.Message != null)
                {
                    try
                    {
                        if (args.Message.StartsWith("[GENERATED_FILE]") && (this.checkBoxOpenFile.Checked))
                        {
                            string filename = args.Message.Substring(16);
                            _application.ItemOperations.OpenFile(filename, EnvDTE.Constants.vsViewKindPrimary);
                        }
                        else
                        {
                            Application.DoEvents();

                            OutputWindow outwin = _application.ToolWindows.OutputWindow;
                            OutputWindowPane pane = null;

                            if (outwin.OutputWindowPanes.Count > 0)
                            {
                                foreach (OutputWindowPane tmp in outwin.OutputWindowPanes)
                                {
                                    if (tmp.Name == "MyGeneration")
                                    {
                                        pane = tmp;
                                        break;
                                    }
                                }
                            }

                            if (pane == null)
                            {
                                pane = outwin.ActivePane.Collection.Add("MyGeneration");
                            }

                            if (pane != null)
                            {
                                pane.Activate();
                                pane.OutputString(args.Message);
                                pane.OutputString(Environment.NewLine);
                            }
                        }
                    }
                    catch { }
                }
            }
        }
 private void ExecutionCallback(ZeusProcessStatusEventArgs args)
 {
     if (args.Message != null)
     {
         if (this.InvokeRequired)
         {
             this.Invoke(_executionCallback, args);
         }
         else
         {
             this.OnExecutionStatusUpdate(args.IsRunning, args.Message);
             if (!args.IsRunning)
             {
                 Cursor.Current = Cursors.Default;
             }
         }
     }
 }
 public void Callback(ZeusProcessStatusEventArgs args)
 {
     if (CallbackHandlers != null) CallbackHandlers(args);
 }
        private void ExecutionCallback(ZeusProcessStatusEventArgs args)
        {
            if (args.Message != null)
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(_executionCallback, args);
                }
                else
                {
                    /*if (_consoleWriteGeneratedDetails)
                    {
                        if (this._mdi.Console.DockContent.IsHidden) this._mdi.Console.DockContent.Show(_mdi.DockPanel);
                        if (!this._mdi.Console.DockContent.IsActivated) this._mdi.Console.DockContent.Activate();
                    }*/

                    if (args.Message.StartsWith(ZeusProcessManager.BEGIN_RECORDING_TAG)) 
                    {
                        _collectedInput = new StringBuilder();
                        _insideRecording = true;
                    }
                    else if (args.Message.StartsWith(ZeusProcessManager.END_RECORDING_TAG)) 
                    {
                        this._savedObject.XML = _collectedInput.ToString();
                        _insideRecording = false;
                    }
                    else if (_insideRecording)
                    {
                        _collectedInput.AppendLine(args.Message);
                    }

                    if (!args.IsRunning)
                    {
                        this.Cursor = Cursors.Default;
                        this.buttonCollectInput.Enabled = true;
                    }
                }
            }
        }