private void UserControl_Loaded(object sender, RoutedEventArgs e) { timer_Pulse.Interval = TimeSpan.FromSeconds(2); timer_Pulse.Tick += new EventHandler(timer_Pulse_Tick); if (Config.Mac.PLCIsEnable == "Y") { tbPulse.Text = PLC.ReadNowPulse().ToString(); tbLayer.Text = PLC.ReadNowLay().ToString(); timer_Pulse.Start(); } ShowLayerSet(); ShowLayerTurn(); ShowLasers(); }
void timer_Pulse_Tick(object sender, EventArgs e) { tbPulse.Text = PLC.ReadNowPulse().ToString(); tbLayer.Text = PLC.ReadNowLay().ToString(); }