48 lines
1.3 KiB
C#
48 lines
1.3 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 CameraLightSettingWindow : Window {
|
|
private static Logger _Logger = new Logger(typeof(CameraLightSettingWindow).Name);
|
|
private FovInfo _FovInfo;
|
|
private delegate void HideWindow();
|
|
|
|
public CameraLightSettingWindow(FovInfo fovInfo) {
|
|
if (fovInfo == null) {
|
|
_Logger.FuncE("fovInfo is null.");
|
|
return;
|
|
}
|
|
|
|
_FovInfo = fovInfo;
|
|
|
|
InitializeComponent();
|
|
CreateView();
|
|
}
|
|
|
|
private void CreateView() {
|
|
try {
|
|
gridLightSettingView.Children.Add(new CameraLightSettingView(_FovInfo));
|
|
}
|
|
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();
|
|
}
|
|
}
|
|
} |