Beispiel #1
0
 private void InitClass()
 {
     _UiData = new UiData();
     _CrtEVOMachine = new EVOMachine(true);
     _CrtWaterValve = new WaterValve();
     _CrtMixerUnit = new MixerUnit();
     _CrtCanisterUnit = new CanisterUnit();
     _CrtDeviceUnit = new DeviceUnit();
     _CrtBeanHopperUint = new BeanHopperUint();
     _CrtIngredient = new IngredientInfo(true);
     _CrtRecipeInfo = new RecipeInfo();
     _LstEVOMachine = new ObservableCollection<EVOMachine>();
     _LstDeviceUnit = new ObservableCollection<DeviceUnit>();
     _lstMaintenceInfo = new ObservableCollection<EvoMaintenceInfo>();
     _EvoRecipe = new EvoRecipe();
     _IDControl = new IDGenrator();
     _crtDBItem = new DBItem();
     _EvoUpdate = new EvoUpdate();
     _MachineInfo = new MachineInfo();
     _CrtEVOCleaning = new EVOCleaning();
     Tmr.Interval = TimeSpan.FromSeconds(5);
     Tmr.Tick += Tmr_Tick;
     _ComSetting = (ComSetting)Function.XmlSerializer.LoadFromXml("EVO.com.xml", typeof(ComSetting));
     comunication.Getinstance().SetComPort(_ComSetting.Port, _ComSetting.BaudRate);
     int ret = comunication.Getinstance().Open();
     comunication.EVOEvent += comunication_EVOEvent;
 }
        public MixerUnit copy()
        {
            MixerUnit ret = new MixerUnit();

            ret.Name           = _Name;
            ret.DeviceIoAdress = _DeviceIoAdress;
            ret._DeviceID      = _DeviceID;

            return(ret);
        }
 public MixerUnit copy()
 {
     MixerUnit ret = new MixerUnit();
     ret.Name = _Name;
     ret.DeviceIoAdress = _DeviceIoAdress;
     ret._DeviceID = _DeviceID;
    
     return ret;
 }
Beispiel #4
0
 public void SaveEVOMachineSet()
 {
     _CrtEVOMachine.Name = "EVO-B13";
     _CrtEVOMachine.MachineID = 0001;
     WaterValve tmpWaterValve = new WaterValve("Hot Water",0x0001,10);
     _CrtEVOMachine._WaterValve.Add(tmpWaterValve);
     tmpWaterValve = new WaterValve("Brew Hot Water", 0x0002, 10);
     _CrtEVOMachine._WaterValve.Add(tmpWaterValve);
     MixerUnit tmpmix = new MixerUnit("Mix1",0x0003);
     _CrtEVOMachine._MixerUnit.Add(tmpmix);
     Function.XmlSerializer.SaveToXml("EVO.conf.xml", _CrtEVOMachine, typeof(EVOMachine), null);
 }