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 ImageMaskViewWindow.xaml
|
|
/// </summary>
|
|
public partial class ImageMaskViewWindow : Window, IPatternSettingWindow {
|
|
public string WINDOW_TITLE => "Mask Window";
|
|
private ImageMaskView _imageMaskView;
|
|
|
|
public ImageMaskViewWindow(
|
|
PatternAgentBase patternAgent, PatternInfo patternInfo, ICameraDisplay cameraDisplay) {
|
|
InitializeComponent();
|
|
SetTitle();
|
|
CreateView(patternAgent, patternInfo);
|
|
}
|
|
|
|
public void SetTitle() {
|
|
Title = WINDOW_TITLE;
|
|
}
|
|
|
|
public void CreateView(
|
|
PatternAgentBase patternAgent, PatternInfo patternInfo) {
|
|
_imageMaskView = new ImageMaskView(patternAgent, patternInfo);
|
|
_imageMaskView.ParentWindow = this;
|
|
gridImageMaskView.Children.Add(_imageMaskView);
|
|
}
|
|
|
|
public void ResetPosition() {
|
|
Left = WindowUtil.GetLeftWithRatioOnMainWindow(0.1);
|
|
Top = WindowUtil.GetTopWithRatioOnMainWindow(0.2);
|
|
}
|
|
|
|
protected override void OnClosing(CancelEventArgs e) {
|
|
((IDisposable)_imageMaskView).Dispose();
|
|
}
|
|
}
|
|
}
|