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>
This commit is contained in:
30
src/Explorer.App/PromptWindow.xaml.cs
Normal file
30
src/Explorer.App/PromptWindow.xaml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user