コード例 #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (!Tmr.IsEnabled)
     {
         M2BMakeDrink makedrink = new M2BMakeDrink(8);
         byte[] sendcmd = makedrink.EnCode();
         comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length);
         _Total++;
         tbtotal.Text = string.Format("Total:{0}", _Total);
         Tmr.Start();
         btstart.IsEnabled = false;
         btstop.IsEnabled = true;
     }
     
 }
コード例 #2
0
 private void Tmr_Tick(object sender, EventArgs e)
 {
     //Tmr.Stop();
     _second--;
     if (_second <= 0)
     {
         _second = 30;
         M2BMakeDrink makedrink = new M2BMakeDrink(8);
         byte[] sendcmd = makedrink.EnCode();
         comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length);
         _Total++;
         tbtotal.Text = string.Format("Total:{0}", _Total);
     }
     else
     {
         tbsecond.Text = string.Format("{0} s", _second);
     }
     
     //Tmr.Start();
 }
コード例 #3
0
 private void EvoDrinkUi_MouseUp(object sender, RoutedEventArgs e)
 {
     M2BMakeDrink makedrink = new M2BMakeDrink(_crtID, 0);
     _crtID = ((RecipeInfo)(sender as Button).Tag).ID;
     byte[] sendcmd = makedrink.EnCode();
     comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length);
     recoverybtn();
 }
コード例 #4
0
        private void Btn_start(object sender, RoutedEventArgs e)
        {

            M2BMakeDrink makedrink = new M2BMakeDrink(_crtID);
            makedrink.SetMilk = _preMilk;
            makedrink.SetStrength = _preStrength;
            makedrink.SetSugar = _preSugar;
            makedrink.SetVolume = _preVolume;
            byte[] sendcmd = makedrink.EnCode();
            comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length);

        }
コード例 #5
0
 private void EvoDrinkUi_MouseDown(object sender, RoutedEventArgs e)
 {
     disablebtn();
     (sender as Button).Visibility = System.Windows.Visibility.Visible;
     _crtID = ((RecipeInfo)(sender as Button).Tag).ID;
     M2BMakeDrink makedrink = new M2BMakeDrink(_crtID);
     byte[] sendcmd = makedrink.EnCode();
     comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length);
 }