104 lines
4.1 KiB
C#
104 lines
4.1 KiB
C#
using Aurora.Api;
|
|
using Aurora.View;
|
|
using WeldingCommon.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 WeldingCommon.Settings
|
|
{
|
|
public class ManualLaserSetting : ISettingItem
|
|
{
|
|
public const int Max = 20;
|
|
public ObservableCollection<LineShotItem> Lines { get; set; } = new ObservableCollection<LineShotItem>();
|
|
public OneShotItem OneShots { get; set; } = new OneShotItem();
|
|
public bool LaserIOUse { get; set; } = true;
|
|
public CameraLaserOffset CamLaserPositionOffset { get; set; } = new CameraLaserOffset();
|
|
}
|
|
|
|
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 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 Velocity { get => _Velocity; set => SetProperty(ref _Velocity, value); }
|
|
private double _Velocity = 0;
|
|
public double Acc { get => _Acc; set => SetProperty(ref _Acc, value); }
|
|
private double _Acc = 0;
|
|
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 EndY { get => _EndY; set => SetProperty(ref _EndY, value); }
|
|
private double _EndY = 0;
|
|
public double PositionZ { get => _PositionZ; set => SetProperty(ref _PositionZ, value); }
|
|
private double _PositionZ = 0;
|
|
public int YAxisType { get => _YAxisType; set => SetProperty(ref _YAxisType, value); }
|
|
private int _YAxisType = 0;
|
|
|
|
[Browsable(false)]
|
|
public string State { get => _State; set => SetProperty(ref _State, value); }
|
|
private string _State = "Idle";
|
|
public LineShotItem()
|
|
{
|
|
}
|
|
|
|
public LineShotItem(LineShotItem SettingItem)
|
|
{
|
|
Index = SettingItem.Index;
|
|
StartX = SettingItem.StartX;
|
|
StartY = SettingItem.StartY;
|
|
EndX = SettingItem.EndX;
|
|
Velocity = SettingItem.Velocity;
|
|
Acc = SettingItem.Acc;
|
|
Ring = SettingItem.Ring;
|
|
Core = SettingItem.Core;
|
|
PositionZ = SettingItem.PositionZ;
|
|
}
|
|
|
|
public object Clone()
|
|
{
|
|
return new LineShotItem(this);
|
|
}
|
|
}
|
|
|
|
public class OneShotItem : NotifyPropertyChangedBase
|
|
{
|
|
public int ShotTime { get => _ShotTime; set => SetProperty(ref _ShotTime, value); }
|
|
private int _ShotTime;
|
|
public double ShotPower1 { get => _ShotPower1; set => SetProperty(ref _ShotPower1, value); }
|
|
private double _ShotPower1;
|
|
public double ShotPower2 { get => _ShotPower2; set => SetProperty(ref _ShotPower2, value); }
|
|
private double _ShotPower2;
|
|
|
|
public OneShotItem()
|
|
{
|
|
}
|
|
}
|
|
|
|
public class CameraLaserOffset : NotifyPropertyChangedBase
|
|
{
|
|
public double Y1UseOffsetX { get => _Y1UseOffsetX; set => SetProperty(ref _Y1UseOffsetX, value); }
|
|
private double _Y1UseOffsetX;
|
|
public double Y1UseOffsetY { get => _Y1UseOffsetY; set => SetProperty(ref _Y1UseOffsetY, value); }
|
|
private double _Y1UseOffsetY;
|
|
public double Y2UseOffsetX { get => _Y2UseOffsetX; set => SetProperty(ref _Y2UseOffsetX, value); }
|
|
private double _Y2UseOffsetX;
|
|
public double Y2UseOffsetY { get => _Y2UseOffsetY; set => SetProperty(ref _Y2UseOffsetY, value); }
|
|
private double _Y2UseOffsetY;
|
|
public CameraLaserOffset()
|
|
{
|
|
}
|
|
}
|
|
}
|