FoupListControlPro1.xaml.cs 4.8 KB

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