private void Events_ProcPrint(object sender, ProcPrintEvent e)
        {
            // Wait until it is safe to enter.
            mut.WaitOne();

            OutputControl Tab = (OutputControl)MainDockPanel.GetDocuments().Find(x => x.DockText == e.Sender);

            if (Tab != null)
            {
                Invoke((MethodInvoker) delegate
                {
                    Tab.Append(e.Type, e.Data);
                });
            }
            else
            {
                Invoke((MethodInvoker) delegate
                {
                    OutputControl NewDocument = new OutputControl(PS4, e.Sender);
                    MainDockPanel.AddContent(NewDocument);
                    NewDocument.Append(e.Type, e.Data);
                });
            }

            // Release the Mutex.
            mut.ReleaseMutex();
        }
Example #2
0
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     foreach (OutputControl Content in MainDockPanel.GetDocuments())
     {
         Content.Clear();
     }
 }