Example #1
0
 private void btnClose_Click(object sender, EventArgs e)
 {
     try
     {
         ControlBox = true;
         clsModbus mo = new clsModbus();
         mo.ACloseSerialPort();
         CloseForm();
     }
     catch (Exception ae)
     {
     }
 }
Example #2
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     btnCancel.Visible = false;
     btnSearch.Visible = true;
     try
     {
         //ControlBox = true;
         clsModbus mo = new clsModbus();
         mo.ACloseSerialPort();
         CancelSearch();
     }
     catch (Exception ae)
     {
     }
 }
Example #3
0
 private void btnSet_Click(object sender, EventArgs e)
 {
     this.DialogResult = DialogResult.OK;
     this.Close();
     //Setting not set issue add close port function
     try
     {
         ControlBox = true;
         clsModbus mo = new clsModbus();
         mo.ACloseSerialPort();
     }
     catch (Exception ae)
     {
     }
 }