public ONU() { InitializeComponent(); //SERIAL usb = new USB(); Init(); //GRAPH //f_saveReadFirst(false); // f_reStyle(); }
int sendCount = 1; //send command times public FOHW() { InitializeComponent(); //graph part f_saveReadFirst(false); //serial communiacation part usb = new USB(); Init(); }
public Form1() { InitializeComponent(); //telnet part copy ToggleControls(false); ShowStatusBar(string.Empty, true); //telnet part copy ReadString(); //SERIAL usb = new USB(); Init(); }
//initial serial port private void Init() { try { List <string> list = new List <string>(); string[] ports = USB.GetPorts(); //SerialPort.GetPortNames();// PortcomboBox.Items.Clear(); for (int i = 0; i < ports.Length; i++) { PortcomboBox.Items.Add(ports[i]); } if (ports.Length > 0) { PortcomboBox.SelectedIndex = ports.Length - 1; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }