12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- 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
- {
- /// <summary>
- /// SRDFlipperControl.xaml 的交互逻辑
- /// </summary>
- public partial class SRDFlipperControl : UserControl
- {
- public SRDFlipperControl()
- {
- InitializeComponent();
- }
- public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
- "ModuleName", typeof(string), typeof(SRDFlipperControl),
- new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// 模块名称
- /// </summary>
- 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));
- /// <summary>
- /// CommonData
- /// </summary>
- 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
- }
- }
|