Files
Explorer-Workbench/src/Explorer.App/PromptWindow.xaml.cs
netquick e9aba73552 Add Explorer Workbench with hierarchical, off-UI Storage analysis.
Storage queries run in the background with cancellation and covering indexes so switching views no longer freezes the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 12:43:05 +02:00

31 lines
760 B
C#

using System.Windows;
namespace Explorer.App;
public partial class PromptWindow : Window
{
public PromptWindow(string title, string message, string initial)
{
InitializeComponent();
Title = title;
Message.Text = message;
Input.Text = initial;
Input.SelectAll();
Loaded += (_, _) => Input.Focus();
}
public string Value => Input.Text;
private void OnOk(object sender, RoutedEventArgs e)
{
DialogResult = true;
Close();
}
public static string? Ask(Window owner, string title, string message, string initial)
{
var dlg = new PromptWindow(title, message, initial) { Owner = owner };
return dlg.ShowDialog() == true ? dlg.Value : null;
}
}