51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
/*
|
|
* Copyright (c) 2025 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
using Aurora.Api;
|
|
using System;
|
|
using System.Windows;
|
|
using System.ComponentModel;
|
|
using System.Windows.Threading;
|
|
using VisionCommon;
|
|
|
|
namespace VisionCommonUI {
|
|
public partial class PatternLightSettingWindow : Window {
|
|
private static Logger _Logger = new Logger(typeof(PatternLightSettingWindow).Name);
|
|
private FovInfo _FovInfo;
|
|
private PatternInfo _PatternInfo;
|
|
|
|
private delegate void HideWindow();
|
|
|
|
public PatternLightSettingWindow(FovInfo fovInfo, PatternInfo patternInfo) {
|
|
if (fovInfo == null) {
|
|
_Logger.FuncE("fovInfo is null.");
|
|
return;
|
|
}
|
|
|
|
_FovInfo = fovInfo;
|
|
_PatternInfo = patternInfo;
|
|
|
|
InitializeComponent();
|
|
CreateView();
|
|
}
|
|
|
|
private void CreateView() {
|
|
try {
|
|
gridLightSettingView.Children.Add(new PatternLightSettingView(_FovInfo, _PatternInfo));
|
|
}
|
|
catch (Exception e) {
|
|
_Logger.FuncE(e.Message);
|
|
}
|
|
}
|
|
|
|
protected override void OnClosing(CancelEventArgs e) {
|
|
e.Cancel = true;
|
|
Dispatcher.BeginInvoke(DispatcherPriority.Normal, new HideWindow(_HideWindow));
|
|
}
|
|
|
|
private void _HideWindow() {
|
|
this.Hide();
|
|
}
|
|
}
|
|
} |