示例#1
0
 /// <summary>
 /// Connect to the Hardware and start the Backgroundjob which reads the Values
 /// </summary>
 public void ConnectHardware()
 {
     port1 = new SerialPort(port, 115200);
     port1.NewData += new SerialPort.NewDataRowHandler(port1_NewData);
     port1.currentsettings = new List<string>();
     if (values["cursettings"].Value.ToString().Split (',').Length == 6)
     {
         Console.WriteLine("Setting Razor Settings");
         port1.currentsettings.AddRange(values["cursettings"].Value.ToString().Split(','));
     }
     myworker = new Thread(new ThreadStart(ReadValues));
     myworker.Start();
 }
示例#2
0
 void port1_NewData(object sender, SerialPort.DataEventArgs e)
 {
 }