Add way to set flags for Electron before the app starts

This commit is contained in:
theolivenbaum
2021-09-07 14:36:57 +02:00
parent 801616cd53
commit dc2662e52e
5 changed files with 24 additions and 3 deletions

View File

@@ -539,9 +539,9 @@ namespace ElectronNET.API
public Task<string> GetNameAsync() => BridgeConnector.OnResult<string>("appGetName", "appGetNameCompleted");
internal App()
private App()
{
CommandLine = new CommandLine();
CommandLine = CommandLine.Instance;
}
internal static App Instance

View File

@@ -8,7 +8,7 @@ namespace ElectronNET.API
/// </summary>
public sealed class CommandLine
{
internal CommandLine() { }
private CommandLine() { }
internal static CommandLine Instance
{

View File

@@ -28,4 +28,10 @@ namespace ElectronNET.API.Entities
/// </summary>
customButtonsOnHover
}
public class TitleBarOverlayConfig
{
public string Color { get; set; }
public string SymbolColor { get; set; }
}
}

View File

@@ -171,6 +171,12 @@ namespace ElectronNET.API.Entities
/// </summary>
public bool Offscreen { get; set; }
/// <summary>
/// Whether to enable built-in spellcheck
/// </summary>
[DefaultValue(true)]
public bool Spellcheck { get; set; } = true;
/// <summary>
/// Whether to run Electron APIs and the specified preload script in a separate
/// JavaScript context. Defaults to false. The context that the preload script runs