コード例 #1
0
 public void OnRecordReceived(SeeVseStartupRecord record)
 {
     // Update the console.
     if (active == true)
     {
         Append(record.ToString());
     }
     //if (active == true)
     //	Append(new FtpTerminationRecord(blok, utcOffset).ToSummary());
 }
コード例 #2
0
        /// <summary>
        /// Handler for OnSeeVseStartupReceived events received from the
        /// dispatcher.
        /// </summary>
        /// <param name="blok"></param>
        /// <param name="utcOffset"></param>
        private void dispatcher_OnSeeVseStartupReceived(
            byte[] blok, long utcOffset)
        {
            // OnSeeVseStartupReceived events do not occur on the main thread
            // and therefore this method needs to be called again on the main
            // thread to prevent threading issues.
            if (this.InvokeRequired)
            {
                BeginInvoke(new ConsoleDispatcher.OnReceivedHandler(
                                dispatcher_OnSeeVseStartupReceived),
                            new object[] { blok, utcOffset }
                            );
                return;
            }

            // Update the console.

            if (active == true)
            {
                SeeVseStartupRecord record = new SeeVseStartupRecord(blok, utcOffset);

                Append(record.ToString());
//				Font boldFont = new Font(Font, FontStyle.Bold);

                //rtbConsole.Clear();
//				AppendText(boldFont, Color.Blue, "Started at: ");
//				AppendText(Font, Color.Black, record.StartTime + "\n");
//				AppendText(boldFont, Color.Blue, "    CPU Serial Number: ");
//				AppendText(Font, Color.Black, record.CpuId + "\n");
//				AppendText(boldFont, Color.Blue, "    Program ID:        ");
//				AppendText(Font, Color.Black, record.ProgramId + "\n");
//				AppendText(boldFont, Color.Blue, "    Program Version:   ");
//				AppendText(Font, Color.Black, record.ProgramVersion + "\n");
//				AppendText(Font, Color.Black, "\n");
            }
        }