private void Window_Loaded(object sender, RoutedEventArgs e) { productLines = Properties.Settings.Default.ProductLines.Split(',').ToList(); initPage(); currenttime = new System.Windows.Threading.DispatcherTimer(); currenttime.Tick += new EventHandler(ShowCurrentTime); currenttime.Interval = new TimeSpan(0, 0, 0, 1); currenttime.Start(); timer = new System.Timers.Timer(); ((System.ComponentModel.ISupportInitialize)(this.timer)).BeginInit(); timer.Enabled = false; timer.Interval = BaseConfig.KanbanTimerInterval; timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); ((System.ComponentModel.ISupportInitialize)(this.timer)).EndInit(); timer.Start(); LampUtil.TurnNormal(); if (Properties.Settings.Default.OnTest) { test_btn_Checked(null, null); } else { test_btn_Unchecked(null, null); } }
private void Grid_Row_Color(object sender, DataGridRowEventArgs e) { ProductionPlan products = (ProductionPlan)e.Row.DataContext; Storyboard colorboard = new Storyboard(); if (products.Status.Equals("警报")) { e.Row.Background = hightlightBrush; // this.Dispatcher.Invoke(DispatcherPriority.Normal, (MethodInvoker)delegate() //{ locked = true; LampUtil.TurnOn(); ids.Add(products.Id); //}); } else if (products.Status.Equals("生产完")) { e.Row.Background = okBrush; } else if (products.Status.Equals("已确认")) { e.Row.Background = orangeBrush; } else { e.Row.Background = normalBrush; } }
private void Window_KeyUp(object sender, KeyEventArgs e) { // test push devise if (e.Key.Equals(Key.X)) { LampUtil.TurnNormal(); } KeyLabel.Content = e.Key; }
private void Window_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { // test push devise if (e.Key.Equals(Key.X)) { //this.Dispatcher.Invoke(DispatcherPriority.Normal, (MethodInvoker)delegate() //{ LampUtil.TurnNormal(); locked = false; //}); AppService app = new AppService(); if (ids.Count > 0) { app.ConfirmPlans(ids); initPage(); } } // KeyLabel.Content = e.Key; }
private void TurnOff_Click(object sender, RoutedEventArgs e) { LampUtil.TurnNormal(); }
private void TurnOnBtn_Click(object sender, RoutedEventArgs e) { LampUtil.TurnOn(); }