FoupListControl.xaml.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 FoupListControl : UserControl
  27. {
  28. public FoupListControl()
  29. {
  30. InitializeComponent();
  31. root.DataContext = this;
  32. }
  33. public IEnumerable<FoupListItem> FoupList
  34. {
  35. get { return (IEnumerable<FoupListItem>)GetValue(FoupListProperty); }
  36. set { SetValue(FoupListProperty, value); }
  37. }
  38. // Using a DependencyProperty as the backing store for FoupList. This enables animation, styling, binding, etc...
  39. public static readonly DependencyProperty FoupListProperty =
  40. DependencyProperty.Register("FoupList", typeof(IEnumerable<FoupListItem>), typeof(FoupListControl), null);
  41. public ICommand LoadPortCommand
  42. {
  43. get { return (ICommand)GetValue(LoadPortCommandProperty); }
  44. set { SetValue(LoadPortCommandProperty, value); }
  45. }
  46. // Using a DependencyProperty as the backing store for LoadportCommand. This enables animation, styling, binding, etc...
  47. public static readonly DependencyProperty LoadPortCommandProperty =
  48. DependencyProperty.Register("LoadPortCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  49. public ICommand MapCommand
  50. {
  51. get { return (ICommand)GetValue(MapCommandProperty); }
  52. set { SetValue(MapCommandProperty, value); }
  53. }
  54. // Using a DependencyProperty as the backing store for MapCommand. This enables animation, styling, binding, etc...
  55. public static readonly DependencyProperty MapCommandProperty =
  56. DependencyProperty.Register("MapCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  57. public ICommand WaferTransferCommand
  58. {
  59. get { return (ICommand)GetValue(WaferTransferCommandProperty); }
  60. set { SetValue(WaferTransferCommandProperty, value); }
  61. }
  62. // Using a DependencyProperty as the backing store for WaferMovementCommand. This enables animation, styling, binding, etc...
  63. public static readonly DependencyProperty WaferTransferCommandProperty =
  64. DependencyProperty.Register("WaferTransferCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  65. public ICommand WaferTransferOptionCommand
  66. {
  67. get { return (ICommand)GetValue(WaferTransferOptionCommandProperty); }
  68. set { SetValue(WaferTransferOptionCommandProperty, value); }
  69. }
  70. // Using a DependencyProperty as the backing store for WaferTransferOptionCommand. This enables animation, styling, binding, etc...
  71. public static readonly DependencyProperty WaferTransferOptionCommandProperty =
  72. DependencyProperty.Register("WaferTransferOptionCommand", typeof(ICommand), typeof(FoupListControl), new PropertyMetadata(null));
  73. public bool ShowAction
  74. {
  75. get { return (bool)GetValue(ShowActionProperty); }
  76. set { SetValue(ShowActionProperty, value); }
  77. }
  78. public bool ShowControl
  79. {
  80. get { return (bool)GetValue(ShowControlProperty); }
  81. set
  82. {
  83. SetValue(ShowControlProperty, value);
  84. }
  85. }
  86. public static readonly DependencyProperty ShowControlProperty =
  87. DependencyProperty.Register("ShowControl", typeof(bool), typeof(FoupListControl), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.None));
  88. // Using a DependencyProperty as the backing store for ShowAction. This enables animation, styling, binding, etc...
  89. public static readonly DependencyProperty ShowActionProperty =
  90. DependencyProperty.Register("ShowAction", typeof(bool), typeof(FoupListControl), new PropertyMetadata(true));
  91. public bool IsEnableMap
  92. {
  93. get { return (bool)GetValue(IsEnableMapProperty); }
  94. set { SetValue(IsEnableMapProperty, value); }
  95. }
  96. public static readonly DependencyProperty IsEnableMapProperty =
  97. DependencyProperty.Register("IsEnableMap", typeof(bool), typeof(FoupListControl), new PropertyMetadata(true));
  98. }
  99. }