SimpleAGCCard.xaml.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using NEIntelligentControl2.Models.AGC;
  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 NEIntelligentControl2.Views.AGC
  17. {
  18. /// <summary>
  19. /// 简单AGC卡片
  20. /// </summary>
  21. public partial class SimpleAGCCard : UserControl
  22. {
  23. /// <summary>
  24. /// 场站名称
  25. /// </summary>
  26. public string StationName { get; set; }
  27. // ---------依赖属性-----------
  28. public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(SimpleAGCCard));
  29. public static readonly DependencyProperty PowerActualProperty = DependencyProperty.Register("PowerActual", typeof(string), typeof(SimpleAGCCard));
  30. public static readonly DependencyProperty PowerSetProperty = DependencyProperty.Register("PowerSet", typeof(string), typeof(SimpleAGCCard));
  31. /// <summary>
  32. /// 场站标题
  33. /// </summary>
  34. public string Title { get => GetValue(TitleProperty) as string; set => SetValue(TitleProperty, value); }
  35. /// <summary>
  36. /// 实发有功
  37. /// </summary>
  38. public string PowerActual { get => GetValue(PowerActualProperty) as string; set => SetValue(PowerActualProperty, value); }
  39. /// <summary>
  40. /// 有功设定
  41. /// </summary>
  42. public string PowerSet { get => GetValue(PowerSetProperty) as string; set => SetValue(PowerSetProperty, value); }
  43. public AGCInfo AGCInfo { get; set; }
  44. public SimpleAGCCard(AGCInfo ai)
  45. {
  46. InitializeComponent();
  47. AGCInfo = ai;
  48. if (ai != null)
  49. {
  50. Title = ai.Title;
  51. }
  52. }
  53. }
  54. }