Generated by AurionDocs
Job ID: 934f8c39-8082-4942-8d17-72ed8f5f8d50
Source commit: 40aea9a
1.4 KiB
UpdateConfirmDialog
File:
src/EchoHub.Client/UI/Dialogs/UpdateConfirmDialog.cs
Kind: class
public sealed class UpdateConfirmDialog
UpdateConfirmDialog is a small, self-contained UI helper that presents a modal update prompt and returns the user's decision as a boolean. Call UpdateConfirmDialog.Show with an IApplication and the current and latest versions; it constructs a Dialog titled 'Update Available' containing a Label with the version message and two Buttons, runs the dialog, and returns true when the user chooses to perform the update.
Remarks
By encapsulating the entire dialog flow, this symbol isolates the update-confirmation UX from the rest of the UI, reducing duplication across the codebase. The modal pattern—calling app.Run(dialog) followed by app.RequestStop()—ensures callers receive the result synchronously without needing to manage focus or window lifecycles themselves. It also makes testing easier by providing a single, predictable entry point for the confirmation action.
Notes
- The dialog is modal and blocks until the user presses
UpdateorCancel; callers should not attempt to perform further UI work until afterShowreturns. - It interpolates
currentVersionandnewVersioninto the message; ensure these values are safe to display and do not contain unexpected control characters.