using MECF.Framework.Common.CommonData.SRD; using MECF.Framework.Common.OperationCenter; 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 CyberX8_Themes.UserControls { /// /// SRDFlipperControl.xaml 的交互逻辑 /// public partial class SRDFlipperControl : UserControl { public SRDFlipperControl() { InitializeComponent(); } public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register( "ModuleName", typeof(string), typeof(SRDFlipperControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender)); /// /// 模块名称 /// public string ModuleName { get { return (string)this.GetValue(ModuleNameProperty); } set { this.SetValue(ModuleNameProperty, value); } } public static readonly DependencyProperty CommonDataProperty = DependencyProperty.Register( "CommonData", typeof(SrdCommonData), typeof(SRDFlipperControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// CommonData /// public SrdCommonData CommonData { get { return (SrdCommonData)this.GetValue(CommonDataProperty); } set { this.SetValue(CommonDataProperty, value); } } #region Operation private void FlipperIn150_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.FlipperIn", 150); } private void FlipperOut150_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.FlipperOut", 150); } private void FlipperIn200_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.FlipperIn", 200); } private void FlipperOut200_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.FlipperOut", 200); } //private void FlipperIn100_Click(object sender, RoutedEventArgs e) //{ // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.FlipperIn", 100); //} //private void FlipperOut100_Click(object sender, RoutedEventArgs e) //{ // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.FlipperOut", 100); //} #endregion } }