Пример #1
0
 private void HandleSensorsWeightsRecived(object sender, SensorsWeightsRecivedEventArgs e)
 {
     if (e.Values.Length == 12)
     {
         foreach (Control num in GroupBoxSensorsWeights.Controls)
         {
             if (num is NumericUpDown)
             {
                 if (num.Name[13] != 'A')
                 {
                     SetNumericUpDownValue((num as NumericUpDown), e.Values[Int16.Parse(num.Name.Substring(25)) - 1]);
                 }
             }
         }
     }
     else
     {
         SetNumericUpDownValue(NumericUpDownASensor1, Convert.ToDecimal(e.Values[0]));
         SetNumericUpDownValue(NumericUpDownASensor2, Convert.ToDecimal(e.Values[1]));
     }
 }
Пример #2
0
 protected virtual void OnSensorsWeightsRecived(SensorsWeightsRecivedEventArgs e)
 {
     SensorsWeightsRecived?.Invoke(this, e);
 }