void Tmr_Tick(object sender, EventArgs e)
        {
            tb_crt_temp.Text = this._MachineInfo.Temp_water.ToString();
            M2BStateQuery _stqury = new M2BStateQuery();
            byte[] sendcmd = _stqury.EnCode();
            try
            {
                lock (this)
                {
                    comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length);
                }
            }
            catch (Exception)
            {

            }
        }
Esempio n. 2
0
        void Tmr_Tick(object sender, EventArgs e)
        {
           
            /*
            _MachineInfo.Err_clean           = !_MachineInfo.Err_clean;
            _MachineInfo.Err_cooling         = !_MachineInfo.Err_cooling;
            _MachineInfo.Err_heating         = !_MachineInfo.Err_heating;
            _MachineInfo.Err_soldout         = !_MachineInfo.Err_soldout;
            _MachineInfo.Err_water           = !_MachineInfo.Err_water;
            _MachineInfo.Exist_cup1          = !_MachineInfo.Exist_cup1;
            _MachineInfo.Exist_cup2          = !_MachineInfo.Exist_cup2;
            _MachineInfo.Exist_door          =!_MachineInfo.Exist_door;
            _MachineInfo.Exist_driplevel    = !_MachineInfo.Exist_driplevel;
            _MachineInfo.Exist_dripswitch   = !_MachineInfo.Exist_dripswitch;
            _MachineInfo.Temp_fridge        -=(float)0.1;
            if (_MachineInfo.Temp_water<50   )
            {
                _MachineInfo.Temp_water += 1;
                
            }
            else  if (_MachineInfo.Temp_water<80 )
            {
                _MachineInfo.Temp_water += (float)0.5;
            }
            else if (_MachineInfo.Temp_water < 100)
            {
                _MachineInfo.Temp_water += (float)0.1;
            }
             */
            //TODO:Send St Qury;
            M2BStateQuery _stqury = new M2BStateQuery();
            byte[] sendcmd = _stqury.EnCode();
            try
            {
                comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length);
            }
            catch (Exception)
            {               

            }
        }