FoupListControl.xaml.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. using Aitex.Sorter.UI.Controls;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Windows;
  5. using System.Windows.Controls;
  6. using System.Windows.Input;
  7. namespace EfemUI.Controls
  8. {
  9. /// <summary>
  10. /// FoupControl.xaml 的交互逻辑
  11. /// </summary>
  12. public partial class FoupListControl : UserControl
  13. {
  14. public FoupListControl()
  15. {
  16. InitializeComponent();
  17. root.DataContext = this;
  18. }
  19. public bool IsSlotShowOpposite
  20. {
  21. get { return (bool)GetValue(IsSlotShowOppositeProperty); }
  22. set { SetValue(IsSlotShowOppositeProperty, value); }
  23. }
  24. // Using a DependencyProperty as the backing store for IsSlotShowOpposite. This enables animation, styling, binding, etc...
  25. public static readonly DependencyProperty IsSlotShowOppositeProperty =
  26. DependencyProperty.Register("IsSlotShowOpposite", typeof(bool), typeof(FoupListControl), new PropertyMetadata(false));
  27. public bool IsEnableTextMenu
  28. {
  29. get { return (bool)GetValue(IsEnableTextMenuProperty); }
  30. set { SetValue(IsEnableTextMenuProperty, value); }
  31. }
  32. // Using a DependencyProperty as the backing store for IsEnableTextMenu. This enables animation, styling, binding, etc...
  33. public static readonly DependencyProperty IsEnableTextMenuProperty =
  34. DependencyProperty.Register("IsEnableTextMenu", typeof(bool), typeof(FoupListControl), new PropertyMetadata(true));
  35. public int FoupCount
  36. {
  37. get
  38. {
  39. return FoupList.Count();
  40. }
  41. }
  42. public IEnumerable<FoupListItem> FoupList
  43. {
  44. get { return (IEnumerable<FoupListItem>)GetValue(FoupListProperty); }
  45. set { SetValue(FoupListProperty, value); }
  46. }
  47. // Using a DependencyProperty as the backing store for FoupList. This enables animation, styling, binding, etc...
  48. public static readonly DependencyProperty FoupListProperty =
  49. DependencyProperty.Register("FoupList", typeof(IEnumerable<FoupListItem>), typeof(FoupListControl), null);
  50. public ICommand LoadPortCommand
  51. {
  52. get { return (ICommand)GetValue(LoadPortCommandProperty); }
  53. set { SetValue(LoadPortCommandProperty, value); }
  54. }
  55. // Using a DependencyProperty as the backing store for LoadportCommand. This enables animation, styling, binding, etc...
  56. public static readonly DependencyProperty LoadPortCommandProperty =
  57. DependencyProperty.Register("LoadPortCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  58. public ICommand MapCommand
  59. {
  60. get { return (ICommand)GetValue(MapCommandProperty); }
  61. set { SetValue(MapCommandProperty, value); }
  62. }
  63. // Using a DependencyProperty as the backing store for MapCommand. This enables animation, styling, binding, etc...
  64. public static readonly DependencyProperty MapCommandProperty =
  65. DependencyProperty.Register("MapCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  66. public ICommand WaferTransferCommand
  67. {
  68. get { return (ICommand)GetValue(WaferTransferCommandProperty); }
  69. set { SetValue(WaferTransferCommandProperty, value); }
  70. }
  71. // Using a DependencyProperty as the backing store for WaferMovementCommand. This enables animation, styling, binding, etc...
  72. public static readonly DependencyProperty WaferTransferCommandProperty =
  73. DependencyProperty.Register("WaferTransferCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  74. public ICommand WaferTransferOptionCommand
  75. {
  76. get { return (ICommand)GetValue(WaferTransferOptionCommandProperty); }
  77. set { SetValue(WaferTransferOptionCommandProperty, value); }
  78. }
  79. // Using a DependencyProperty as the backing store for WaferTransferOptionCommand. This enables animation, styling, binding, etc...
  80. public static readonly DependencyProperty WaferTransferOptionCommandProperty =
  81. DependencyProperty.Register("WaferTransferOptionCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  82. public bool ShowMap
  83. {
  84. get { return (bool)GetValue(ShowMapProperty); }
  85. set { SetValue(ShowMapProperty, value); }
  86. }
  87. // Using a DependencyProperty as the backing store for ShowAction. This enables animation, styling, binding, etc...
  88. public static readonly DependencyProperty ShowMapProperty =
  89. DependencyProperty.Register("ShowMap", typeof(bool), typeof(FoupListControl), new PropertyMetadata(true));
  90. public bool ShowAction
  91. {
  92. get { return (bool)GetValue(ShowActionProperty); }
  93. set { SetValue(ShowActionProperty, value); }
  94. }
  95. public bool ShowControl
  96. {
  97. get { return (bool)GetValue(ShowControlProperty); }
  98. set
  99. {
  100. SetValue(ShowControlProperty, value);
  101. }
  102. }
  103. public static readonly DependencyProperty ShowControlProperty =
  104. DependencyProperty.Register("ShowControl", typeof(bool), typeof(FoupListControl), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.None));
  105. // Using a DependencyProperty as the backing store for ShowAction. This enables animation, styling, binding, etc...
  106. public static readonly DependencyProperty ShowActionProperty =
  107. DependencyProperty.Register("ShowAction", typeof(bool), typeof(FoupListControl), new PropertyMetadata(true));
  108. public bool IsEnableMap
  109. {
  110. get { return (bool)GetValue(IsEnableMapProperty); }
  111. set { SetValue(IsEnableMapProperty, value); }
  112. }
  113. public static readonly DependencyProperty IsEnableMapProperty =
  114. DependencyProperty.Register("IsEnableMap", typeof(bool), typeof(FoupListControl), new PropertyMetadata(true));
  115. }
  116. }