终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

77 řádky
2.8 KiB

  1. using BPA.Helper;
  2. using FryPot_DosingSystem.ViewModel;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace FryPot_DosingSystem.View
  18. {
  19. /// <summary>
  20. /// HardWareStatusView.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class HardWareStatusView : UserControl
  23. {
  24. public HardWareStatusView()
  25. {
  26. InitializeComponent();
  27. this.DataContext = HardWareStatusViewModel.GetInstance;
  28. //ActionManage.GetInstance.Register(new Action<object>((a) =>
  29. //{
  30. // switch (a)
  31. // {
  32. // case 1: gsGreen1.Color = Color.FromRgb(130, 232, 139);break;
  33. // case 2: gsGreen2.Color = Color.FromRgb(130, 232, 139); break;
  34. // case 3: gsGreen3.Color = Color.FromRgb(130, 232, 139); break;
  35. // case 4: gsGreen4.Color = Color.FromRgb(130, 232, 139); break;
  36. // }
  37. //}), "ToGreen");
  38. //ActionManage.GetInstance.Register(new Action<object>((a) =>
  39. //{
  40. // switch (a)
  41. // {
  42. // case 1: gsRed1.Color = Color.FromRgb(243, 165, 230); break;
  43. // case 2: gsRed2.Color = Color.FromRgb(243, 165, 230); break;
  44. // case 3: gsRed3.Color = Color.FromRgb(243, 165, 230); break;
  45. // case 4: gsRed4.Color = Color.FromRgb(243, 165, 230); break;
  46. // }
  47. //}), "ToRed");
  48. //ActionManage.GetInstance.Register(new Action<object>((a) =>
  49. //{
  50. // switch (a)
  51. // {
  52. // case 1: gsGreen1.Color = Color.FromRgb(84,84,84); break;
  53. // case 2: gsGreen2.Color = Color.FromRgb(84,84,84); break;
  54. // case 3: gsGreen3.Color = Color.FromRgb(84,84,84); break;
  55. // case 4: gsGreen4.Color = Color.FromRgb(84,84,84); break;
  56. // }
  57. //}), "GreenToGray");
  58. //ActionManage.GetInstance.Register(new Action<object>((a) =>
  59. //{
  60. // switch (a)
  61. // {
  62. // case 1: gsRed1.Color = Color.FromRgb(84,84,84); break;
  63. // case 2: gsRed2.Color = Color.FromRgb(84,84,84); break;
  64. // case 3: gsRed3.Color = Color.FromRgb(84,84,84); break;
  65. // case 4: gsRed4.Color = Color.FromRgb(84,84,84); break;
  66. // }
  67. //}), "RedToGray");
  68. }
  69. }
  70. }