Beispiel #1
0
 void comunication_EVOEvent(object sender, EVOData e)
 {
     if (e._cmdType == CmdType.B2M_CMD_DB_SET)
     {
         B2MDbSetting dbset = new B2MDbSetting(e.datain, 0);
         if (dbset.Result == 1)
         {
             MessageBox.Show("DB SET finished");
         }
         else
         {
             MessageBox.Show("DB SET Failed!");
         }
     }
     if (e._cmdType == CmdType.B2M_CMD_CAL)
     {
         B2MCalibration dbcal = new B2MCalibration(e.datain, 0);
         if (dbcal.Result == 1)
         {
             if (dbcal.calPartNo <= 0x8d)
             {
                 System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                 {
                     _crtpbValue = 0;
                     this.grd_Process.Visibility = System.Windows.Visibility.Visible;
                     Tmrpb.Start();
                 }));
             }
         }
     }
 }
Beispiel #2
0
 void comunication_EVOEvent(object sender, EVOData e)
 {
     if (e._cmdType == CmdType.B2M_CMD_CAL)
     {
         B2MCalibration dbcal = new B2MCalibration(e.datain, 0);
         if (dbcal.Result == 1)
         {
             if (dbcal.calPartNo <= 0x8d)
             {
                 System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                 {
                     _crtpbValue = 0;
                     this.grd_Process.Visibility = Visibility.Visible;
                     Tmrpb.Start();
                 }));
             }
         }
     }
 }
Beispiel #3
0
 private void comunication_EVOEvent(object sender, EVOData e)
 {
     if (e._cmdType == CmdType.B2M_CMD_COLOR_SET)
     {
         B2MColorSet cmd = new B2MColorSet(e.datain, 0);
         if (cmd.Result == 1)
         {
             MessageBox.Show("Set Color Ok");
             System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() =>
             {
                 EVOLedColor tmp = (EVOLedColor)_EVOLedColorMgt.m_EVOLedColorList.First(c => c.ColorNB == this.cb_Led.SelectedIndex);
                 tmp.Color.RED   = (byte)sld_r.Value;
                 tmp.Color.GREEN = (byte)sld_g.Value;
                 tmp.Color.BLUE  = (byte)sld_b.Value;
                 Function.XmlSerializer.SaveToXml("EVO.LedSetting.xml", _EVOLedColorMgt, typeof(EVOLedColorMgt), null);
             }
                                                                                  ));
         }
     }
 }
Beispiel #4
0
        private void comunication_EVOEvent(object sender, EVOData e)
        {
            switch (e._cmdType)
            {
            case CmdType.B2M_CMD_QUERY:
                B2MStateQuery evost = new B2MStateQuery(e.datain, 0);
                _myMachineInfo.Err_clean        = evost.modulestate.IsCleanErr;
                _myMachineInfo.Err_cooling      = evost.modulestate.IsCoolingErr;
                _myMachineInfo.Err_heating      = evost.modulestate.IsHeatingErr;
                _myMachineInfo.Err_soldout      = evost.modulestate.IsSoldoutErr;
                _myMachineInfo.Err_water        = evost.modulestate.IsWaterErr;
                _myMachineInfo.Exist_cup1       = evost.sensorstate.cup1;
                _myMachineInfo.Exist_cup2       = evost.sensorstate.cup2;
                _myMachineInfo.Exist_door       = evost.sensorstate.door;
                _myMachineInfo.Exist_driplevel  = evost.sensorstate.driptraylevel;
                _myMachineInfo.Exist_dripswitch = evost.sensorstate.driptrayswitch;
                _myMachineInfo.machinestate     = evost.machinestate;
                _myMachineInfo.Temp_fan         = evost.temperatureinfo.Fan;
                _myMachineInfo.Temp_fridge      = evost.temperatureinfo.Fridge;
                _myMachineInfo.Temp_water       = evost.temperatureinfo.Water;
                _myMachineInfo.Brew_sw          = evost.sensorstate.brew_sw;
                _myMachineInfo.Waterlevel_low   = (evost.sensorstate.waterlevel < 1 ? false : true);
                _myMachineInfo.Waterlevel_high  = (evost.sensorstate.waterlevel == 1 ? true : false);
                break;

            case CmdType.B2M_CMD_DB_GET:
                B2MDbGetting dbget = new B2MDbGetting(e.datain, 0);
                System.Windows.Application.Current.Dispatcher.BeginInvoke(
                    new Action(() => { tbver.Text = dbget._DBGroup[0].DBValue.ToString("X4"); }));

                break;

            default:
                break;
            }
        }
Beispiel #5
0
        private void comunication_EVOEvent(object sender, EVOData e)
        {
            Console.WriteLine(e._cmdType.ToString());
            switch (e._cmdType)
            {
            case CmdType.B2M_CMD_CAL:
                break;

            case CmdType.B2M_CMD_CLEAN:
                break;

            case CmdType.B2M_CMD_DB_SET:
                break;

            case CmdType.B2M_CMD_MAINTENCE:
                break;

            case CmdType.B2M_CMD_MAKE_BERVAGE:
                break;

            case CmdType.B2M_CMD_MAKE_DRINK:
                B2MMakeDrink cmd = new B2MMakeDrink(e.datain, 0);
                if (cmd.Result == 1)
                {
                    System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() => { grd_process.Visibility = System.Windows.Visibility.Visible; }));
                }
                break;

            case CmdType.B2M_CMD_MAKE_INGREDIENT:
                break;

            case CmdType.B2M_CMD_MATCH:
                break;

            case CmdType.B2M_CMD_MODE_REQUEST:
                break;

            case CmdType.B2M_CMD_QUERY:
                break;

            case CmdType.B2M_CMD_TEST:
                break;

            case CmdType.M2B_CMD_CAL:
                break;

            case CmdType.M2B_CMD_CLEAN:
                break;

            case CmdType.M2B_CMD_DB_SET:
                break;

            case CmdType.M2B_CMD_MAINTENCE:
                break;

            case CmdType.M2B_CMD_MAKE_BERVAGE:
                break;

            case CmdType.M2B_CMD_MAKE_DRINK:
                break;

            case CmdType.M2B_CMD_MAKE_INGREDIENT:
                break;

            case CmdType.M2B_CMD_MATCH:
                break;

            case CmdType.M2B_CMD_MODE_REQUEST:
                break;

            case CmdType.M2B_CMD_QUERY:
                break;

            case CmdType.M2B_CMD_TEST:
                break;

            default:
                break;
            }
        }