终端一体化运控平台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

123 rader
4.9 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace BPASmartClient.CustomResource.Pages.View
  16. {
  17. /// <summary>
  18. /// VariableConfigView.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class VariableConfigView : UserControl
  21. {
  22. public VariableConfigView()
  23. {
  24. InitializeComponent();
  25. }
  26. private void DataGrid_LoadingRow(object sender, DataGridRowEventArgs e)
  27. {
  28. e.Row.Header = e.Row.GetIndex() + 1;
  29. }
  30. private void fryOne_LoadingRow(object sender, DataGridRowEventArgs e)
  31. {
  32. e.Row.Header = e.Row.GetIndex() + 1;
  33. }
  34. private void fryTwo_LoadingRow(object sender, DataGridRowEventArgs e)
  35. {
  36. e.Row.Header = e.Row.GetIndex() + 1;
  37. }
  38. private void fryThree_LoadingRow(object sender, DataGridRowEventArgs e)
  39. {
  40. e.Row.Header = e.Row.GetIndex() + 1;
  41. }
  42. private void fryFour_LoadingRow(object sender, DataGridRowEventArgs e)
  43. {
  44. e.Row.Header = e.Row.GetIndex() + 1;
  45. }
  46. private void fryFive_LoadingRow(object sender, DataGridRowEventArgs e)
  47. {
  48. e.Row.Header = e.Row.GetIndex() + 1;
  49. }
  50. private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
  51. {
  52. ComboBox cbo= sender as ComboBox;
  53. if (cbo != null&&GT!=null&&fryOne!=null&&fryTwo!=null&&fryThree!=null&&fryFour!=null&&fryFive!=null)
  54. {
  55. switch (cbo.SelectedValue)
  56. {
  57. case "滚筒输送线":
  58. this.GT.Visibility = Visibility.Visible;
  59. this.fryOne.Visibility = Visibility.Collapsed;
  60. this.fryTwo.Visibility = Visibility.Collapsed;
  61. this.fryThree.Visibility = Visibility.Collapsed;
  62. this.fryFour.Visibility = Visibility.Collapsed;
  63. this.fryFive.Visibility = Visibility.Collapsed;
  64. break;
  65. case "炒锅1":
  66. this.GT.Visibility = Visibility.Collapsed;
  67. this.fryOne.Visibility = Visibility.Visible;
  68. this.fryTwo.Visibility = Visibility.Collapsed;
  69. this.fryThree.Visibility = Visibility.Collapsed;
  70. this.fryFour.Visibility = Visibility.Collapsed;
  71. this.fryFive.Visibility = Visibility.Collapsed;
  72. break;
  73. case "炒锅2":
  74. this.GT.Visibility = Visibility.Collapsed;
  75. this.fryOne.Visibility = Visibility.Collapsed;
  76. this.fryTwo.Visibility = Visibility.Visible;
  77. this.fryThree.Visibility = Visibility.Collapsed;
  78. this.fryFour.Visibility = Visibility.Collapsed;
  79. this.fryFive.Visibility = Visibility.Collapsed;
  80. break;
  81. case "炒锅3":
  82. this.GT.Visibility = Visibility.Collapsed;
  83. this.fryOne.Visibility = Visibility.Collapsed;
  84. this.fryTwo.Visibility = Visibility.Collapsed;
  85. this.fryThree.Visibility = Visibility.Visible;
  86. this.fryFour.Visibility = Visibility.Collapsed;
  87. this.fryFive.Visibility = Visibility.Collapsed;
  88. break;
  89. case "炒锅4":
  90. this.GT.Visibility = Visibility.Collapsed;
  91. this.fryOne.Visibility = Visibility.Collapsed;
  92. this.fryTwo.Visibility = Visibility.Collapsed;
  93. this.fryThree.Visibility = Visibility.Collapsed;
  94. this.fryFour.Visibility = Visibility.Visible;
  95. this.fryFive.Visibility = Visibility.Collapsed;
  96. break;
  97. case "炒锅5":
  98. this.GT.Visibility = Visibility.Collapsed;
  99. this.fryOne.Visibility = Visibility.Collapsed;
  100. this.fryTwo.Visibility = Visibility.Collapsed;
  101. this.fryThree.Visibility = Visibility.Collapsed;
  102. this.fryFour.Visibility = Visibility.Collapsed;
  103. this.fryFive.Visibility = Visibility.Visible;
  104. break;
  105. }
  106. }
  107. }
  108. }
  109. }