public override bool Initialize() { var initForm = new InitializeForm(); initForm.ShowDialog(); try { elManager = new ElectricityManager(initForm.selectedCOM, true); } catch (Exception ex) { elManager.CloseThePort(); return false; } return true; }
public override bool Initialize() { var initForm = new InitializeForm(); initForm.ShowDialog(); try { elManager = new ElectricityManager(initForm.selectedCOM, true); } catch (Exception ex) { elManager.CloseThePort(); return(false); } return(true); }
public override bool Initialize() { InitializeForm init = new InitializeForm(this); init.ShowDialog(); RFIDCards = init.RFIDCards; arduino = new SerialPort(init.COMPort, 9600); if (!arduino.IsOpen) { try { arduino.Open(); arduino.DataReceived += new SerialDataReceivedEventHandler(arduino_DataReceived); } catch { } } return true; }
public override bool Initialize() { InitializeForm init = new InitializeForm(this); init.ShowDialog(); RFIDCards = init.RFIDCards; arduino = new SerialPort(init.COMPort, 9600); if (!arduino.IsOpen) { try { arduino.Open(); arduino.DataReceived += new SerialDataReceivedEventHandler(arduino_DataReceived); } catch { } } return(true); }