Class ToastFireNowGui
Shared "Fire Now" preview logic for a toast: dispatches a ShowToastSignal through the
live SerenityEditorSignalDispatcher, so both the standalone ToastPreviewWindow and
the Theme Builder inspector can preview a toast in Play Mode without duplicating the gating/dispatch code.
Inherited Members
Namespace: Serenity.Ui.Infrastructure.Editor.Components.Toast
Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
Syntax
public static class ToastFireNowGui
Remarks
Every public member is deliberately string/bool/void: Serenity.UnityUi.Installation.Editor (home
of UnityUiThemeDefinitionEditor) reaches this class only transitively through
Serenity.UnityUi.Infrastructure.Editor and does not reference the EventDispatcher editor assembly
directly — exposing a signal or dispatcher type here would force that reference.
Methods
DrawSection(string, bool, string)
Draws the shared preview section: a bold section label, a blocked-reason HelpBox when firing is not currently possible, and a disabled-when-blocked "Fire Now" button.
Declaration
public static void DrawSection(string message, bool translate, string sectionLabel = "Preview")
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The text the toast should display when fired. |
| bool | translate | Whether |
| string | sectionLabel | Section heading drawn above the button. |
FireNow(string, bool)
Dispatches a toast carrying message through the live dispatcher.
Declaration
public static bool FireNow(string message, bool translate)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The text the toast should display. |
| bool | translate | Whether |
Returns
| Type | Description |
|---|---|
| bool |
|
GetBlockedReason()
Why the preview cannot run right now, or null when it can.
Declaration
public static string GetBlockedReason()
Returns
| Type | Description |
|---|---|
| string |