Пример #1
0
 void serialComm_NewDataEvent(object sender, NewDataEventArgs e)
 {
     textBoxCLIDisplay.Invoke(new delegateUpdateCLI(updateCLI), e);
 }
Пример #2
0
 void updateCLI(NewDataEventArgs e)
 {
     textBoxCLIDisplay.AppendText(e.Dataline + "\r\n");
     switch(e.Dataline.Substring(0,1))
     {
         //remote
         case "r":
             updateReceiver(e.Dataline);
             break;
         //remote
         case "s":
             updateGraph(e.Dataline);
             break;
         //parameter
         case "p":
             propertyGridParameter.Refresh();
             break;
     }
 }
Пример #3
0
        void serialComm_NewDataEvent(object sender, NewDataEventArgs e)
        {
            if (e.Dataline.Substring(0, 1) == "p")
            {
                string [] data = e.Dataline.Split(';');
                data[0] = data[0].Substring(1);
                parameter[Convert.ToInt16(data[0])] = float.Parse(data[1].Replace('.', ','));
                serialComm.setParameter(Convert.ToInt16(data[0]), float.Parse(data[1].Replace('.',',')));

            }
        }