43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
/*
|
|
* Copyright (c) 2025 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
using Aurora.View;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using VisionCommon;
|
|
|
|
namespace VisionCommonUI {
|
|
public class PatternBlockSettingViewModel : NotifyPropertyChangedBase {
|
|
private int _blockId;
|
|
public int BlockId { get => _blockId; set => SetProperty(ref _blockId, value); }
|
|
|
|
public List<int> Patterns { get; set; }
|
|
|
|
private PatternInfo _patternInfo;
|
|
private PatternAgentBase _patternAgent;
|
|
|
|
public PatternBlockSettingViewModel(
|
|
PatternInfo patternInfo,
|
|
int blockId) {
|
|
_patternInfo = patternInfo;
|
|
BlockId = blockId;
|
|
|
|
var patternIndex = _patternInfo.GetPatternIndex();
|
|
_patternAgent = PatternAgentManager.GetAgent(
|
|
VisionRecipeManager.GetFovInfo(
|
|
patternIndex.UnitId,
|
|
patternIndex.SubSysId,
|
|
patternIndex.FovId));
|
|
|
|
var patternInfoList = _patternAgent.GetMainPatterns(
|
|
_patternInfo, ePatternType.LineFinder);
|
|
Patterns = patternInfoList.Select(pi => pi.GetPatternId()).ToList();
|
|
}
|
|
}
|
|
}
|