implement Demo App sections: Dialogs, Menu, Tray, Shell, CrashHang, Notification, Shortcuts etc. Fix some API bugs and implement GlobalShortcut-, Shell- and WebContents-API.

This commit is contained in:
Gregor Biswanger
2017-10-21 04:37:01 +02:00
parent 9046f6ca25
commit 248ddde82b
61 changed files with 2505 additions and 57 deletions

View File

@@ -0,0 +1,15 @@
namespace ElectronNET.API.Entities
{
/// <summary>
/// Opens the devtools with specified dock state, can be right, bottom, undocked,
/// detach.Defaults to last used dock state.In undocked mode it's possible to dock
/// back.In detach mode it's not.
/// </summary>
public enum DevToolsMode
{
right,
bottom,
undocked,
detach
}
}

View File

@@ -0,0 +1,7 @@
namespace ElectronNET.API.Entities
{
public class Error
{
public string Stack { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace ElectronNET.API.Entities
{
public class OpenDevToolsOptions
{
/// <summary>
/// Opens the devtools with specified dock state, can be right, bottom, undocked,
/// detach.Defaults to last used dock state.In undocked mode it's possible to dock
/// back.In detach mode it's not.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public DevToolsMode Mode { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System.ComponentModel;
namespace ElectronNET.API.Entities
{
public class OpenExternalOptions
{
/// <summary>
/// true to bring the opened application to the foreground. The default is true.
/// </summary>
[DefaultValue(true)]
public bool Activate { get; set; } = true;
}
}

View File

@@ -0,0 +1,41 @@
namespace ElectronNET.API
{
public class ShortcutDetails
{
/// <summary>
/// The Application User Model ID. Default is empty.
/// </summary>
public string AppUserModelId { get; set; }
/// <summary>
/// The arguments to be applied to target when launching from this shortcut. Default is empty.
/// </summary>
public string Args { get; set; }
/// <summary>
/// The working directory. Default is empty.
/// </summary>
public string Cwd { get; set; }
/// <summary>
/// The description of the shortcut. Default is empty.
/// </summary>
public string Description { get; set; }
/// <summary>
/// The path to the icon, can be a DLL or EXE. icon and iconIndex have to be set
/// together.Default is empty, which uses the target's icon.
/// </summary>
public string Icon { get; set; }
/// <summary>
/// The resource ID of icon when icon is a DLL or EXE. Default is 0.
/// </summary>
public int IconIndex { get; set; }
/// <summary>
/// The target to launch from this shortcut.
/// </summary>
public string Target { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
namespace ElectronNET.API
{
public enum ShortcutLinkOperation
{
/// <summary>
/// Creates a new shortcut, overwriting if necessary.
/// </summary>
create,
/// <summary>
/// Updates specified properties only on an existing shortcut.
/// </summary>
update,
/// <summary>
/// Overwrites an existing shortcut, fails if the shortcut doesnt exist.
/// </summary>
replace
}
}