Esempio n. 1
0
 private void Button_Click_2(object sender, RoutedEventArgs e)
 {
     if (DeviceCmdEvent != null)
     {
         DeviceCmdEvent.Invoke(this, new DeviceCmdArgEvent()
         {
             cmd = DeviceCmd.STOP_MEASURE
         });
     }
 }
Esempio n. 2
0
 private void StartUpCalibItem_Click(object sender, RoutedEventArgs e)
 {
     if (DeviceCmdEvent != null)
     {
         DeviceCmdEvent.Invoke(this, new DeviceCmdArgEvent()
         {
             cmd = DeviceCmd.STARTUP_CALIBRATE
         });
     }
 }
Esempio n. 3
0
 private void button3_Click(object sender, RoutedEventArgs e)
 {
     if (DeviceCmdEvent != null)
     {
         DeviceCmdEvent.Invoke(this, new DeviceCmdArgEvent()
         {
             cmd = DeviceCmd.ZERO_CALIBRATE
         });
     }
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     UpdateParams();
     if (CheckParams())
     {
         DeviceCmdEvent.Invoke(this, new DeviceCmdArgEvent()
         {
             cmd = DeviceCmd.WEIGHT_CALIBRATE, Params = _calibrationParams
         });
     }
 }
Esempio n. 5
0
        private void button4_Click(object sender, RoutedEventArgs e)
        {
            if (DeviceCmdEvent != null)
            {
                DeviceCmdEvent.Invoke(this, new DeviceCmdArgEvent()
                {
                    cmd = DeviceCmd.WEIGHT_MEASURE
                });
            }
//            var win = new CalibrationWindow(_presenter.Model);
//            win.ShowDialog();
        }
Esempio n. 6
0
        private void zeroCalib_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            MessageBox.Show(this, "Освободите платформу от нагрузки перед началом калибровки", "Внимание!",
                            MessageBoxButton.OK, MessageBoxImage.Warning);

            if (DeviceCmdEvent != null)
            {
                DeviceCmdEvent.Invoke(this, new DeviceCmdArgEvent()
                {
                    cmd = DeviceCmd.ZERO_CALIBRATE
                });
            }
        }
Esempio n. 7
0
        private void FastWeightCalibItem_Click(object sender, RoutedEventArgs e)
        {
            var win = new SimpleWindow("Вес для калибровки", "Введите значения веса для калибровки:");

            if ((bool)win.ShowDialog())
            {
                if (DeviceCmdEvent != null)
                {
                    DeviceCmdEvent.Invoke(this, new DeviceCmdArgEvent()
                    {
                        cmd = DeviceCmd.WEIGHT_CALIBRATE_FAST, Params = new CalibrationParams()
                        {
                            Weight = win.Value, EntryCount = 100
                        }
                    });
                }
            }
        }