61 lines
1.6 KiB
C#
61 lines
1.6 KiB
C#
|
|
using CaeKnowledge.Data;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Runtime.CompilerServices;
|
|||
|
|
|
|||
|
|
// ReSharper disable ConvertToAutoPropertyWhenPossible
|
|||
|
|
|
|||
|
|
namespace CaeKnowledge.View
|
|||
|
|
{
|
|||
|
|
public class ViewProcessingJob: INotifyPropertyChanged
|
|||
|
|
{
|
|||
|
|
private readonly ProcessingJob _base;
|
|||
|
|
|
|||
|
|
public ViewProcessingJob(ProcessingJob @base)
|
|||
|
|
{
|
|||
|
|
_base = @base;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[DisplayName("基准Step名称")]
|
|||
|
|
public string StepName => _base.StepName;
|
|||
|
|
|
|||
|
|
[DisplayName("新Step名称")]
|
|||
|
|
public string NewStepName => _base.NewStepName;
|
|||
|
|
|
|||
|
|
public double X => _base.X;
|
|||
|
|
|
|||
|
|
public double Y => _base.Y;
|
|||
|
|
|
|||
|
|
public double Z => _base.Z;
|
|||
|
|
|
|||
|
|
public double Fx => _base.Fx;
|
|||
|
|
|
|||
|
|
public double Fy => _base.Fy;
|
|||
|
|
|
|||
|
|
public double Fz => _base.Fz;
|
|||
|
|
|
|||
|
|
[DisplayName("最近节点Id")]
|
|||
|
|
public int NodeId=> _base.Node.Id;
|
|||
|
|
|
|||
|
|
[DisplayName("最近距离")]
|
|||
|
|
public double MinimumDistance => _base.MinimumDistance;
|
|||
|
|
|
|||
|
|
[Browsable(false)]
|
|||
|
|
public ProcessingJob Base => _base;
|
|||
|
|
|
|||
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|||
|
|
|
|||
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|||
|
|
{
|
|||
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null)
|
|||
|
|
{
|
|||
|
|
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
|
|||
|
|
field = value;
|
|||
|
|
OnPropertyChanged(propertyName);
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|