Пример #1
0
 private void InitVar()
 {
     _PanelRef = (PanelRef)Function.XmlSerializer.LoadFromXml("EVO.DrinkMap.xml", typeof(PanelRef));
     if (_PanelRef != null)
     {
     }
     else
     {
         _PanelRef = new PanelRef();
         _PanelRef.Init();
         Function.XmlSerializer.SaveToXml("EVO.DrinkMap.xml", _PanelRef, typeof(PanelRef), null);
     }
 }
Пример #2
0
        public EvoDrinkUi()
        {
            InitializeComponent();
            Tmr.Interval = TimeSpan.FromSeconds(1);
            Tmr.Tick    += Tmr_Tick;
            Tmr.Start();
            _PanelRef = (PanelRef)Function.XmlSerializer.LoadFromXml("EVO.DrinkMap.xml", typeof(PanelRef));
            if (_PanelRef == null)
            {
                _PanelRef = new PanelRef();
                _PanelRef.Init();
            }

            _EvoRecipe = (EvoRecipe)Function.XmlSerializer.LoadFromXml("EVO.Ingredient.xml", typeof(EvoRecipe));
            if (_EvoRecipe == null)
            {
                _EvoRecipe = new 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;
            Btn10.Visibility = System.Windows.Visibility.Hidden;
            Btn11.Visibility = System.Windows.Visibility.Hidden;
            Btn12.Visibility = System.Windows.Visibility.Hidden;
            Btn13.Visibility = System.Windows.Visibility.Hidden;
            Btn14.Visibility = System.Windows.Visibility.Hidden;
            Btn15.Visibility = System.Windows.Visibility.Hidden;
            Btn16.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;
        }