using Aitex.Core.Common; using Aitex.Sorter.Common; using Aitex.Sorter.UI.Controls; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Aitex.Sorter.UI.Controls { /// /// FoupControl.xaml 的交互逻辑 /// public partial class FoupListControlPro : UserControl { public FoupListControlPro() { InitializeComponent(); root.DataContext = this; } public int FoupCount { get { return FoupList.Count(); } } public IEnumerable FoupList { get { return (IEnumerable)GetValue(FoupListProperty); } set { SetValue(FoupListProperty, value); } } // Using a DependencyProperty as the backing store for FoupList. This enables animation, styling, binding, etc... public static readonly DependencyProperty FoupListProperty = DependencyProperty.Register("FoupList", typeof(IEnumerable), typeof(FoupListControlPro), null); public ICommand LoadPortCommand { get { return (ICommand)GetValue(LoadPortCommandProperty); } set { SetValue(LoadPortCommandProperty, value); } } // Using a DependencyProperty as the backing store for LoadportCommand. This enables animation, styling, binding, etc... public static readonly DependencyProperty LoadPortCommandProperty = DependencyProperty.Register("LoadPortCommand", typeof(ICommand), typeof(FoupListControlPro), new PropertyMetadata(null)); public ICommand MapCommand { get { return (ICommand)GetValue(MapCommandProperty); } set { SetValue(MapCommandProperty, value); } } // Using a DependencyProperty as the backing store for MapCommand. This enables animation, styling, binding, etc... public static readonly DependencyProperty MapCommandProperty = DependencyProperty.Register("MapCommand", typeof(ICommand), typeof(FoupListControlPro), new PropertyMetadata(null)); public ICommand WaferTransferCommand { get { return (ICommand)GetValue(WaferTransferCommandProperty); } set { SetValue(WaferTransferCommandProperty, value); } } // Using a DependencyProperty as the backing store for WaferMovementCommand. This enables animation, styling, binding, etc... public static readonly DependencyProperty WaferTransferCommandProperty = DependencyProperty.Register("WaferTransferCommand", typeof(ICommand), typeof(FoupListControlPro), new PropertyMetadata(null)); public ICommand WaferTransferOptionCommand { get { return (ICommand)GetValue(WaferTransferOptionCommandProperty); } set { SetValue(WaferTransferOptionCommandProperty, value); } } // Using a DependencyProperty as the backing store for WaferTransferOptionCommand. This enables animation, styling, binding, etc... public static readonly DependencyProperty WaferTransferOptionCommandProperty = DependencyProperty.Register("WaferTransferOptionCommand", typeof(ICommand), typeof(FoupListControlPro), new PropertyMetadata(null)); public bool ShowAction { get { return (bool)GetValue(ShowActionProperty); } set { SetValue(ShowActionProperty, value); } } public bool ShowControl { get { return (bool)GetValue(ShowControlProperty); } set { SetValue(ShowControlProperty, value); } } public static readonly DependencyProperty ShowControlProperty = DependencyProperty.Register("ShowControl", typeof(bool), typeof(FoupListControlPro), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.None)); // Using a DependencyProperty as the backing store for ShowAction. This enables animation, styling, binding, etc... public static readonly DependencyProperty ShowActionProperty = DependencyProperty.Register("ShowAction", typeof(bool), typeof(FoupListControlPro), new PropertyMetadata(true)); public bool IsEnableMap { get { return (bool)GetValue(IsEnableMapProperty); } set { SetValue(IsEnableMapProperty, value); } } public static readonly DependencyProperty IsEnableMapProperty = DependencyProperty.Register("IsEnableMap", typeof(bool), typeof(FoupListControlPro), new PropertyMetadata(true)); } }