using Aurora;
using Aurora.Api;
using Aurora.View;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using VisionCommon;
using VisionCommonUI;
using VisionCommonUI.Resources;
using VisionSequence.Setup;
namespace VisionUI.Setup {
///
/// 캘리브레이션 세팅 뷰 모델
///
public class CalSettingViewModel : NotifyPropertyChangedBase, IUpdateRecipe {
private Logger _Logger = new Logger(typeof(CalSettingViewModel).Name);
private IEventObservable _EventObservable = VisionEnv.AuroraEnv.EventObservable;
/// 캘리브레이션 플랜 아이템 컬렉션
public ObservableCollection _PlanItems;
/// 캘리브레이션 플랜 생성 이벤트 핸들러
public event EventHandler CalPlanCreated;
/// 캘리브레이션 시퀀스 취소 이벤트 핸들러
public event EventHandler CancelSequence;
private SubSysInfo _SubSysInfo;
private SubSysRecipe _SubSysRecipe;
#region Binding Properties
private CalSetupRecipe _CalSetupRecipe;
/// 캘리브레이션 셋업 레시피
public CalSetupRecipe CalSetupRecipe { get => _CalSetupRecipe; set => SetProperty(ref _CalSetupRecipe, value); }
#endregion
#region ButtonCommand
public ICommand ButtonCommandStart { get; set; }
public ICommand ButtonCommandStop { get; set; }
public ICommand ButtonCommandSave { get; set; }
#endregion
///
/// 생성자
///
/// 서브시스템 정보
public CalSettingViewModel(SubSysInfo subSysInfo) {
_SubSysInfo = subSysInfo;
_SubSysRecipe = VisionRecipeManager.GetSubSysRecipe(_SubSysInfo);
_PlanItems = new ObservableCollection();
ButtonCommandStart = new DelegateCommand(new Action