PumpSpeedControl.xaml.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using MECF.Framework.Common.OperationCenter;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace CyberX8_Themes.UserControls
  17. {
  18. /// <summary>
  19. /// PumpSpeedControl.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class PumpSpeedControl : UserControl
  22. {
  23. public PumpSpeedControl()
  24. {
  25. InitializeComponent();
  26. }
  27. public static readonly DependencyProperty PumpSpeedProperty = DependencyProperty.Register(
  28. "PumpSpeed", typeof(double), typeof(PumpSpeedControl),
  29. new FrameworkPropertyMetadata((double)0, FrameworkPropertyMetadataOptions.AffectsRender));
  30. /// <summary>
  31. /// PumpSpeed
  32. /// </summary>
  33. public double PumpSpeed
  34. {
  35. get
  36. {
  37. return (double)this.GetValue(PumpSpeedProperty);
  38. }
  39. set
  40. {
  41. this.SetValue(PumpSpeedProperty, value);
  42. }
  43. }
  44. private void SetPumpSpeed_Click(object sender, RoutedEventArgs e)
  45. {
  46. InvokeClient.Instance.Service.DoOperation($"Metal.SetPumpSpeed");
  47. }
  48. }
  49. }