This commit is contained in:
rafael-aero
2021-09-15 10:58:45 +02:00
11 changed files with 174 additions and 46 deletions

View File

@@ -570,9 +570,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
@@ -1369,6 +1369,13 @@ namespace ElectronNET.API
/// <param name="fn">The handler</param>
public void Once(string eventName, Action<object> fn) => Events.Instance.Once(ModuleName, eventName, fn);
/// <summary>
/// If you're using a splashscreen in the electron.manifest.json, the window will ony be fully destroyed once you call this method once.
/// You should only do this after creating another window, to avoid a bug where the Electron renderer process frezees till any window interaction.
/// </summary>
public void DestroySplashScreen() => BridgeConnector.Emit("splashscreen-destroy");
private readonly JsonSerializer _jsonSerializer = new JsonSerializer()
{
ContractResolver = new CamelCasePropertyNamesContractResolver()