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 PunkHPX8_Themes.UserControls
{
///
/// PlatingCellCCRControl.xaml 的交互逻辑
///
public partial class PlatingCellCCRControl : UserControl
{
public PlatingCellCCRControl()
{
InitializeComponent();
}
public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
"ModuleName", typeof(string), typeof(PlatingCellCCRControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
///
/// 模块名称
///
public string ModuleName
{
get
{
return (string)this.GetValue(ModuleNameProperty);
}
set
{
this.SetValue(ModuleNameProperty, value);
}
}
public static readonly DependencyProperty StepProperty = DependencyProperty.Register(
"Step", typeof(string), typeof(PlatingCellCCRControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
///
/// Step
///
public string Step
{
get
{
return (string)this.GetValue(StepProperty);
}
set
{
this.SetValue(StepProperty, value);
}
}
public static readonly DependencyProperty SpeedProperty = DependencyProperty.Register(
"Speed", typeof(int), typeof(PlatingCellCCRControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));
///
/// Speed
///
public int Speed
{
get
{
return (int)this.GetValue(SpeedProperty);
}
set
{
this.SetValue(SpeedProperty, value);
}
}
public static readonly DependencyProperty TimeRemainProperty = DependencyProperty.Register(
"TimeRemain", typeof(int), typeof(PlatingCellCCRControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));
///
/// TimeRemain
///
public int TimeRemain
{
get
{
return (int)this.GetValue(TimeRemainProperty);
}
set
{
this.SetValue(TimeRemainProperty, value);
}
}
private void Start_Click(object sender, RoutedEventArgs e)
{
InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ManualCCRStart");
}
private void Stop_Click(object sender, RoutedEventArgs e)
{
InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ManualCCRStop");
}
}
}