首次上传
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Media;
|
||||
using ExtendedGrid.Microsoft.Windows.Controls;
|
||||
using MECF.Framework.Common.Account;
|
||||
using MECF.Framework.Common.Account.Permissions;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public interface IParam
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前参数所属列名称。
|
||||
/// </summary>
|
||||
string DisplayName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数的控制名称。
|
||||
/// <remarks>
|
||||
/// 对应RecipeFormat.xml文件中的ControlName。
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
string ControlName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前参数所属的配方步骤。
|
||||
/// </summary>
|
||||
RecipeStep Parent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前参数在表格中的所属行。
|
||||
/// </summary>
|
||||
DataGridRow RowOwner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前参数在表格中的所属列。
|
||||
/// </summary>
|
||||
DataGridColumn ColumnOwner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回前序参数。
|
||||
/// </summary>
|
||||
IParam Previous { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回后序参数。
|
||||
/// </summary>
|
||||
IParam Next { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数所属步骤的访问权限。
|
||||
/// </summary>
|
||||
public MenuPermissionEnum StepPermission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数所属列的访问权限。
|
||||
/// </summary>
|
||||
public MenuPermissionEnum ColumnPermission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数的访问权限。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 访问权限由当前参数所在的列和步骤共同决定。权限数值越小优先级越高。
|
||||
/// </remarks>
|
||||
public MenuPermissionEnum Permission { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回是否在编辑器中隐藏参数值。
|
||||
/// </summary>
|
||||
public bool IsHideValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回参数值隐藏时的替代符号。
|
||||
/// </summary>
|
||||
public string HiddenValueMasking { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数是否被禁用。
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前参数是否已保存。
|
||||
/// </summary>
|
||||
bool IsSaved { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数的数值是否和前序参数的数值相等。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 该属性用于渲染DataGrid单元格文本颜色,当不等于前序参数数值时,当前参数显示为绿色。
|
||||
/// </remarks>
|
||||
bool IsEqualsToPrevious { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前参数是否校验成功。
|
||||
/// </summary>
|
||||
bool IsValid { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前参数校验错误信息。
|
||||
/// </summary>
|
||||
string ValidationError { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回计算器是否校验成功。
|
||||
/// </summary>
|
||||
bool IsCalculatorError { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回是否高亮显示当前参数。
|
||||
/// </summary>
|
||||
bool IsHighlighted { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// 将参数链表转换为数组。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<IParam> Flatten();
|
||||
|
||||
/// <summary>
|
||||
/// 校验用户输入值。
|
||||
/// </summary>
|
||||
void Validate();
|
||||
|
||||
/// <summary>
|
||||
/// 设置为已保存状态。
|
||||
/// </summary>
|
||||
void Save();
|
||||
|
||||
/// <summary>
|
||||
/// 高亮显示当前参数。
|
||||
/// </summary>
|
||||
void Highlight();
|
||||
|
||||
/// <summary>
|
||||
/// 取消高亮显示。
|
||||
/// </summary>
|
||||
void ResetHighlight();
|
||||
|
||||
/// <summary>
|
||||
/// 设置当前参数错误
|
||||
/// </summary>
|
||||
void SetCalculatorError();
|
||||
|
||||
/// <summary>
|
||||
/// 取消当前参数错误
|
||||
/// </summary>
|
||||
void ResetCalculatorError();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params;
|
||||
|
||||
public interface IValueParam
|
||||
{
|
||||
event EventHandler<object> OnValueChanged;
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前参数的数值。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
object GetValue();
|
||||
|
||||
/// <summary>
|
||||
/// 设置新参数。
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
void SetValue(object value);
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public abstract class NumParamBase<TValue> : ParamBaseWithGenericValue<TValue>
|
||||
{
|
||||
#region Variables
|
||||
|
||||
protected TValue _minimun;
|
||||
protected TValue _maximun;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
protected NumParamBase()
|
||||
{
|
||||
}
|
||||
|
||||
protected NumParamBase(TValue initValue) : base(initValue)
|
||||
{
|
||||
}
|
||||
|
||||
protected NumParamBase(TValue initValue, TValue minimum, TValue maximum) : base(initValue)
|
||||
{
|
||||
if (minimum.GetType() != typeof(TValue))
|
||||
minimum = default;
|
||||
|
||||
if (maximum.GetType() != typeof(TValue))
|
||||
maximum = default;
|
||||
|
||||
_minimun = minimum;
|
||||
_maximun = maximum;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public TValue Minimun
|
||||
{
|
||||
get => _minimun;
|
||||
set => Set(ref _minimun, value);
|
||||
}
|
||||
|
||||
|
||||
public TValue Maximun
|
||||
{
|
||||
get => _maximun;
|
||||
set => Set(ref _maximun, value);
|
||||
}
|
||||
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Validate()
|
||||
{
|
||||
var ret = Comparer<TValue>.Default.Compare(_minimun, _maximun);
|
||||
|
||||
if (ret > 0)
|
||||
{
|
||||
IsValid = false;
|
||||
ValidationError = "Config error: minimum value is greater than maximum value";
|
||||
return;
|
||||
}
|
||||
|
||||
if (double.TryParse(Value.ToString(), out var dblValue))
|
||||
{
|
||||
var retV2Min = Comparer<TValue>.Default.Compare(Value, _minimun);
|
||||
var retV2Max = Comparer<TValue>.Default.Compare(Value, _maximun);
|
||||
|
||||
if (retV2Min < 0 || retV2Max > 0)
|
||||
{
|
||||
IsValid = false;
|
||||
ValidationError = $"actual value ({_value}) is outside the range of {_minimun} to {_maximun}";
|
||||
}
|
||||
else
|
||||
{
|
||||
IsValid = true;
|
||||
ValidationError = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
IsValid = false;
|
||||
ValidationError = "Format error: not a number";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using ExtendedGrid.Microsoft.Windows.Controls;
|
||||
using MECF.Framework.Common.Account.Permissions;
|
||||
using Sicentury.Core;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public abstract class Param : BindableBase, IParam
|
||||
{
|
||||
#region Variables
|
||||
|
||||
protected string _controlName;
|
||||
protected string _displayName;
|
||||
protected string _unitName;
|
||||
protected MenuPermissionEnum _permStep;
|
||||
protected MenuPermissionEnum _permColumn;
|
||||
protected bool _isEnabled;
|
||||
protected bool _isHideValue;
|
||||
protected string _hiddenValueMasking;
|
||||
protected bool _isSaved;
|
||||
protected bool _isColumnSelected;
|
||||
protected Visibility _visibility;
|
||||
protected bool _isValid;
|
||||
protected string _validationError;
|
||||
protected bool _isEqualsToPrevious;
|
||||
protected bool _isHighlighted;
|
||||
protected bool _isCalculatorError;
|
||||
protected bool _isCompareDifferent;
|
||||
protected SolidColorBrush _stepColorBrush;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
protected Param()
|
||||
{
|
||||
_isSaved = true;
|
||||
IsEnabled = true;
|
||||
_isValid = true;
|
||||
_validationError = null;
|
||||
_isEqualsToPrevious = true;
|
||||
_visibility = Visibility.Visible;
|
||||
_isHighlighted = false;
|
||||
_hiddenValueMasking = "-";
|
||||
StepDoneCallback = (value) =>
|
||||
{
|
||||
IsEnabled = !value;
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数所在的列的访问权限变更时,执行的回调函数。
|
||||
/// </summary>
|
||||
public Action<Param> ColumnPermChangedCallback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当step的执行状态变更时,执行的回调函数。
|
||||
/// </summary>
|
||||
public Action<bool> StepDoneCallback { get; set; }
|
||||
|
||||
public Func<Param, bool> Check { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public RecipeStep Parent { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DataGridRow RowOwner { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DataGridColumn ColumnOwner { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual IParam Previous { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual IParam Next { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string ControlName
|
||||
{
|
||||
get => _controlName;
|
||||
set => Set(ref _controlName, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string DisplayName
|
||||
{
|
||||
get => _displayName;
|
||||
set => Set(ref _displayName, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置或返回当前参数的单位。
|
||||
/// </summary>
|
||||
public string UnitName
|
||||
{
|
||||
get => _unitName;
|
||||
set => Set(ref _unitName, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public MenuPermissionEnum StepPermission
|
||||
{
|
||||
get => _permStep;
|
||||
set => Set(ref _permStep, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public MenuPermissionEnum ColumnPermission
|
||||
{
|
||||
get => _permColumn;
|
||||
set => Set(ref _permColumn, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual MenuPermissionEnum Permission => (MenuPermissionEnum)Math.Min((int)StepPermission, (int)ColumnPermission);
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsHideValue
|
||||
{
|
||||
get => _isHideValue;
|
||||
set => Set(ref _isHideValue, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string HiddenValueMasking
|
||||
{
|
||||
get => _hiddenValueMasking;
|
||||
set => Set(ref _hiddenValueMasking, value);
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEnabled
|
||||
{
|
||||
get => _isEnabled;
|
||||
set => Set(ref _isEnabled, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual bool IsSaved
|
||||
{
|
||||
get => _isSaved;
|
||||
set => Set(ref _isSaved, value);
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEqualsToPrevious
|
||||
{
|
||||
get => _isEqualsToPrevious;
|
||||
set => Set(ref _isEqualsToPrevious, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsValid
|
||||
{
|
||||
get => _isValid;
|
||||
internal set => Set(ref _isValid, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string ValidationError
|
||||
{
|
||||
get => _validationError;
|
||||
protected set => Set(ref _validationError, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsHighlighted
|
||||
{
|
||||
get => _isHighlighted;
|
||||
private set => Set(ref _isHighlighted, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsCalculatorError
|
||||
{
|
||||
get => _isCalculatorError;
|
||||
private set => Set(ref _isCalculatorError, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recipe对比的不同参数部分属性标志,未添加到IParam接口中
|
||||
/// </summary>
|
||||
public bool IsCompareDifferent
|
||||
{
|
||||
get => _isCompareDifferent;
|
||||
private set
|
||||
{
|
||||
_isCompareDifferent = value;
|
||||
StepBackgroundColorBrush =
|
||||
value ? new SolidColorBrush(Colors.LightSalmon) : new SolidColorBrush(Colors.Transparent);
|
||||
|
||||
Set(ref _isCompareDifferent, value);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsColumnSelected
|
||||
{
|
||||
get => _isColumnSelected;
|
||||
set => Set(ref _isColumnSelected, value);
|
||||
}
|
||||
|
||||
public Visibility Visible
|
||||
{
|
||||
get => _visibility;
|
||||
set => Set(ref _visibility, value);
|
||||
}
|
||||
|
||||
public bool EnableConfig { get; set; }
|
||||
|
||||
public bool EnableTolerance { get; set; }
|
||||
|
||||
public Visibility StepCheckVisibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 差异对比时单个参数栏的背景
|
||||
/// </summary>
|
||||
public SolidColorBrush StepBackgroundColorBrush
|
||||
{
|
||||
get => _stepColorBrush;
|
||||
set => Set(ref _stepColorBrush, value);
|
||||
}
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// 高亮显示当前参数。
|
||||
/// </summary>
|
||||
public void Highlight()
|
||||
{
|
||||
IsHighlighted = true;
|
||||
}
|
||||
|
||||
public void SetCalculatorError()
|
||||
{
|
||||
StepBackgroundColorBrush = new SolidColorBrush(Colors.Red);
|
||||
IsCalculatorError = true;
|
||||
}
|
||||
|
||||
public void ResetCalculatorError()
|
||||
{
|
||||
StepBackgroundColorBrush = new SolidColorBrush(Colors.Transparent);
|
||||
IsCalculatorError = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 高亮背景色显示,Recipe对比的不同参数部分。未添加到IParam接口中,IsCompareDifferent属性是参数对比标志位
|
||||
/// </summary>
|
||||
public void CompareDifferent()
|
||||
{
|
||||
IsCompareDifferent = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 取消高亮显示。
|
||||
/// </summary>
|
||||
public void ResetHighlight()
|
||||
{
|
||||
IsHighlighted = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将当前参数所对应的前序、后续参数链表转换为数组。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual List<IParam> Flatten()
|
||||
{
|
||||
if (Previous != null)
|
||||
return Previous.Flatten();
|
||||
|
||||
var list = new List<IParam>();
|
||||
IParam p = this;
|
||||
while (p != null)
|
||||
{
|
||||
list.Add(p);
|
||||
p = p.Next;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 校验当前参数的数值。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual void Validate()
|
||||
{
|
||||
IsValid = true;
|
||||
ValidationError = "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复位当前参数数值
|
||||
/// </summary>
|
||||
public virtual void Reset()
|
||||
{
|
||||
IsSaved = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将当前参数标记为已保存状态。
|
||||
/// </summary>
|
||||
public virtual void Save()
|
||||
{
|
||||
IsSaved = true;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{DisplayName}, ControlName={ControlName}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using MECF.Framework.Common.Account.Permissions;
|
||||
using MECF.Framework.UI.Client.RecipeEditorLib.DGExtension.CustomColumn;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public abstract class ParamBaseWithGenericValue<TValue> : Param, IValueParam
|
||||
{
|
||||
#region Variables
|
||||
|
||||
public event EventHandler<object> OnValueChanged;
|
||||
|
||||
protected TValue _value;
|
||||
protected TValue _valueSnapshot;
|
||||
protected IParam _previous;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
protected ParamBaseWithGenericValue()
|
||||
{
|
||||
}
|
||||
|
||||
protected ParamBaseWithGenericValue(TValue initValue) : this()
|
||||
{
|
||||
if (initValue.GetType() != typeof(TValue))
|
||||
initValue = default;
|
||||
|
||||
_value = initValue;
|
||||
_valueSnapshot = initValue;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
|
||||
public virtual TValue Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
Set(ref _value, value);
|
||||
|
||||
ColumnPermChangedCallback?.Invoke(this);
|
||||
|
||||
_isSaved = _value.Equals(_valueSnapshot);
|
||||
OnPropertyChanged(nameof(IsSaved));
|
||||
|
||||
// 当Value发生变化时,要办一下事项,以及时刷新UI状态。
|
||||
CheckValueEqualityWithPrevious();
|
||||
Validate();
|
||||
}
|
||||
}
|
||||
|
||||
public override IParam Previous
|
||||
{
|
||||
get => _previous;
|
||||
set
|
||||
{
|
||||
//! 如果前序参数的Value发生了变化,则需要通知我进行比较,以确定我的Value是否和前序参数的Value相等。
|
||||
|
||||
// 注销之前注册的事件。
|
||||
if (_previous is Param preParam)
|
||||
preParam.PropertyChanged -= OnPreviousParamValueChanged;
|
||||
|
||||
_previous = value;
|
||||
|
||||
// 注册事件.
|
||||
if (_previous is Param p)
|
||||
{
|
||||
p.PropertyChanged += OnPreviousParamValueChanged;
|
||||
|
||||
// 立即执行一次比较
|
||||
CheckValueEqualityWithPrevious();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override IParam Next { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// 判断Value属性是否相等。
|
||||
/// </summary>
|
||||
/// <param name="v1"></param>
|
||||
/// <param name="v2"></param>
|
||||
/// <returns></returns>
|
||||
protected static bool IsTValueEqual(TValue v1, TValue v2)
|
||||
{
|
||||
return Comparer<TValue>.Default.Compare(v1, v2) == 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查我的Value是否和前序参数的Value相等。
|
||||
/// </summary>
|
||||
private void CheckValueEqualityWithPrevious()
|
||||
{
|
||||
if (_previous is ParamBaseWithGenericValue<TValue> valuedParam)
|
||||
{
|
||||
IsEqualsToPrevious = IsTValueEqual(_value, valuedParam.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当前序参数的Value发生变化时,判断其是否和我的Value属性相等。
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnPreviousParamValueChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(Value) && _previous is ParamBaseWithGenericValue<TValue> valuedParam)
|
||||
{
|
||||
IsEqualsToPrevious = IsTValueEqual(_value, valuedParam.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复位当前数据
|
||||
/// </summary>
|
||||
public override void Reset()
|
||||
{
|
||||
Value = _valueSnapshot;
|
||||
base.Reset();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据。
|
||||
/// </summary>
|
||||
public override void Save()
|
||||
{
|
||||
_valueSnapshot = _value;
|
||||
base.Save();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual object GetValue()
|
||||
{
|
||||
if (Permission == MenuPermissionEnum.MP_NONE)
|
||||
//throw new PermissionException(Permission);
|
||||
return null;
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
public void SetValue(object value)
|
||||
{
|
||||
if (Permission != MenuPermissionEnum.MP_READ_WRITE)
|
||||
//throw new PermissionException(Permission);
|
||||
return;
|
||||
|
||||
HandleSetValue(value);
|
||||
OnValueChanged?.Invoke(this, value);
|
||||
}
|
||||
|
||||
protected virtual void HandleSetValue(object value)
|
||||
{
|
||||
Debug.Assert(value.GetType() == typeof(TValue), "The type of value does not match to my type.");
|
||||
Value = (TValue)value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{base.ToString()}, Value={_value}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class BoolParam : ParamBaseWithGenericValue<bool>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public BoolParam()
|
||||
{
|
||||
}
|
||||
|
||||
public BoolParam(bool initValue) : base(initValue)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Aitex.Core.RT.Device.PmDevices;
|
||||
using MECF.Framework.UI.Client.RecipeEditorLib.DGExtension.CustomColumn;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class ComboxParam : ParamBaseWithGenericValue<ComboxColumn.Option>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public ComboxParam(IEnumerable<ComboxColumn.Option> options, string controlName, string initValue, string defaultValue)
|
||||
{
|
||||
// options 参数不能为null,或没有项目
|
||||
var enumerable = options as ComboxColumn.Option[] ?? options.ToArray();
|
||||
Debug.Assert(enumerable != null);
|
||||
Debug.Assert(enumerable.Any());
|
||||
|
||||
ControlName = controlName;
|
||||
Options = enumerable;
|
||||
|
||||
// 修复兼容性问题
|
||||
initValue = CorrectValue(initValue);
|
||||
|
||||
// 检查Recipe中保存的值是否在Options中定义?
|
||||
// 如果没有定义,则取默认值。
|
||||
ComboxColumn.Option selected;
|
||||
if (!string.IsNullOrEmpty(initValue) &&
|
||||
Options.FirstOrDefault(x => x.Equals(initValue)) != null)
|
||||
{
|
||||
// 注意:Recipe中保存的是ControlName,编辑器中应显示DisplayName
|
||||
selected = Options.First(x => x.Equals(initValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(defaultValue) &&
|
||||
Options.Any(x => x.Equals(defaultValue)))
|
||||
selected = Options.First(x => x.Equals(defaultValue));
|
||||
else
|
||||
selected = Options.First();
|
||||
}
|
||||
|
||||
_value = selected;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public IEnumerable<ComboxColumn.Option> Options { get; }
|
||||
|
||||
private bool _isEditable;
|
||||
public bool IsEditable
|
||||
{
|
||||
get => _isEditable;
|
||||
set => Set(ref _isEditable, value);
|
||||
}
|
||||
|
||||
private string _foreground = "Black";
|
||||
public string Foreground
|
||||
{
|
||||
get => _foreground;
|
||||
set => Set(ref _foreground, value);
|
||||
}
|
||||
public string LoopBackground => "Transparent";
|
||||
|
||||
public bool IsLoopItem => false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// 修正当前参数的值,解决兼容性问题。
|
||||
/// <para>
|
||||
/// 1、PSU和SCR控制策略为Pyro时,变更为PyroFollow。
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="initValue"></param>
|
||||
/// <returns></returns>
|
||||
private string CorrectValue(string initValue)
|
||||
{
|
||||
if (ControlName == "TC1.SetHeaterMode" || ControlName == "TC2.SetHeaterMode2")
|
||||
{
|
||||
// 处理TC兼容性问题
|
||||
if (initValue == "Pyro" || initValue == HeatStrategy.PyroFollow.ToString() || initValue == "1")
|
||||
return "Follow";
|
||||
|
||||
if (initValue == HeatStrategy.PyroAuto.ToString() || initValue == "2")
|
||||
return "Auto";
|
||||
|
||||
if (initValue == HeatStrategy.Power.ToString() || initValue == "0")
|
||||
return "Power";
|
||||
}
|
||||
|
||||
return initValue;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class DoubleParam : NumParamBase<double>
|
||||
{
|
||||
#region Variables
|
||||
|
||||
private int _resolution;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public DoubleParam()
|
||||
{
|
||||
Placeholder = "*";
|
||||
}
|
||||
|
||||
public DoubleParam(double initValue) : base(initValue)
|
||||
{
|
||||
Placeholder = "*";
|
||||
}
|
||||
|
||||
public DoubleParam(double initValue, string placeholder) : base(initValue)
|
||||
{
|
||||
Placeholder = placeholder;
|
||||
}
|
||||
|
||||
public DoubleParam(double initValue, double minimum, double maximum) : base(initValue, minimum, maximum)
|
||||
{
|
||||
Placeholder = "*";
|
||||
}
|
||||
|
||||
public DoubleParam(double initValue, double minimum, double maximum, string placeholder) : base(initValue, minimum, maximum)
|
||||
{
|
||||
Placeholder = placeholder;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 返回当Value不可用时的占位符。
|
||||
/// </summary>
|
||||
public string Placeholder { get; }
|
||||
|
||||
public int Resolution
|
||||
{
|
||||
get => _resolution;
|
||||
set => Set(ref _resolution, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class ExpanderParam : Param
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
using MECF.Framework.UI.Client.RecipeEditorLib.DGExtension.CustomColumn;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class FlowModeParam : ComboxParam
|
||||
{
|
||||
#region Variables
|
||||
|
||||
public enum FlowModeEnum
|
||||
{
|
||||
Vent,
|
||||
Purge,
|
||||
Run
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public FlowModeParam(IEnumerable<ComboxColumn.Option> options, string controlName, string initValue, string defaultValue) :
|
||||
base(options, controlName, initValue, defaultValue)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public override ComboxColumn.Option Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
var isSwitchToVent = false;
|
||||
if (value.Equals(FlowModeEnum.Purge))
|
||||
{
|
||||
if (Previous is FlowModeParam pp)
|
||||
{
|
||||
if (pp.Value.Equals(FlowModeEnum.Run))
|
||||
{
|
||||
isSwitchToVent = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Next is FlowModeParam np)
|
||||
{
|
||||
if (np.Value.Equals(FlowModeEnum.Run))
|
||||
{
|
||||
isSwitchToVent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (value.Equals(FlowModeEnum.Run))
|
||||
{
|
||||
if (Previous is FlowModeParam pp)
|
||||
{
|
||||
if (pp.Value.Equals(FlowModeEnum.Purge))
|
||||
{
|
||||
isSwitchToVent = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Next is FlowModeParam np)
|
||||
{
|
||||
if (np.Value.Equals(FlowModeEnum.Purge))
|
||||
{
|
||||
isSwitchToVent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isSwitchToVent)
|
||||
MessageBox.Show("Flow mode cannot be switched directly between 'Purge' and 'Run'.", "Error",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
||||
_value = isSwitchToVent
|
||||
? Options.FirstOrDefault(x => x.Equals(FlowModeEnum.Vent)) ?? Options.First()
|
||||
: value;
|
||||
|
||||
ColumnPermChangedCallback?.Invoke(this);
|
||||
_isSaved = _value.Equals(_valueSnapshot);
|
||||
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(IsSaved));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
private void InnerValidate()
|
||||
{
|
||||
// 判断Flow Mode是否直接在Purge和Run之间切换。
|
||||
|
||||
var currentStepOption = Value;
|
||||
var flowModeValid = true;
|
||||
|
||||
if (Previous != null)
|
||||
{
|
||||
var previousStepOption = ((ComboxParam)Previous).Value;
|
||||
if ((previousStepOption.Equals(FlowModeEnum.Purge) && currentStepOption.Equals(FlowModeEnum.Run))
|
||||
|| (previousStepOption.Equals(FlowModeEnum.Run) && currentStepOption.Equals(FlowModeEnum.Purge)))
|
||||
{
|
||||
flowModeValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Next != null)
|
||||
{
|
||||
var nextStepOption = ((ComboxParam)Next).Value;
|
||||
if ((nextStepOption.Equals(FlowModeEnum.Purge) && currentStepOption.Equals(FlowModeEnum.Run))
|
||||
|| (nextStepOption.Equals(FlowModeEnum.Run) && currentStepOption.Equals(FlowModeEnum.Purge)))
|
||||
{
|
||||
flowModeValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
IsValid = flowModeValid;
|
||||
ValidationError = !flowModeValid
|
||||
? "Flow mode cannot be switched directly between 'Purge' and 'Run'"
|
||||
: null;
|
||||
}
|
||||
|
||||
public override void Validate()
|
||||
{
|
||||
var linkedList = Flatten();
|
||||
|
||||
foreach (var param in linkedList)
|
||||
{
|
||||
if(param is FlowModeParam p)
|
||||
p.InnerValidate();
|
||||
}
|
||||
|
||||
//TODO 如果当前参数是TMA或TCS,当设备未安装,流量模式必须为Purge
|
||||
//Issue TCS没有对应的系统参数;TMA要区分PM腔,但Recipe不分PM腔,此处不好判断
|
||||
if (ControlName == RecipeControlNames.TMA_FLOW_MODE)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (ControlName == RecipeControlNames.TCS_FLOW_MODE)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class IntParam : NumParamBase<int>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public IntParam()
|
||||
{
|
||||
}
|
||||
|
||||
public IntParam(int initValue) : base(initValue)
|
||||
{
|
||||
}
|
||||
|
||||
public IntParam(int initValue, int minimum, int maximum) : base(initValue, minimum, maximum)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using MECF.Framework.UI.Client.RecipeEditorLib.DGExtension.CustomColumn;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class LoopComboxParam : ParamBaseWithGenericValue<string>
|
||||
{
|
||||
|
||||
#region Constructors
|
||||
|
||||
public LoopComboxParam()
|
||||
{
|
||||
}
|
||||
|
||||
public LoopComboxParam(string initValue) : base(initValue)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public ObservableCollection<LoopComboxColumn.Option> Options { get; set; }
|
||||
|
||||
private bool _isEditable;
|
||||
public bool IsEditable
|
||||
{
|
||||
get => _isEditable;
|
||||
set => Set(ref _isEditable, value);
|
||||
}
|
||||
|
||||
private bool _isLoopStep;
|
||||
public bool IsLoopStep
|
||||
{
|
||||
get => _isLoopStep;
|
||||
set
|
||||
{
|
||||
Set(ref _isLoopStep, value);
|
||||
OnPropertyChanged(nameof(LoopBackground));
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isValidLoop;
|
||||
public bool IsValidLoop
|
||||
{
|
||||
get => _isValidLoop;
|
||||
set
|
||||
{
|
||||
Set(ref _isValidLoop, value);
|
||||
OnPropertyChanged(nameof(LoopBackground));
|
||||
}
|
||||
}
|
||||
|
||||
public string LoopBackground => IsLoopStep ? (IsValidLoop ? "#90EE90" : "#FFC0CB") : "Transparent";
|
||||
|
||||
|
||||
public bool IsLoopItem { get; set; }
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using MECF.Framework.UI.Client.RecipeEditorLib.DGExtension.CustomColumn;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class MultipleSelectParam : Param
|
||||
{
|
||||
public MultipleSelectParam(MultipleSelectColumn col)
|
||||
{
|
||||
this.Options = new ObservableCollection<MultipleSelectColumn.Option>();
|
||||
col.CloneOptions(this).ForEach(opt => this.Options.Add(opt));
|
||||
IsSaved = true;
|
||||
}
|
||||
|
||||
public ObservableCollection<MultipleSelectColumn.Option> Options { get; set; }
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class PathFileParam : ParamBaseWithGenericValue<string>
|
||||
{
|
||||
|
||||
//TODO 系统所有的配方文件保存在“Sic\xxx\”路径下,"Sic"前缀可以通过系统配置设置,此处为了省事写死。
|
||||
private const string SYS_NAME = "Sic";
|
||||
|
||||
#region Constructors
|
||||
|
||||
public PathFileParam()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PathFileParam(string name, bool isEnabled, string prefixPath)
|
||||
{
|
||||
ControlName = name;
|
||||
IsEnabled = isEnabled;
|
||||
PrefixPath = prefixPath;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
Set(ref _value, value);
|
||||
ColumnPermChangedCallback?.Invoke(this);
|
||||
|
||||
if (string.IsNullOrEmpty(_value))
|
||||
{
|
||||
FileName = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove the prefix "Sic\xxx\", and leave the folder name of the recipe/seq file.
|
||||
var index = _value.LastIndexOf("\\", StringComparison.Ordinal);
|
||||
FileName = index > -1 ? _value.Replace($"{PrefixWithSysName}\\", "") : _value;
|
||||
}
|
||||
|
||||
IsSaved = false;
|
||||
}
|
||||
}
|
||||
|
||||
public string PrefixWithSysName => $"{SYS_NAME}\\{PrefixPath}";
|
||||
|
||||
private string _fileName;
|
||||
public string FileName
|
||||
{
|
||||
get => _fileName;
|
||||
set => Set(ref _fileName, value);
|
||||
}
|
||||
|
||||
private string _prefixPath;
|
||||
public string PrefixPath
|
||||
{
|
||||
get => _prefixPath;
|
||||
set => Set(ref _prefixPath, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class PopSettingParam : ParamBaseWithGenericValue<string>
|
||||
{
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using MECF.Framework.UI.Client.RecipeEditorLib.DGExtension.CustomColumn;
|
||||
using SciChart.Charting2D.Interop;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class PositionParam : ParamBaseWithGenericValue<string>
|
||||
{
|
||||
public override string Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
OptionChanged(value);
|
||||
Set(ref _value, value);
|
||||
}
|
||||
}
|
||||
public ObservableCollection<ComboxColumn.Option> Options { get; set; }
|
||||
|
||||
private void OptionChanged(string value)
|
||||
{
|
||||
IEnumerable<ComboxColumn.Option> opts = Options.Where(op => op.ControlName == value);
|
||||
|
||||
if (opts.Count() > 0)
|
||||
{
|
||||
string[] relatedparams = opts.ToList()[0].RelatedParameters.Split(',');
|
||||
Parent.ToList().ForEach(param =>
|
||||
{
|
||||
if (relatedparams.Contains(param.ControlName) || param.ControlName == "Position" || param.ControlName == "StepNo" || param.ControlName == "Module")
|
||||
param.Visible = Visibility.Visible;
|
||||
else
|
||||
param.Visible = Visibility.Hidden;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Parent.ToList().ForEach(param =>
|
||||
{
|
||||
if (param.ControlName == "Position" || param.ControlName == "StepNo" || param.ControlName == "Module")
|
||||
param.Visible = Visibility.Visible;
|
||||
else
|
||||
param.Visible = Visibility.Hidden;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class Sets3RatioParam : ParamBaseWithGenericValue<string>
|
||||
{
|
||||
#region Variables
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public Sets3RatioParam()
|
||||
{
|
||||
_value = "1:1:1";
|
||||
Ratio = new [] { 1.0, 1.0, 1.0 };
|
||||
}
|
||||
|
||||
public Sets3RatioParam(string initValue) : base(initValue)
|
||||
{
|
||||
Ratio = new[] { 1.0, 1.0, 1.0 };
|
||||
ParseRatio(initValue);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
Set(ref _value, value);
|
||||
|
||||
ColumnPermChangedCallback?.Invoke(this);
|
||||
|
||||
_isSaved = _value.Equals(_valueSnapshot);
|
||||
OnPropertyChanged(nameof(IsSaved));
|
||||
|
||||
Validate();
|
||||
ParseRatio(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public double[] Ratio { get; private set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
private void ParseRatio(string value)
|
||||
{
|
||||
var nums = value.Split(':');
|
||||
if (nums.Length == 3
|
||||
&& double.TryParse(nums[0], out var r1)
|
||||
&& double.TryParse(nums[1], out var r2)
|
||||
&& double.TryParse(nums[2], out var r3))
|
||||
{
|
||||
Ratio[0] = r1;
|
||||
Ratio[1] = r2;
|
||||
Ratio[2] = r3;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ratio[0] = double.NaN;
|
||||
Ratio[1] = double.NaN;
|
||||
Ratio[2] = double.NaN;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Validate()
|
||||
{
|
||||
if (ValidateRatioString(_value))
|
||||
{
|
||||
IsValid = true;
|
||||
ValidationError = null;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
IsValid = false;
|
||||
ValidationError = "Format error";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static bool ValidateRatioString(string value)
|
||||
{
|
||||
var nums = value.Split(':');
|
||||
return nums.Length == 3
|
||||
&& double.TryParse(nums[0], out _)
|
||||
&& double.TryParse(nums[1], out _)
|
||||
&& double.TryParse(nums[2], out _);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using MECF.Framework.Common.Account;
|
||||
using MECF.Framework.Common.Account.Permissions;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class StepParam : ParamBaseWithGenericValue<int>
|
||||
{
|
||||
#region Variables
|
||||
|
||||
private bool _checked;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public StepParam()
|
||||
{
|
||||
}
|
||||
|
||||
public StepParam(int initValue) : base(initValue)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public override MenuPermissionEnum Permission => MenuPermissionEnum.MP_READ_WRITE;
|
||||
|
||||
public bool IsChecked
|
||||
{
|
||||
get => _checked;
|
||||
set => Set(ref _checked, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
||||
{
|
||||
public class StringParam : ParamBaseWithGenericValue<string>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public StringParam()
|
||||
{
|
||||
}
|
||||
|
||||
public StringParam(string initValue) : base(initValue)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user