46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
/*
|
|
* Copyright (c) 2025 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Windows;
|
|
using VisionCommon;
|
|
|
|
namespace CogUI {
|
|
/// <summary>
|
|
/// Interaction logic for SubMaskViewWindow.xaml
|
|
/// </summary>
|
|
public partial class SubMaskViewWindow : Window, IPatternSettingWindow {
|
|
public string WINDOW_TITLE => "Sub-Pattern Mask Window";
|
|
private SubMaskView _subMaskView;
|
|
|
|
public SubMaskViewWindow(
|
|
PatternAgentBase patternAgent, PatternInfo patternInfo) {
|
|
InitializeComponent();
|
|
SetTitle();
|
|
CreateView(patternAgent, patternInfo);
|
|
}
|
|
|
|
public void SetTitle() {
|
|
Title = WINDOW_TITLE;
|
|
}
|
|
|
|
public void CreateView(
|
|
PatternAgentBase patternAgent, PatternInfo patternInfo) {
|
|
_subMaskView = new SubMaskView(patternAgent, patternInfo);
|
|
_subMaskView.ParentWindow = this;
|
|
gridSubMaskView.Children.Add(_subMaskView);
|
|
}
|
|
|
|
public void ResetPosition() {
|
|
Left = WindowUtil.GetLeftWithRatioOnMainWindow(0.4);
|
|
Top = WindowUtil.GetTopWithRatioOnMainWindow(0.4);
|
|
}
|
|
|
|
protected override void OnClosing(CancelEventArgs e) {
|
|
((IDisposable)_subMaskView).Dispose();
|
|
}
|
|
}
|
|
}
|