2026-01-26 18:56:53 +09:00

42 lines
1.4 KiB
C#

using System;
using System.ComponentModel;
using System.Windows;
using VisionCommon;
namespace CogUI {
/// <summary>
/// Interaction logic for PreProcessingWindow.xaml
/// </summary>
public partial class PreProcessingWindow : Window, IPatternSettingWindow {
public string WINDOW_TITLE => "PreProcessing Window";
private PreProcessingSettingView _preProcessingSettingView;
public PreProcessingWindow(PatternInfo patternInfo, ICameraDisplay cameraDisplay) {
InitializeComponent();
SetTitle();
CreateView(patternInfo, cameraDisplay);
}
public void SetTitle() {
Title = WINDOW_TITLE;
}
public void CreateView(PatternInfo patternInfo, ICameraDisplay cameraDisplay) {
_preProcessingSettingView = new PreProcessingSettingView(patternInfo, cameraDisplay);
_preProcessingSettingView.ParentWindow = this;
preProcessingView.Children.Add(_preProcessingSettingView);
DataContext = null;
}
public void ResetPosition() {
Left = WindowUtil.GetLeftWithRatioOnMainWindow(0.63);
Top = WindowUtil.GetTopWithRatioOnMainWindow(0.16);
}
protected override void OnClosing(CancelEventArgs e) {
((IDisposable)_preProcessingSettingView).Dispose();
_preProcessingSettingView.DataContext = null;
}
}
}