添加 MX-PD-盘古 项目文件
将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
using MainShell.Recipe.Models;
|
||||
using Stylet;
|
||||
|
||||
namespace MainShell.Recipe.ViewModel
|
||||
{
|
||||
public class ProcessCompensationViewModel : PropertyChangedBase
|
||||
{
|
||||
private ProcessRecipe _processRecipe;
|
||||
public ProcessRecipe ProcessRecipe
|
||||
{
|
||||
get { return _processRecipe; }
|
||||
set
|
||||
{
|
||||
if (SetAndNotify(ref _processRecipe, value))
|
||||
{
|
||||
NotifyCompensationPropertiesChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public double PhsX1Compensation
|
||||
{
|
||||
get { return GetCompensationParameter().PhsX1Compensation; }
|
||||
set
|
||||
{
|
||||
ProcessAxisCompensationParameter parameter = GetCompensationParameter();
|
||||
if (parameter.PhsX1Compensation == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
parameter.PhsX1Compensation = value;
|
||||
NotifyOfPropertyChange(nameof(PhsX1Compensation));
|
||||
}
|
||||
}
|
||||
|
||||
public double PhsY1Compensation
|
||||
{
|
||||
get { return GetCompensationParameter().PhsY1Compensation; }
|
||||
set
|
||||
{
|
||||
ProcessAxisCompensationParameter parameter = GetCompensationParameter();
|
||||
if (parameter.PhsY1Compensation == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
parameter.PhsY1Compensation = value;
|
||||
NotifyOfPropertyChange(nameof(PhsY1Compensation));
|
||||
}
|
||||
}
|
||||
|
||||
public double WsXCompensation
|
||||
{
|
||||
get { return GetCompensationParameter().WsXCompensation; }
|
||||
set
|
||||
{
|
||||
ProcessAxisCompensationParameter parameter = GetCompensationParameter();
|
||||
if (parameter.WsXCompensation == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
parameter.WsXCompensation = value;
|
||||
NotifyOfPropertyChange(nameof(WsXCompensation));
|
||||
}
|
||||
}
|
||||
|
||||
public double StageYCompensation
|
||||
{
|
||||
get { return GetCompensationParameter().StageYCompensation; }
|
||||
set
|
||||
{
|
||||
ProcessAxisCompensationParameter parameter = GetCompensationParameter();
|
||||
if (parameter.StageYCompensation == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
parameter.StageYCompensation = value;
|
||||
NotifyOfPropertyChange(nameof(StageYCompensation));
|
||||
}
|
||||
}
|
||||
|
||||
private ProcessAxisCompensationParameter GetCompensationParameter()
|
||||
{
|
||||
if (ProcessRecipe == null)
|
||||
{
|
||||
return new ProcessAxisCompensationParameter();
|
||||
}
|
||||
|
||||
if (ProcessRecipe.ProcessAxisCompensationParameter == null)
|
||||
{
|
||||
ProcessRecipe.ProcessAxisCompensationParameter = new ProcessAxisCompensationParameter();
|
||||
}
|
||||
|
||||
return ProcessRecipe.ProcessAxisCompensationParameter;
|
||||
}
|
||||
|
||||
private void NotifyCompensationPropertiesChanged()
|
||||
{
|
||||
NotifyOfPropertyChange(nameof(PhsX1Compensation));
|
||||
NotifyOfPropertyChange(nameof(PhsY1Compensation));
|
||||
NotifyOfPropertyChange(nameof(WsXCompensation));
|
||||
NotifyOfPropertyChange(nameof(StageYCompensation));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user