Beispiel #1
0
 private void Spm_OnMessageReceived(string message, bool isCompleted, bool isSuccess)
 {
     richTextBox1.AppendText(message);
     if (isCompleted)
     {
         SerialPortManager.Close();
         if (isSuccess)
         {
             // Do somethings here
             MessageBox.Show("Operation succeeded!");
         }
         else
         {
             // Do somethings here
             MessageBox.Show("Operation failed");
         }
         // Finish process here or restart
     }
 }
Beispiel #2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     SerialPortManager.Close();
 }