Update all model classes to Electron API 39.2

This commit is contained in:
softworkz
2025-11-22 02:16:10 +01:00
parent 1d554fda60
commit 6761119241
114 changed files with 1527 additions and 499 deletions

View File

@@ -1,88 +1,82 @@
using System.Text.Json.Serialization;
using System.Runtime.Versioning;
namespace ElectronNET.API.Entities
{
/// <summary>
///
/// Options for dialog.showMessageBox / dialog.showMessageBoxSync.
/// </summary>
/// <remarks>Up-to-date with Electron API 39.2</remarks>
public class MessageBoxOptions
{
/// <summary>
/// Can be "none", "info", "error", "question" or "warning". On Windows, "question"
/// displays the same icon as "info", unless you set an icon using the "icon"
/// option. On macOS, both "warning" and "error" display the same warning icon.
/// Gets or sets the type. Can be "none", "info", "error", "question" or "warning". On Windows, "question" displays the same icon as "info", unless you set an icon using the "icon" option. On macOS, both "warning" and "error" display the same warning icon.
/// </summary>
public MessageBoxType Type { get; set; }
/// <summary>
/// Array of texts for buttons. On Windows, an empty array will result in one button
/// labeled "OK".
/// Gets or sets the array of texts for buttons. On Windows, an empty array will result in one button labeled "OK".
/// </summary>
public string[] Buttons { get; set; }
/// <summary>
/// Index of the button in the buttons array which will be selected by default when
/// the message box opens.
/// Gets or sets the index of the button in the buttons array which will be selected by default when the message box opens.
/// </summary>
public int DefaultId { get; set; }
/// <summary>
/// Title of the message box, some platforms will not show it.
/// Gets or sets the title of the message box; some platforms will not show it.
/// </summary>
public string Title { get; set; }
/// <summary>
/// Content of the message box.
/// Gets or sets the content of the message box.
/// </summary>
public string Message { get; set; }
/// <summary>
/// Extra information of the message.
/// Gets or sets the extra information of the message.
/// </summary>
public string Detail { get; set; }
/// <summary>
/// If provided, the message box will include a checkbox with the given label. The
/// checkbox state can be inspected only when using callback.
/// Gets or sets the checkbox label. If provided, the message box will include a checkbox with the given label.
/// </summary>
public string CheckboxLabel { get; set; }
/// <summary>
/// Initial checked state of the checkbox. false by default.
/// Gets or sets the initial checked state of the checkbox. Defaults to false.
/// </summary>
public bool CheckboxChecked { get; set; }
/// <summary>
/// Gets or sets the icon.
/// Gets or sets the icon for the message box.
/// </summary>
/// <value>
/// The icon.
/// </value>
public string Icon { get; set; }
/// <summary>
/// The index of the button to be used to cancel the dialog, via the Esc key. By
/// default this is assigned to the first button with "cancel" or "no" as the label.
/// If no such labeled buttons exist and this option is not set, 0 will be used as
/// the return value or callback response. This option is ignored on Windows.
/// Gets or sets the custom width of the text in the message box.
/// </summary>
[SupportedOSPlatform("macos")]
public int? TextWidth { get; set; }
/// <summary>
/// Gets or sets the index of the button to be used to cancel the dialog via the Esc key. By default this is assigned to the first button with "cancel" or "no" as the label. If no such labeled buttons exist and this option is not set, 0 will be used.
/// </summary>
public int CancelId { get; set; }
/// <summary>
/// On Windows Electron will try to figure out which one of the buttons are common
/// buttons(like "Cancel" or "Yes"), and show the others as command links in the
/// dialog.This can make the dialog appear in the style of modern Windows apps. If
/// you don't like this behavior, you can set noLink to true.
/// Gets or sets a value indicating whether to disable Windows command-links behavior (noLink).
/// On Windows Electron will try to figure out which one of the buttons are common buttons (like "Cancel" or "Yes"), and show the others as command links in the dialog. Set to true to disable this behavior.
/// </summary>
[SupportedOSPlatform("windows")]
public bool NoLink { get; set; }
/// <summary>
/// Normalize the keyboard access keys across platforms. Default is false. Enabling
/// this assumes AND character is used in the button labels for the placement of the keyboard
/// Gets or sets a value indicating whether to normalize the keyboard access keys across platforms. Default is false. Enabling this assumes '&amp;' is used in the button labels for the placement of the keyboard
/// shortcut access key and labels will be converted so they work correctly on each
/// platform, AND characters are removed on macOS, converted to _ on Linux, and left
/// untouched on Windows.For example, a button label of VieANDw will be converted to
/// Vie_w on Linux and View on macOS and can be selected via Alt-W on Windows and
/// platform, '&amp;' characters are removed on macOS, converted to '_' on Linux, and left
/// untouched on Windows. For example, a button label of "View" will be converted to "Vie_w" on Linux and "View" on macOS and can be selected via Alt-W on Windows and
/// Linux.
/// </summary>
public bool NormalizeAccessKeys { get; set; }