|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- using BPASmartClient.Helper;
- using FryPot_DosingSystem.ViewModel;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
-
- namespace FryPot_DosingSystem.View
- {
- /// <summary>
- /// HardWareStatusView.xaml 的交互逻辑
- /// </summary>
- public partial class HardWareStatusView : UserControl
- {
- public HardWareStatusView()
- {
- InitializeComponent();
- this.DataContext = HardWareStatusViewModel.GetInstance;
- //ActionManage.GetInstance.Register(new Action<object>((a) =>
- //{
- // switch (a)
- // {
- // case 1: gsGreen1.Color = Color.FromRgb(130, 232, 139);break;
- // case 2: gsGreen2.Color = Color.FromRgb(130, 232, 139); break;
- // case 3: gsGreen3.Color = Color.FromRgb(130, 232, 139); break;
- // case 4: gsGreen4.Color = Color.FromRgb(130, 232, 139); break;
- // }
-
- //}), "ToGreen");
- //ActionManage.GetInstance.Register(new Action<object>((a) =>
- //{
- // switch (a)
- // {
- // case 1: gsRed1.Color = Color.FromRgb(243, 165, 230); break;
- // case 2: gsRed2.Color = Color.FromRgb(243, 165, 230); break;
- // case 3: gsRed3.Color = Color.FromRgb(243, 165, 230); break;
- // case 4: gsRed4.Color = Color.FromRgb(243, 165, 230); break;
- // }
-
- //}), "ToRed");
- //ActionManage.GetInstance.Register(new Action<object>((a) =>
- //{
- // switch (a)
- // {
- // case 1: gsGreen1.Color = Color.FromRgb(84,84,84); break;
- // case 2: gsGreen2.Color = Color.FromRgb(84,84,84); break;
- // case 3: gsGreen3.Color = Color.FromRgb(84,84,84); break;
- // case 4: gsGreen4.Color = Color.FromRgb(84,84,84); break;
- // }
-
- //}), "GreenToGray");
- //ActionManage.GetInstance.Register(new Action<object>((a) =>
- //{
- // switch (a)
- // {
- // case 1: gsRed1.Color = Color.FromRgb(84,84,84); break;
- // case 2: gsRed2.Color = Color.FromRgb(84,84,84); break;
- // case 3: gsRed3.Color = Color.FromRgb(84,84,84); break;
- // case 4: gsRed4.Color = Color.FromRgb(84,84,84); break;
- // }
-
- //}), "RedToGray");
-
- }
- }
- }
|