Local-mode composition root (SQLite index, one JobEngine fed by a single handler registration list), keyset-paged library with thumbnail cache and hover scrub, live job list with throttled updates and the shell job bar, settings with live template validation and encoder self-test, server connection with trust-on-first-use and DPAPI token, first-run welcome, About with update check, and --capture screenshots with synthetic data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
using System.Windows;
|
|
using Titano.App.Infrastructure;
|
|
using Titano.Ui.Controls;
|
|
|
|
namespace Titano.App.Shell;
|
|
|
|
/// <summary>Modal confirmation for trusting a certificate and for destructive actions (BRIEF §12.1).</summary>
|
|
public sealed partial class ConfirmDialog : TitanoWindow
|
|
{
|
|
public ConfirmDialog(ConfirmRequest request)
|
|
{
|
|
DataContext = request;
|
|
InitializeComponent();
|
|
Action.SetResourceReference(StyleProperty, request.IsDestructive ? "Button.Destructive" : "Button.Primary");
|
|
}
|
|
|
|
/// <summary>True when the user chose the action.</summary>
|
|
public static bool Ask(Window? owner, ConfirmRequest request)
|
|
{
|
|
var dialog = new ConfirmDialog(request);
|
|
if (owner is { IsVisible: true }) dialog.Owner = owner;
|
|
else dialog.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
|
return dialog.ShowDialog() == true;
|
|
}
|
|
|
|
private void OnSafe(object sender, RoutedEventArgs e) => DialogResult = false;
|
|
|
|
private void OnAction(object sender, RoutedEventArgs e) => DialogResult = true;
|
|
}
|