Example #1
0
 void Imager_TemperatureEvent(object sender, TemperatureEventArgs e)
 {
     if (this.Dispatcher.CheckAccess())
     {
         if (e.GoodReading)
         {
             VM.CameraTemp       = e.Temperature;
             VM.CameraTempString = e.Temperature.ToString();
         }
         else
         {
             VM.CameraTempString = "-";
         }
     }
     else
     {
         this.Dispatcher.BeginInvoke(new Action(() =>
         {
             if (e.GoodReading)
             {
                 VM.CameraTemp       = e.Temperature;
                 VM.CameraTempString = e.Temperature.ToString();
             }
             else
             {
                 VM.CameraTempString = "-";
             }
         }));
     }
 }
Example #2
0
 void m_imager_temperatureEvent(object sender, TemperatureEventArgs e)
 {
     if (e.GoodReading)
     {
         VM.TemperatureText = e.Temperature.ToString();
     }
 }
        protected void onTemperatureRead(Object sender, EventArgs e)
        {
            TemperatureEventArgs tempArgs = e as TemperatureEventArgs;

            if (tempArgs != null && tempArgs.Index0Based == extruderIndex0Based)
            {
                actualTempIndicator.Text = string.Format("{0:0.0}°C", tempArgs.Temperature);
            }
        }
Example #4
0
    //3.开始监控气温,同时发布事件
    public void Monitor(int tp)
    {
        TemperatureEventArgs e = new TemperatureEventArgs(tp);

        if (OnWarning != null)
        {
            OnWarning(this, e);
        }
    }
Example #5
0
        protected void onTemperatureSet(Object sender, EventArgs e)
        {
            TemperatureEventArgs tempArgs = e as TemperatureEventArgs;

            if (tempArgs != null)
            {
                SetTargetTemperature(tempArgs.Temperature);
            }
        }
        protected void onTemperatureSet(Object sender, EventArgs e)
        {
            TemperatureEventArgs tempArgs = e as TemperatureEventArgs;

            if (tempArgs != null && tempArgs.Index0Based == extruderIndex0Based)
            {
                SetTargetTemperature(tempArgs.Temperature);
            }
        }
Example #7
0
 public void Alarming(object sender, TemperatureEventArgs args)
 {
     if (args.temperature >= 95)
     {
         Console.WriteLine("温度上升, 注意安全!");
         if (args.temperature == 100)
         {
             Console.WriteLine("已经烧开拉.");
         }
     }
 }
Example #8
0
 void m_imager_m_insideTemperatureEvent(object sender, TemperatureEventArgs e)
 {
     if (e.GoodReading)
     {
         VM.InsideTemp       = e.Temperature;
         VM.InsideTempString = e.Temperature.ToString();
     }
     else
     {
         VM.InsideTempString = "-";
     }
 }
Example #9
0
    private void BoilWater(object sender, ElapsedEventArgs e)
    {
        temperature++;

        if (temperature >= 100)
        {
            timer.Stop();
        }

        //对温度进行封装
        TemperatureEventArgs args = new TemperatureEventArgs(temperature);

        if (HeaterHandler != null)
        {
            HeaterHandler(this, args);
        }

        if (OnHeatHandler != null)
        {
            OnHeatHandler(this, args);
        }
    }
Example #10
0
 //第三步 声明事件时调用方法
 private void Tw_OnWarning(object sender, TemperatureEventArgs e)
 {
     if (e.Temperate < 35)
     {
         lblShow.Text       = "正常";
         lblColor.BackColor = Color.Blue;
     }
     else if (e.Temperate < 37)
     {
         lblShow.Text       = "高温黄色预警";
         lblColor.BackColor = Color.Yellow;
     }
     else if (e.Temperate < 40)
     {
         lblShow.Text       = "高温橙色预警";
         lblColor.BackColor = Color.Orange;
     }
     else if (e.Temperate < 37)
     {
         lblShow.Text       = "高温红色预警";
         lblColor.BackColor = Color.Red;
     }
 }
Example #11
0
 public void ShowTemperatuer(object sengder, TemperatureEventArgs tempArg)
 {
     Console.WriteLine("当前温度为" + tempArg.temperature);
 }
Example #12
0
 void m_imager_m_temperatureEvent(object sender, TemperatureEventArgs e)
 {
     VM.CameraTemp = e.Temperature;
 }
Example #13
0
 private static void Thermostat_TemperatureMeasuredNotification(object sender, TemperatureEventArgs e)
 {
     decimal temperature = e.Temperature;
 }
Example #14
0
 private void TempSensor_OnTargetTempReceived(object sender, TemperatureEventArgs ea)
 {
     logger.LogWarning("TargetTempUpdated: " + ea.Temperature);
     this.ProcessTempUpdateAsync(ea.Temperature).Wait();
 }
Example #15
0
 void InstrumentClusterElectronics_TemperatureChanged(TemperatureEventArgs e)
 {
     UpdateItems();
 }
Example #16
0
 void m_imager_temperatureEvent(object sender, TemperatureEventArgs e)
 {
 }
Example #17
0
 private void InstrumentClusterElectronics_TemperatureChanged(TemperatureEventArgs e)
 {
     UpdateIKEGauge(GaugeType.CoolantTemperatureBC, e.Coolant);
     UpdateIKEGauge(GaugeType.OutsideTemperature, e.Outside);
 }