public Ingredient_Instant(UInt16 Id, UInt16 stm, EvoRecipe rcp,ObservableCollection<CanisterUnit> a)
 {
     _RecipeInfo = rcp;
     _StartTime = stm;
     _ID = Id;
     _CanisterUnit = a;
     _IngredientInfo = new IngredientInfo(IngredientType.INSTANTPOWDER);
     SetIngredientInfo(_IngredientInfo, (IngredientInfo)_RecipeInfo._lstIngredientInfo.First(c => c.ID == _ID));
     InitializeComponent();
     this.DataContext = _IngredientInfo;
     tbstm.Text = stm.ToString();
     fillpowder();
     ReloadCanisterIngredient();
 }
        public Ingredient_FilterBrew(UInt16 Id,UInt16 stm,EvoRecipe rcp)
        {
           // _EvoRecipe = (EvoRecipe)Function.XmlSerializer.LoadFromXml("EVO.Ingredient.xml", typeof(EvoRecipe));
            _RecipeInfo = rcp;
            _StartTime = stm;
            _ID = Id;
            _IngredientInfo = new IngredientInfo(IngredientType.FILTERBREW);
            SetIngredientInfo(_IngredientInfo, (IngredientInfo)_RecipeInfo._lstIngredientInfo.First(c => c.ID == _ID));
            InitializeComponent();
            this.DataContext = _IngredientInfo;
            tbstm.Text = stm.ToString();
            tbpkg1.Text = Function.GetBeanType(_IngredientInfo._FilterBrew.Grind1Type);
            tbpkg2.Text = Function.GetBeanType(_IngredientInfo._FilterBrew.Grind2Type);

        }
Exemplo n.º 3
0
 public EvoDrinkUi()
 {
     InitializeComponent();
     Tmr.Interval = TimeSpan.FromSeconds(1);
     Tmr.Tick += Tmr_Tick;
     Tmr.Start();
     _EvoRecipe = (EvoRecipe)Function.XmlSerializer.LoadFromXml("EVO.Ingredient.xml", typeof(EvoRecipe));
     Btn1.Visibility = System.Windows.Visibility.Hidden;
     Btn2.Visibility = System.Windows.Visibility.Hidden;
     Btn3.Visibility = System.Windows.Visibility.Hidden;
     Btn4.Visibility = System.Windows.Visibility.Hidden;
     Btn5.Visibility = System.Windows.Visibility.Hidden;
     Btn6.Visibility = System.Windows.Visibility.Hidden;
     Btn7.Visibility = System.Windows.Visibility.Hidden;
     Btn8.Visibility = System.Windows.Visibility.Hidden;
     Btn9.Visibility = System.Windows.Visibility.Hidden;
     InitDrinkBtn();
     grd_preselect.Visibility = System.Windows.Visibility.Hidden;
     grd_layout1.Visibility = System.Windows.Visibility.Visible;
     grd_process.Visibility = System.Windows.Visibility.Hidden;
     comunication.EVOEvent += comunication_EVOEvent;
 }
Exemplo n.º 4
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;
 }