Exemple #1
0
 private void UpdateDisplay()
 {
     if (status != serialstatus.Downloading)
     {
         textBox1.AppendText(line);
     }
     label1.Text = Convert.ToString(cross);
     if (isConnected)
     {
         lStatus.Text = status.ToString() + " " + receivedbytes + " " + serialPort1.BytesToRead;
     }
     else
     {
         lStatus.Text = status.ToString() + " " + receivedbytes + " 0";
     }
     this.Refresh();
 }
Exemple #2
0
 void updateDisplay()
 {
     if (start.Second != DateTime.Now.Second)
     {
         this.BeginInvoke((System.Windows.Forms.MethodInvoker) delegate()
         {
             try
             {
                 TXT_status.Text = status.ToString() + " " + receivedbytes + " " + comPort.BytesToRead;
             }
             catch { }
         });
         start = DateTime.Now;
     }
 }
Exemple #3
0
        void updateDisplay()
        {
            if (this.IsDisposed)
            {
                return;
            }

            if (start.Second != DateTime.Now.Second)
            {
                this.BeginInvoke((System.Windows.Forms.MethodInvoker) delegate()
                {
                    try
                    {
                        TXT_status.Text = status.ToString() + " " + receivedbytes;
                    }
                    catch { }
                });
                start = DateTime.Now;
            }
        }