using Aurora.Api; using Aurora.View; using ILSOS_PrismaticGun.Process; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ILSOS_PrismaticGun.Settings { public class ManualLaserSetting : ISettingItem { public const int Max = 20; public ObservableCollection LinesStageA { get; set; } = new ObservableCollection(); public ObservableCollection LinesStageB { get; set; } = new ObservableCollection(); public OneShotItem OneShotsStageA { get; set; } = new OneShotItem(); public OneShotItem OneShotsStageB { get; set; } = new OneShotItem(); } public class LineShotItem : NotifyPropertyChangedBase, ICloneable { public string Name { get; set; } public int Index { get => _Index; set => SetProperty(ref _Index, value); } private int _Index = -1; public double StartX { get => _StartX; set => SetProperty(ref _StartX, value); } private double _StartX = 0; public double StartY { get => _StartY; set => SetProperty(ref _StartY, value); } private double _StartY = 0; public double EndX { get => _EndX; set => SetProperty(ref _EndX, value); } private double _EndX = 0; public double Velocity { get => _Velocity; set => SetProperty(ref _Velocity, value); } private double _Velocity = 0; public double Ring { get => _Ring; set => SetProperty(ref _Ring, value); } private double _Ring = 0; public double Core { get => _Core; set => SetProperty(ref _Core, value); } private double _Core = 0; public double PositionZ { get => _PositionZ; set => SetProperty(ref _PositionZ, value); } private double _PositionZ = 0; [Browsable(false)] public string State { get => _State; set => SetProperty(ref _State, value); } private string _State = "Idle"; public double N2PressMFC { get => _N2PressMFC; set => SetProperty(ref _N2PressMFC, value); } private double _N2PressMFC = 0; public LineShotItem() { } public LineShotItem(LineShotItem SettingItem) { Index = SettingItem.Index; StartX = SettingItem.StartX; StartY = SettingItem.StartY; EndX = SettingItem.EndX; Velocity = SettingItem.Velocity; Ring = SettingItem.Ring; Core = SettingItem.Core; PositionZ = SettingItem.PositionZ; N2PressMFC = SettingItem.N2PressMFC; } public object Clone() { return new LineShotItem(this); } } public class OneShotItem : NotifyPropertyChangedBase { public int CoreRatio { get => _CoreRatio; set => SetProperty(ref _CoreRatio, value); } public int _CoreRatio; public int ShotTime { get => _ShotTime; set => SetProperty(ref _ShotTime, value); } private int _ShotTime; public double ShotPower { get => _ShotPower; set => SetProperty(ref _ShotPower, value); } private double _ShotPower; public OneShotItem() { } } }