コード例 #1
0
ファイル: ZeusProcessManager.cs プロジェクト: zhh007/MyGen
 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
ファイル: ProjectBrowserControl.cs プロジェクト: zhh007/MyGen
 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;
                    }
                }
            }
        }
コード例 #6
0
        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 { }
                }
            }
        }
コード例 #7
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;
             }
         }
     }
 }
コード例 #8
0
 public void Callback(ZeusProcessStatusEventArgs args)
 {
     if (CallbackHandlers != null) CallbackHandlers(args);
 }
コード例 #9
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;
                    }
                }
            }
        }