2021-07-23 09:42:22 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
|
|
2022-12-12 22:33:17 +08:00
|
|
|
|
namespace AIStudio.Wpf.DiagramDesigner.Controls
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// PopupWindow.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class PopupWindow : Window
|
|
|
|
|
|
{
|
|
|
|
|
|
public PopupWindow()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-05-01 23:07:19 +08:00
|
|
|
|
public void Init(double width, double height)
|
|
|
|
|
|
{
|
|
|
|
|
|
grid.Width = width;
|
|
|
|
|
|
grid.Height = height;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-07-23 09:42:22 +08:00
|
|
|
|
private void Ok_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.DialogResult = true;
|
|
|
|
|
|
this.Close();
|
|
|
|
|
|
}
|
2023-04-22 21:06:52 +08:00
|
|
|
|
|
|
|
|
|
|
protected override void OnClosed(EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnClosed(e);
|
|
|
|
|
|
if (this.DataContext is IDisposable disposable)
|
|
|
|
|
|
{
|
|
|
|
|
|
disposable.Dispose();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-07-23 09:42:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|