mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-04-28 17:11:14 +00:00
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:
15
ElectronNET.API/Entities/DevToolsMode.cs
Normal file
15
ElectronNET.API/Entities/DevToolsMode.cs
Normal 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
|
||||
}
|
||||
}
|
||||
7
ElectronNET.API/Entities/Error.cs
Normal file
7
ElectronNET.API/Entities/Error.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
public class Error
|
||||
{
|
||||
public string Stack { get; set; }
|
||||
}
|
||||
}
|
||||
16
ElectronNET.API/Entities/OpenDevToolsOptions.cs
Normal file
16
ElectronNET.API/Entities/OpenDevToolsOptions.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
13
ElectronNET.API/Entities/OpenExternalOptions.cs
Normal file
13
ElectronNET.API/Entities/OpenExternalOptions.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
41
ElectronNET.API/Entities/ShortcutDetails.cs
Normal file
41
ElectronNET.API/Entities/ShortcutDetails.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
20
ElectronNET.API/Entities/ShortcutLinkOperation.cs
Normal file
20
ElectronNET.API/Entities/ShortcutLinkOperation.cs
Normal 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 doesn’t exist.
|
||||
/// </summary>
|
||||
replace
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user