using MECF.Framework.Common.CommonData.PUF;
using MECF.Framework.Common.OperationCenter;
using CyberX8_Core;
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
{
///
/// PufStationDistanceControl.xaml 的交互逻辑
///
public partial class PufStationDistanceControl : UserControl
{
public PufStationDistanceControl()
{
InitializeComponent();
}
public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register("ModuleName", typeof(string), typeof(PufStationDistanceControl));
///
/// ModuleName
///
public string ModuleName
{
get
{
return (string)this.GetValue(ModuleNameProperty);
}
set
{
this.SetValue(ModuleNameProperty, value);
}
}
public static readonly DependencyProperty DistanceDataProperty = DependencyProperty.Register("DistanceData", typeof(PufDistanceData), typeof(PufStationDistanceControl));
public PufDistanceData DistanceData
{
get
{
return (PufDistanceData)this.GetValue(DistanceDataProperty);
}
set
{
this.SetValue(DistanceDataProperty, value);
}
}
private void Calibrate_Click(object sender, RoutedEventArgs e)
{
InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Calibrate", "Calibrate", DistanceData.Distance1, DistanceData.Distance2);
}
}
}