using NEIntelligentControl2.Models.AGC; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; 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 NEIntelligentControl2.Views.AGC { /// /// 简单AGC卡片 /// public partial class SimpleAGCCard : UserControl { /// /// 场站名称 /// public string StationName { get; set; } // ---------依赖属性----------- public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(SimpleAGCCard)); public static readonly DependencyProperty PowerActualProperty = DependencyProperty.Register("PowerActual", typeof(string), typeof(SimpleAGCCard)); public static readonly DependencyProperty PowerSetProperty = DependencyProperty.Register("PowerSet", typeof(string), typeof(SimpleAGCCard)); /// /// 场站标题 /// public string Title { get => GetValue(TitleProperty) as string; set => SetValue(TitleProperty, value); } /// /// 实发有功 /// public string PowerActual { get => GetValue(PowerActualProperty) as string; set => SetValue(PowerActualProperty, value); } /// /// 有功设定 /// public string PowerSet { get => GetValue(PowerSetProperty) as string; set => SetValue(PowerSetProperty, value); } public AGCInfo AGCInfo { get; set; } public SimpleAGCCard(AGCInfo ai) { InitializeComponent(); AGCInfo = ai; if (ai != null) { Title = ai.Title; } } } }