using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// /// Settings object for app.setLoginItemSettings() on macOS and Windows. /// /// Up-to-date with Electron API 39.2 public class LoginSettings { /// /// to open the app at login, to remove the app as a login item. /// Defaults to . /// public bool OpenAtLogin { get; set; } /// /// to open the app as hidden. Defaults to . The user can edit this /// setting from the System Preferences so app.getLoginItemSettings().wasOpenedAsHidden should be checked when the app is /// opened to know the current value. This setting is not available on MAS builds and does not work on macOS 13 and up. /// [SupportedOSPlatform("macos")] public bool OpenAsHidden { get; set; } /// /// The executable to launch at login. Defaults to process.execPath. /// [SupportedOSPlatform("windows")] public string Path { get; set; } /// /// The command-line arguments to pass to the executable. Defaults to an empty /// array.Take care to wrap paths in quotes. /// [SupportedOSPlatform("windows")] public string[] Args { get; set; } /// /// The type of service to add as a login item. Defaults to 'mainAppService'. Only available on macOS 13 and up. /// [SupportedOSPlatform("macos")] public string Type { get; set; } /// /// The name of the service. Required if Type is non-default. Only available on macOS 13 and up. /// [SupportedOSPlatform("macos")] public string ServiceName { get; set; } /// /// Change the startup approved registry key and enable/disable the app in Task Manager and Windows Settings. Defaults to true. /// [SupportedOSPlatform("windows")] public bool Enabled { get; set; } = true; /// /// Value name to write into registry. Defaults to the app's AppUserModelId(). /// [SupportedOSPlatform("windows")] public string Name { get; set; } } }