77 lines
3.0 KiB
C#
77 lines
3.0 KiB
C#
using Aurora.Api;
|
|
using VisionCommon;
|
|
|
|
namespace VisionUI.Aligner {
|
|
class AlignRecipeSettingViewModel : Aurora.View.NotifyPropertyChangedBase, IUpdateRecipe {
|
|
private Logger _Logger;
|
|
private SubSysInfo _SubSysInfo;
|
|
private AlignInfo _AlignInfo;
|
|
private AlignRecipe _AlignRecipe;
|
|
|
|
#region Binding Properties
|
|
private AlignLimit _AlignLimit;
|
|
/// <summary>얼라인 리밋</summary>
|
|
public AlignLimit AlignLimit { get => _AlignLimit; set => SetProperty(ref _AlignLimit, value); }
|
|
|
|
private AlignOffset _AlignOffset;
|
|
|
|
/// <summary>얼라인 오프셋</summary>
|
|
public AlignOffset AlignOffset { get => _AlignOffset; set => SetProperty(ref _AlignOffset, value); }
|
|
|
|
private AlignRetry _AlignRetry;
|
|
|
|
/// <summary>얼라인 재시도</summary>
|
|
public AlignRetry AlignRetry { get => _AlignRetry; set => SetProperty(ref _AlignRetry, value); }
|
|
|
|
private AlignTgtDist _AlignTgtDist;
|
|
|
|
/// <summary>얼라인 타겟 Distance </summary>
|
|
public AlignTgtDist AlignTgtDist { get => _AlignTgtDist; set => SetProperty(ref _AlignTgtDist, value); }
|
|
|
|
private ProcParams _ProcParams;
|
|
|
|
/// <summary>얼라인 프록 파라미터</summary>
|
|
public ProcParams ProcParams { get => _ProcParams; set => SetProperty(ref _ProcParams, value); }
|
|
|
|
private InspParams _InspParams;
|
|
/// <summary>인스펙션 파라미터</summary>
|
|
public InspParams InspParams { get => _InspParams; set => SetProperty(ref _InspParams, value); }
|
|
#endregion
|
|
/// <summary>
|
|
/// 생성자
|
|
/// </summary>
|
|
/// <param name="alignInfo">얼라인 정보</param>
|
|
public AlignRecipeSettingViewModel(AlignInfo alignInfo) {
|
|
_Logger = new Logger($"AlignRecipeSettingViewModel[{alignInfo.AlignName}]");
|
|
_SubSysInfo = alignInfo.ToSubSysInfo();
|
|
_AlignInfo = alignInfo;
|
|
_AlignRecipe = VisionRecipeManager.GetAlignRecipe(_AlignInfo);
|
|
|
|
UpdateRecipeFromFile();
|
|
}
|
|
|
|
public void RefreshVisionRecipes() {
|
|
_AlignRecipe = VisionRecipeManager.GetAlignRecipe(_AlignInfo);
|
|
}
|
|
|
|
public void UpdateRecipeFromFile() {
|
|
AlignRecipe alignRecipe = VisionRecipeManager.GetAlignRecipe(_AlignInfo).Clone();
|
|
AlignRetry = alignRecipe.AlignRetry;
|
|
AlignOffset = alignRecipe.AlignOffset;
|
|
AlignLimit = alignRecipe.AlignLimit;
|
|
AlignTgtDist = alignRecipe.AlignTgtDist;
|
|
ProcParams = alignRecipe.ProcParams;
|
|
InspParams = alignRecipe.InspParams;
|
|
}
|
|
|
|
public void UpdateRecipeFromUI() {
|
|
AlignRecipe alignRecipe = VisionRecipeManager.GetAlignRecipe(_AlignInfo);
|
|
alignRecipe.AlignRetry = AlignRetry;
|
|
alignRecipe.AlignOffset = AlignOffset;
|
|
alignRecipe.AlignLimit = AlignLimit;
|
|
alignRecipe.AlignTgtDist = AlignTgtDist;
|
|
alignRecipe.ProcParams = ProcParams;
|
|
alignRecipe.InspParams = InspParams;
|
|
}
|
|
}
|
|
} |