mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-04-23 20:59:34 +08:00
25 lines
654 B
C#
25 lines
654 B
C#
using System.Windows;
|
|
|
|
namespace Milimoe.FunGame.Testing.Desktop.Solutions.NovelEditor
|
|
{
|
|
public partial class InputDialog : Window
|
|
{
|
|
public string ResponseText { get; set; } = "";
|
|
|
|
public InputDialog(string question, string title = "InputDialog")
|
|
{
|
|
InitializeComponent();
|
|
lblQuestion.Text = question;
|
|
Title = title;
|
|
txtInput.Loaded += (sender, e) => txtInput.Focus();
|
|
}
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
ResponseText = txtInput.Text;
|
|
DialogResult = true;
|
|
Close();
|
|
}
|
|
}
|
|
}
|