Esempio n. 1
0
        /// <summary>
        /// Handles the OnProcessError event of the processInterace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
        void processInterace_OnProcessError(object sender, ProcessEventArgs args)
        {
            //  Write the output, in red
            WriteOutput(args.Content, Color.Red);

            //  Fire the output event.
            FireConsoleOutputEvent(args.Content);
        }
Esempio n. 2
0
        /// <summary>
        /// Handles the OnProcessOutput event of the processInterace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
        void processInterace_OnProcessOutput(object sender, ProcessEventArgs args)
        {
            //  Write the output, in white
            WriteOutput(args.Content, Color.White);

            //  Fire the output event.
            FireConsoleOutputEvent(args.Content);
        }
        /// <summary>
        /// Handles the OnProcessExit event of the processInterace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
        void processInterace_OnProcessExit(object sender, ProcessEventArgs args)
        {
            //  Are we showing diagnostics?
            if (ShowDiagnostics)
            {
                WriteOutput(Environment.NewLine + _processInterace.ProcessFileName + " exited.", Color.FromArgb(255, 0, 255, 0));
            }

            IsProcessRunning = false;
        }
Esempio n. 4
0
        /// <summary>
        /// Handles the OnProcessExit event of the processInterace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
        void processInterace_OnProcessExit(object sender, ProcessEventArgs args)
        {
            //  Read only again.
            RunOnUIDespatcher(() =>
                {
                    //  Are we showing diagnostics?
                    if (ShowDiagnostics)
                    {
                        WriteOutput(Environment.NewLine + processInterace.ProcessFileName + " exited.", Color.FromArgb(255, 0, 255, 0));
                    }

                    richTextBoxConsole.IsReadOnly = true;

                    //  And we're no longer running.
                    IsProcessRunning = false;
                });
        }
 /// <summary>
 /// Handles the OnProcessInput event of the processInterace control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
 void processInterace_OnProcessInput(object sender, ProcessEventArgs args)
 {
     FireProcessInputEvent(args);
 }
 /// <summary>
 /// Fires the console output event.
 /// </summary>
 /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
 private void FireProcessOutputEvent(ProcessEventArgs args)
 {
     //  Get the event.
     var theEvent = OnProcessOutput;
     if (theEvent != null)
         theEvent(this, args);
 }
Esempio n. 7
0
 /// <summary>
 /// Handles the OnProcessExit event of the processInterace control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
 void processInterace_OnProcessExit(object sender, ProcessEventArgs args)
 {
     //  Are we showing diagnostics?
     if (ShowDiagnostics)
     {
         WriteOutput(Environment.NewLine + processInterace.ProcessFileName + " exited.", Color.FromArgb(255, 0, 255, 0));
     }
     
     if (!this.IsHandleCreated)
         return;
     //  Read only again.
     Invoke((Action)(() =>
     {
         richTextBoxConsole.ReadOnly = true;
     }));
 }
Esempio n. 8
0
 /// <summary>
 /// Handles the OnProcessInput event of the processInterace control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
 void processInterace_OnProcessInput(object sender, ProcessEventArgs args)
 {
     throw new NotImplementedException();
 }
        /// <summary>
        /// Handles the OnProcessOutput event of the processInterace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
        private void processInterface_OnProcessOutput(object sender, ProcessEventArgs args)
        {
            this.RunOnUIThread(() =>
            {
                //  Write the output, in white
                WriteOutput(args.Content, richTextBoxConsole.Foreground);

                //  Fire the output event.
                FireProcessOutputEvent(args);
            });
        }
 /// <summary>
 /// Handles the OnProcessInput event of the processInterace control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
 private void processInterface_OnProcessInput(object sender, ProcessEventArgs args)
 {
     this.RunOnUIThread(() => FireProcessInputEvent(args));
 }
        /// <summary>
        /// Handles the OnProcessError event of the processInterace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="ProcessEventArgs"/> instance containing the event data.</param>
        private void processInterface_OnProcessError(object sender, ProcessEventArgs args)
        {
            this.RunOnUIThread(() =>
            {
                //  Write the output, in red
                WriteOutput(args.Content, Colors.Red);

                //  Fire the output event.
                FireProcessOutputEvent(args);
            });
        }