48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
/*
|
|
* Copyright (c) 2025 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
using System;
|
|
using System.Reactive.Disposables;
|
|
using System.Reactive.Linq;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
using Aurora;
|
|
using Aurora.Api;
|
|
using VisionCommon;
|
|
|
|
namespace VisionUI.Setup {
|
|
/// <summary>
|
|
/// 센터 튜닝 로그 뷰
|
|
/// CenterTuningLogView.xaml behind code
|
|
/// </summary>
|
|
public partial class CenterTuningLogView : UserControl {
|
|
private SubSysInfo _SubSysInfo;
|
|
private SubSysRecipe _SubSysRecipe;
|
|
/// <summary>
|
|
/// 생성자
|
|
/// </summary>
|
|
/// <param name="subSysInfo">서브시스템 정보</param>
|
|
public CenterTuningLogView(SubSysInfo subSysInfo) {
|
|
_SubSysInfo = subSysInfo;
|
|
_SubSysRecipe = VisionRecipeManager.GetSubSysRecipe(subSysInfo);
|
|
|
|
InitializeComponent();
|
|
SetObservable();
|
|
}
|
|
|
|
private void SetObservable() {
|
|
var disposable = VisionEnv.AuroraEnv.EventObservable.AsObservable(VisionEventId.NOTIFY_CENTERTUNING_COMPLETED).
|
|
Where(x => x.From == _SubSysInfo.SubSysName).Subscribe(msg => ChangeLastRowColor(msg));
|
|
DisposableManager.AddDisposable(eDpsGroupKey.SubMenu_CenterTuning, disposable);
|
|
}
|
|
|
|
private void ChangeLastRowColor(EventMessage msg) {
|
|
Application.Current.Dispatcher.Invoke((Action)(() => {
|
|
int currentCnt = (int)msg.Param;
|
|
dataGridCenterTuning.SelectedIndex = currentCnt - 1;
|
|
}));
|
|
}
|
|
}
|
|
} |