CassetteTopView.xaml.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using MECF.Framework.UI.Client.Annotations;
  2. using System;
  3. using System.ComponentModel;
  4. using System.Runtime.CompilerServices;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Media;
  8. using System.Windows.Media.Imaging;
  9. using MECF.Framework.Common.SubstrateTrackings;
  10. namespace MECF.Framework.UI.Client.Ctrlib.UnitControls
  11. {
  12. /// <summary>
  13. /// CassetteTopView.xaml 的交互逻辑
  14. /// </summary>
  15. public partial class CassetteTopView : UserControl, INotifyPropertyChanged
  16. {
  17. public string CarrierModule
  18. {
  19. get { return (string)GetValue(CarrierModuleProperty); }
  20. set
  21. {
  22. SetValue(CarrierModuleProperty, value);
  23. }
  24. }
  25. public static readonly DependencyProperty CarrierModuleProperty =
  26. DependencyProperty.Register("CarrierModule", typeof(string), typeof(CassetteTopView), new PropertyMetadata("System"));
  27. public int CarrierSlot
  28. {
  29. get { return (int)GetValue(CarrierSlotProperty); }
  30. set
  31. {
  32. SetValue(CarrierSlotProperty, value);
  33. }
  34. }
  35. public static readonly DependencyProperty CarrierSlotProperty =
  36. DependencyProperty.Register("CarrierSlot", typeof(int), typeof(CassetteTopView), new PropertyMetadata(0));
  37. public CarrierInfo CarrierData
  38. {
  39. get { return (CarrierInfo)GetValue(CarrierDataProperty); }
  40. set
  41. {
  42. SetValue(CarrierDataProperty, value);
  43. }
  44. }
  45. public static readonly DependencyProperty CarrierDataProperty =
  46. DependencyProperty.Register("CarrierData", typeof(CarrierInfo), typeof(CassetteTopView), new PropertyMetadata(new CarrierInfo(1)));
  47. public CassetteTopView()
  48. {
  49. InitializeComponent();
  50. }
  51. public event PropertyChangedEventHandler PropertyChanged;
  52. [NotifyPropertyChangedInvocator]
  53. protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
  54. {
  55. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  56. }
  57. static void PropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
  58. {
  59. }
  60. protected override void OnRender(DrawingContext drawingContext)
  61. {
  62. base.OnRender(drawingContext);
  63. }
  64. }
  65. }