2025-01-05 08:52:37 +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;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Serein.Workbench.Themes
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// InputDialog.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class InputDialog : Window
|
|
|
|
|
|
{
|
2025-07-30 21:15:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 输入对话框的输入值
|
|
|
|
|
|
/// </summary>
|
2025-01-05 08:52:37 +08:00
|
|
|
|
public string InputValue { get; private set; }
|
|
|
|
|
|
|
2025-07-30 21:15:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 初始化输入对话框的新实例
|
|
|
|
|
|
/// </summary>
|
2025-01-05 08:52:37 +08:00
|
|
|
|
public InputDialog()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void ConfirmButton_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
InputValue = InputTextBox.Text;
|
|
|
|
|
|
DialogResult = true; // 设置返回结果为 true
|
|
|
|
|
|
Close(); // 关闭窗口
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
DialogResult = false; // 设置返回结果为 false
|
|
|
|
|
|
Close(); // 关闭窗口
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|