protected void OnButton1Clicked(object sender, System.EventArgs e) { USBSerial Conexion = new USBSerial(); Conexion.USBSerialOpen(); Conexion.USBSerialSend("P" + combobox5.Active + "M"); Conexion.USBSerialClose(); }
protected void OnDeleteEvent(object sender, DeleteEventArgs a) { USBSerial Conexion = new USBSerial(); Conexion.USBSerialOpen(); Conexion.USBSerialSend("P" + "0" + "M"); Conexion.USBSerialClose(); Application.Quit(); a.RetVal = true; }
public static void OurTimerCallback(object source, ElapsedEventArgs e) { String Dato = ""; USBSerial Conexion = new USBSerial(); Conexion.USBSerialOpen(); Conexion.USBSerialSend("IC"); Dato = Conexion.USBSerialRecive(); Conexion.USBSerialClose(); //Console.WriteLine("Received a callback, the time is {0}", e.SignalTime); }