HeaterControl.xaml.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using Aitex.Core.Common.DeviceData;
  2. using MECF.Framework.Common.OperationCenter;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace FurnaceUI.Controls
  18. {
  19. /// <summary>
  20. /// HeaterControl.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class HeaterControl : UserControl
  23. {
  24. public HeaterControl()
  25. {
  26. InitializeComponent();
  27. }
  28. public static readonly DependencyProperty CommandProperty = DependencyProperty.Register(
  29. "Command", typeof(ICommand), typeof(HeaterControl),
  30. new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
  31. public static readonly DependencyProperty DeviceDataProperty = DependencyProperty.Register(
  32. "DeviceData", typeof(AITHeaterData), typeof(HeaterControl),
  33. new FrameworkPropertyMetadata(new AITHeaterData(), FrameworkPropertyMetadataOptions.AffectsRender));
  34. public AITHeaterData DeviceData
  35. {
  36. get
  37. {
  38. return (AITHeaterData)this.GetValue(DeviceDataProperty);
  39. }
  40. set
  41. {
  42. this.SetValue(DeviceDataProperty, value);
  43. }
  44. }
  45. public ICommand Command
  46. {
  47. get
  48. {
  49. return (ICommand)this.GetValue(CommandProperty);
  50. }
  51. set
  52. {
  53. this.SetValue(CommandProperty, value);
  54. }
  55. }
  56. protected override void OnRender(DrawingContext drawingContext)
  57. {
  58. base.OnRender(drawingContext);
  59. }
  60. }
  61. }