Example #1
0
 /// <summary>
 /// 清除任何使用中的資源。
 /// </summary>
 /// <param name="disposing">如果應該處置 Managed 資源則為 true,否則為 false。</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing && (components != null))
     {
         components.Dispose();
     }
     MySerialPort.Dispose();
     base.Dispose(disposing);
 }
Example #2
0
 public bool Close()
 {
     if (Serial != null)
     {
         Serial.Close();
         Serial.Dispose();
         Serial = null;
     }
     return(true);
 }