添加项目文件。
This commit is contained in:
122
CapMachine.Shared/Controls/MeterConfig.xaml.cs
Normal file
122
CapMachine.Shared/Controls/MeterConfig.xaml.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
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 CapMachine.Shared.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// MeterConfig.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MeterConfig : UserControl
|
||||
{
|
||||
public MeterConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string MeterName
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)base.GetValue(MeterConfig.MeterNameProperty);
|
||||
}
|
||||
set
|
||||
{
|
||||
base.SetValue(MeterConfig.MeterNameProperty, value);
|
||||
}
|
||||
}
|
||||
public static readonly DependencyProperty MeterNameProperty = DependencyProperty.Register("MeterName", typeof(string), typeof(MeterConfig), new PropertyMetadata("速度"));
|
||||
|
||||
|
||||
//MeterSlopCell
|
||||
public object SelectedMeter
|
||||
{
|
||||
get
|
||||
{
|
||||
return (MeterSlopCell)base.GetValue(MeterConfig.SelectedMeterProperty);
|
||||
}
|
||||
set
|
||||
{
|
||||
base.SetValue(MeterConfig.SelectedMeterProperty, value);
|
||||
}
|
||||
}
|
||||
public static readonly DependencyProperty SelectedMeterProperty = DependencyProperty.Register("SelectedMeter", typeof(object), typeof(MeterConfig), new PropertyMetadata(null));
|
||||
|
||||
|
||||
//MeterSlopCell
|
||||
public IEnumerable ListMeter
|
||||
{
|
||||
get
|
||||
{
|
||||
return (IEnumerable)base.GetValue(MeterConfig.ListMeterProperty);
|
||||
}
|
||||
set
|
||||
{
|
||||
base.SetValue(MeterConfig.ListMeterProperty, value);
|
||||
}
|
||||
}
|
||||
public static readonly DependencyProperty ListMeterProperty = DependencyProperty.Register("ListMeter", typeof(IEnumerable), typeof(MeterConfig), new PropertyMetadata(null));
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Add 命令
|
||||
/// </summary>
|
||||
public ICommand AddCommand
|
||||
{
|
||||
get { return (ICommand)GetValue(AddCommandProperty); }
|
||||
set { SetValue(AddCommandProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty AddCommandProperty =
|
||||
DependencyProperty.Register("AddCommand", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
|
||||
|
||||
/// <summary>
|
||||
/// Edit 命令
|
||||
/// </summary>
|
||||
public ICommand EditCommand
|
||||
{
|
||||
get { return (ICommand)GetValue(EditCommandProperty); }
|
||||
set { SetValue(EditCommandProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty EditCommandProperty =
|
||||
DependencyProperty.Register("EditCommand", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
|
||||
|
||||
/// <summary>
|
||||
/// Delete 命令
|
||||
/// </summary>
|
||||
public ICommand DeleteCommand
|
||||
{
|
||||
get { return (ICommand)GetValue(DeleteCommandProperty); }
|
||||
set { SetValue(DeleteCommandProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty DeleteCommandProperty =
|
||||
DependencyProperty.Register("DeleteCommand", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
|
||||
|
||||
|
||||
//MeterSelectedChangedCmd
|
||||
/// <summary>
|
||||
/// Add 命令
|
||||
/// </summary>
|
||||
public ICommand MeterSelectedChangedCmd
|
||||
{
|
||||
get { return (ICommand)GetValue(MeterSelectedChangedCmdProperty); }
|
||||
set { SetValue(MeterSelectedChangedCmdProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty MeterSelectedChangedCmdProperty =
|
||||
DependencyProperty.Register("MeterSelectedChangedCmd", typeof(ICommand), typeof(MeterConfig), new PropertyMetadata(default(ICommand)));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user