FoupListControlPro.xaml.cs 4.5 KB

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