/* * Copyright (c) 2025 LG Electronics Inc. * SPDX-License-Identifier: LicenseRef-LGE-Proprietary */ using Aurora.View; using PropertyTools.DataAnnotations; using System; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; namespace VisionCommon { public class InspRecipe : ICloneCopy { public AttachInspRecipe AttachInspRecipe { get; set; } public InspRecipe Clone() { return ((ICloneable)this).Clone() as InspRecipe; } object ICloneable.Clone() { var cloneObj = new InspRecipe(); CopyTo(cloneObj); return cloneObj; } public void CopyTo(InspRecipe target) { if (this.AttachInspRecipe != null) { target.AttachInspRecipe = this.AttachInspRecipe.Clone(); } } } public class AttachInspParam : ICloneCopy { public double SpecW { get; set; } public double ErrRangeW { get; set; } public double SpecH { get; set; } public double ErrRangeH { get; set; } public AttachInspParam Clone() { return ((ICloneable)this).Clone() as AttachInspParam; } object ICloneable.Clone() { var cloneObj = new AttachInspParam(); CopyTo(cloneObj); return cloneObj; } public void CopyTo(AttachInspParam target) { target.SpecW = this.SpecW; target.ErrRangeW = this.ErrRangeW; target.SpecH = this.SpecH; target.ErrRangeH = this.ErrRangeH; } } /// /// 부착검사 시퀀스 FOV 타입 /// public enum eAttachInspFovType { C2_F4_MV, // CAM 2대 / FOV 4개 / 포지션 이동 (O) } public class AttachInspRecipe : ICloneCopy { public eAttachInspFovType AttachInspFovType { get; set; } = eAttachInspFovType.C2_F4_MV; /// FOV 순서별 부착검사 파라미터 [Converter(typeof(CoordUnitAttachInspParamsConverter))] public ObservableCollection AttachInspParams { get; set; } = new ObservableCollection(); public AttachInspRecipe Clone() { return ((ICloneable)this).Clone() as AttachInspRecipe; } object ICloneable.Clone() { var cloneObj = new AttachInspRecipe(); CopyTo(cloneObj); return cloneObj; } public void CopyTo(AttachInspRecipe target) { target.AttachInspFovType = this.AttachInspFovType; var clonedList = this.AttachInspParams.Select(x => x.Clone()).ToList(); target.AttachInspParams = new ObservableCollection(clonedList); } } }