添加 MX-PD-盘古 项目文件

将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
Shi.Ji
2026-05-18 11:43:09 +08:00
parent 03632a379d
commit e31d3560bb
739 changed files with 99783 additions and 0 deletions

View File

@@ -0,0 +1,97 @@
using MainShell.Filewritable;
using Newtonsoft.Json;
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace MainShell.DeviceMaintance.Model
{
public class LaserCompensationSetting : MXJM.FileWritable.JsonFileWritableBase, INotifyPropertyChanged
{
private string _axisName = "Axis_Stage_Y3";
public string AxisName
{
get { return _axisName; }
set { SetAndNotify(ref _axisName, value); }
}
private double _startPos;
public double StartPos
{
get { return _startPos; }
set { SetAndNotify(ref _startPos, value); }
}
private double _steps = 1.0d;
public double Steps
{
get { return _steps; }
set { SetAndNotify(ref _steps, value); }
}
private int _stepsCount = 5;
public int StepsCount
{
get { return _stepsCount; }
set { SetAndNotify(ref _stepsCount, value); }
}
private double _jumpPos = 1.0d;
public double JumpPos
{
get { return _jumpPos; }
set { SetAndNotify(ref _jumpPos, value); }
}
private int _workCount = 1;
public int WorkCount
{
get { return _workCount; }
set { SetAndNotify(ref _workCount, value); }
}
private double _speed = 5.0d;
public double Speed
{
get { return _speed; }
set { SetAndNotify(ref _speed, value); }
}
private double _dwellTime = 0.5d;
public double DwellTime
{
get { return _dwellTime; }
set { SetAndNotify(ref _dwellTime, value); }
}
[JsonIgnore]
public override string Dir => Paths.CalibSettingPath;
[JsonIgnore]
public override string FileName => "LaserCompensationSetting.json";
public event PropertyChangedEventHandler PropertyChanged;
public void LoadFromFile()
{
Read();
}
public void SaveToFile()
{
Write();
}
protected bool SetAndNotify<T>(ref T field, T value, [CallerMemberName] string propertyName = null)
{
if (Equals(field, value))
{
return false;
}
field = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
return true;
}
}
}