mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-08-12 02:59:55 +00:00
include the missing xml code documentations
This commit is contained in:
@@ -7,6 +7,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// Control your application's event lifecycle.
|
||||
/// </summary>
|
||||
public sealed class App
|
||||
{
|
||||
/// <summary>
|
||||
@@ -1334,7 +1337,7 @@ namespace ElectronNET.API
|
||||
return await taskCompletionSource.Task;
|
||||
}
|
||||
|
||||
// TODO: Menu lösung muss gemacht werden und imeplementiert
|
||||
// TODO: Menu lösung für macOS muss gemacht werden und imeplementiert
|
||||
/// <summary>
|
||||
/// Sets the application's dock menu.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class BridgeSettings
|
||||
{
|
||||
public static string SocketPort { get; set; }
|
||||
public static string WebPort { get; set; }
|
||||
/// <summary>
|
||||
/// Gets the socket port.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The socket port.
|
||||
/// </value>
|
||||
public static string SocketPort { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the web port.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The web port.
|
||||
/// </value>
|
||||
public static string WebPort { get; internal set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,17 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// Create and control browser windows.
|
||||
/// </summary>
|
||||
public class BrowserWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The identifier.
|
||||
/// </value>
|
||||
public int Id { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -1112,6 +1121,10 @@ namespace ElectronNET.API
|
||||
BridgeConnector.Socket.Emit("browserWindowSetBounds", Id, JObject.FromObject(bounds, _jsonSerializer), animate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the bounds asynchronous.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task<Rectangle> GetBoundsAsync()
|
||||
{
|
||||
var taskCompletionSource = new TaskCompletionSource<Rectangle>();
|
||||
@@ -1146,6 +1159,10 @@ namespace ElectronNET.API
|
||||
BridgeConnector.Socket.Emit("browserWindowSetContentBounds", Id, JObject.FromObject(bounds, _jsonSerializer), animate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content bounds asynchronous.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task<Rectangle> GetContentBoundsAsync()
|
||||
{
|
||||
var taskCompletionSource = new TaskCompletionSource<Rectangle>();
|
||||
@@ -1166,7 +1183,6 @@ namespace ElectronNET.API
|
||||
/// </summary>
|
||||
/// <param name="width"></param>
|
||||
/// <param name="height"></param>
|
||||
/// <param name="animate"></param>
|
||||
public void SetSize(int width, int height)
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowSetSize", Id, width, height);
|
||||
@@ -1207,7 +1223,6 @@ namespace ElectronNET.API
|
||||
/// </summary>
|
||||
/// <param name="width"></param>
|
||||
/// <param name="height"></param>
|
||||
/// <param name="animate"></param>
|
||||
public void SetContentSize(int width, int height)
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowSetContentSize", Id, width, height);
|
||||
@@ -1742,11 +1757,17 @@ namespace ElectronNET.API
|
||||
return taskCompletionSource.Task;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Focuses the on web view.
|
||||
/// </summary>
|
||||
public void FocusOnWebView()
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowFocusOnWebView", Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blurs the web view.
|
||||
/// </summary>
|
||||
public void BlurWebView()
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowBlurWebView", Id);
|
||||
@@ -1781,7 +1802,13 @@ namespace ElectronNET.API
|
||||
BridgeConnector.Socket.Emit("browserWindowReload", Id);
|
||||
}
|
||||
|
||||
public IReadOnlyCollection<MenuItem> Items { get { return _items.AsReadOnly(); } }
|
||||
/// <summary>
|
||||
/// Gets the menu items.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The menu items.
|
||||
/// </value>
|
||||
public IReadOnlyCollection<MenuItem> MenuItems { get { return _items.AsReadOnly(); } }
|
||||
private List<MenuItem> _items = new List<MenuItem>();
|
||||
|
||||
/// <summary>
|
||||
@@ -1804,7 +1831,7 @@ namespace ElectronNET.API
|
||||
|
||||
/// <summary>
|
||||
/// Sets progress value in progress bar. Valid range is [0, 1.0]. Remove progress
|
||||
/// bar when progress < 0; Change to indeterminate mode when progress > 1. On Linux
|
||||
/// bar when progress smaler as 0; Change to indeterminate mode when progress bigger as 1. On Linux
|
||||
/// platform, only supports Unity desktop environment, you need to specify the
|
||||
/// .desktop file name to desktopName field in package.json.By default, it will
|
||||
/// assume app.getName().desktop.On Windows, a mode can be passed.Accepted values
|
||||
@@ -1820,7 +1847,7 @@ namespace ElectronNET.API
|
||||
|
||||
/// <summary>
|
||||
/// Sets progress value in progress bar. Valid range is [0, 1.0]. Remove progress
|
||||
/// bar when progress < 0; Change to indeterminate mode when progress > 1. On Linux
|
||||
/// bar when progress smaler as 0; Change to indeterminate mode when progress bigger as 1. On Linux
|
||||
/// platform, only supports Unity desktop environment, you need to specify the
|
||||
/// .desktop file name to desktopName field in package.json.By default, it will
|
||||
/// assume app.getName().desktop.On Windows, a mode can be passed.Accepted values
|
||||
@@ -1865,6 +1892,12 @@ namespace ElectronNET.API
|
||||
return taskCompletionSource.Task;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the thumbar buttons.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The thumbar buttons.
|
||||
/// </value>
|
||||
public IReadOnlyCollection<ThumbarButton> ThumbarButtons { get { return _thumbarButtons.AsReadOnly(); } }
|
||||
private List<ThumbarButton> _thumbarButtons = new List<ThumbarButton>();
|
||||
|
||||
@@ -2054,7 +2087,7 @@ namespace ElectronNET.API
|
||||
/// On macOS it sets the NSWindow’s sharingType to NSWindowSharingNone.
|
||||
/// On Windows it calls SetWindowDisplayAffinity with WDA_MONITOR.
|
||||
/// </summary>
|
||||
/// <param name="ignore"></param>
|
||||
/// <param name="enable"></param>
|
||||
public void SetContentProtection(bool enable)
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowSetContentProtection", Id, enable);
|
||||
@@ -2073,7 +2106,7 @@ namespace ElectronNET.API
|
||||
/// Sets parent as current window’s parent window,
|
||||
/// passing null will turn current window into a top-level window.
|
||||
/// </summary>
|
||||
/// <param name="browserWindow"></param>
|
||||
/// <param name="parent"></param>
|
||||
public void SetParentWindow(BrowserWindow parent)
|
||||
{
|
||||
BridgeConnector.Socket.Emit("browserWindowSetParentWindow", Id, JObject.FromObject(parent, _jsonSerializer));
|
||||
|
||||
@@ -7,6 +7,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// Display native system dialogs for opening and saving files, alerting, etc.
|
||||
/// </summary>
|
||||
public sealed class Dialog
|
||||
{
|
||||
private static Dialog _dialog;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// The Electron.NET API
|
||||
/// </summary>
|
||||
public static class Electron
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class AboutPanelOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class AppDetailsOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -4,6 +4,9 @@ using System.ComponentModel;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BrowserWindowOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CPUUsage
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Certificate
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CertificatePrincipal
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CertificateTrustDialogOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,9 +1,33 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the text.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The text.
|
||||
/// </value>
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HTML.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The HTML.
|
||||
/// </value>
|
||||
public string Html { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the RTF.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The RTF.
|
||||
/// </value>
|
||||
public string Rtf { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DefaultFontFamily
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -7,9 +7,24 @@
|
||||
/// </summary>
|
||||
public enum DevToolsMode
|
||||
{
|
||||
/// <summary>
|
||||
/// The right
|
||||
/// </summary>
|
||||
right,
|
||||
|
||||
/// <summary>
|
||||
/// The bottom
|
||||
/// </summary>
|
||||
bottom,
|
||||
|
||||
/// <summary>
|
||||
/// The undocked
|
||||
/// </summary>
|
||||
undocked,
|
||||
|
||||
/// <summary>
|
||||
/// The detach
|
||||
/// </summary>
|
||||
detach
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
@@ -8,8 +6,11 @@ namespace ElectronNET.API.Entities
|
||||
public class Display
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// Gets or sets the bounds.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The bounds.
|
||||
/// </value>
|
||||
public Rectangle Bounds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -28,8 +29,11 @@ namespace ElectronNET.API.Entities
|
||||
public int ScaleFactor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Gets or sets the size.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The size.
|
||||
/// </value>
|
||||
public Size Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -38,13 +42,19 @@ namespace ElectronNET.API.Entities
|
||||
public string TouchSupport { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Gets or sets the work area.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The work area.
|
||||
/// </value>
|
||||
public Rectangle WorkArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Gets or sets the size of the work area.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The size of the work area.
|
||||
/// </value>
|
||||
public Size WorkAreaSize { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,32 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DisplayBalloonOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the icon.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The icon.
|
||||
/// </value>
|
||||
public string Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The title.
|
||||
/// </value>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the content.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The content.
|
||||
/// </value>
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,18 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum DockBounceType
|
||||
{
|
||||
/// <summary>
|
||||
/// The critical
|
||||
/// </summary>
|
||||
critical,
|
||||
|
||||
/// <summary>
|
||||
/// The informational
|
||||
/// </summary>
|
||||
informational
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Error
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the stack.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The stack.
|
||||
/// </value>
|
||||
public string Stack { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,24 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class FileFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the extensions.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The extensions.
|
||||
/// </value>
|
||||
public string[] Extensions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The name.
|
||||
/// </value>
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,22 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class FileIconOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the size.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The size.
|
||||
/// </value>
|
||||
public string Size { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileIconOptions"/> class.
|
||||
/// </summary>
|
||||
/// <param name="fileIconSize">Size of the file icon.</param>
|
||||
public FileIconOptions(FileIconSize fileIconSize)
|
||||
{
|
||||
Size = fileIconSize.ToString();
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum FileIconSize
|
||||
{
|
||||
/// <summary>
|
||||
/// The small
|
||||
/// </summary>
|
||||
small,
|
||||
|
||||
/// <summary>
|
||||
/// The normal
|
||||
/// </summary>
|
||||
normal,
|
||||
|
||||
/// <summary>
|
||||
/// The large
|
||||
/// </summary>
|
||||
large
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class GPUFeatureStatus
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum HighlightMode
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ImportCertificateOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -4,6 +4,9 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class JumpListCategory
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum JumpListCategoryType
|
||||
{
|
||||
/// <summary>
|
||||
/// The tasks
|
||||
/// </summary>
|
||||
tasks,
|
||||
|
||||
/// <summary>
|
||||
/// The frequent
|
||||
/// </summary>
|
||||
frequent,
|
||||
|
||||
/// <summary>
|
||||
/// The recent
|
||||
/// </summary>
|
||||
recent,
|
||||
|
||||
/// <summary>
|
||||
/// The custom
|
||||
/// </summary>
|
||||
custom
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,9 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class JumpListItem
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum JumpListItemType
|
||||
{
|
||||
/// <summary>
|
||||
/// The task
|
||||
/// </summary>
|
||||
task,
|
||||
|
||||
/// <summary>
|
||||
/// The separator
|
||||
/// </summary>
|
||||
separator,
|
||||
|
||||
/// <summary>
|
||||
/// The file
|
||||
/// </summary>
|
||||
file
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class JumpListSettings
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoadURLOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginItemSettings
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginItemSettingsOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginSettings
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MemoryInfo
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -4,6 +4,9 @@ using System;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MenuItem
|
||||
{
|
||||
/// <summary>
|
||||
@@ -27,15 +30,39 @@ namespace ElectronNET.API.Entities
|
||||
public MenuType Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the label.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The label.
|
||||
/// </value>
|
||||
public string Label { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the sublabel.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The sublabel.
|
||||
/// </value>
|
||||
public string Sublabel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the accelerator.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The accelerator.
|
||||
/// </value>
|
||||
public string Accelerator { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the icon.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The icon.
|
||||
/// </value>
|
||||
public string Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,14 +1,48 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum MenuRole
|
||||
{
|
||||
/// <summary>
|
||||
/// The undo
|
||||
/// </summary>
|
||||
undo,
|
||||
|
||||
/// <summary>
|
||||
/// The redo
|
||||
/// </summary>
|
||||
redo,
|
||||
|
||||
/// <summary>
|
||||
/// The cut
|
||||
/// </summary>
|
||||
cut,
|
||||
|
||||
/// <summary>
|
||||
/// The copy
|
||||
/// </summary>
|
||||
copy,
|
||||
|
||||
/// <summary>
|
||||
/// The paste
|
||||
/// </summary>
|
||||
paste,
|
||||
|
||||
/// <summary>
|
||||
/// The pasteandmatchstyle
|
||||
/// </summary>
|
||||
pasteandmatchstyle,
|
||||
|
||||
/// <summary>
|
||||
/// The selectall
|
||||
/// </summary>
|
||||
selectall,
|
||||
|
||||
/// <summary>
|
||||
/// The delete
|
||||
/// </summary>
|
||||
delete,
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,11 +1,33 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum MenuType
|
||||
{
|
||||
/// <summary>
|
||||
/// The normal
|
||||
/// </summary>
|
||||
normal,
|
||||
|
||||
/// <summary>
|
||||
/// The separator
|
||||
/// </summary>
|
||||
separator,
|
||||
|
||||
/// <summary>
|
||||
/// The submenu
|
||||
/// </summary>
|
||||
submenu,
|
||||
|
||||
/// <summary>
|
||||
/// The checkbox
|
||||
/// </summary>
|
||||
checkbox,
|
||||
|
||||
/// <summary>
|
||||
/// The radio
|
||||
/// </summary>
|
||||
radio
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,9 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MessageBoxOptions
|
||||
{
|
||||
/// <summary>
|
||||
@@ -51,6 +54,12 @@ namespace ElectronNET.API.Entities
|
||||
/// </summary>
|
||||
public bool CheckboxChecked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the icon.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The icon.
|
||||
/// </value>
|
||||
public string Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -80,6 +89,10 @@ namespace ElectronNET.API.Entities
|
||||
/// </summary>
|
||||
public bool NormalizeAccessKeys { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MessageBoxOptions"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
public MessageBoxOptions(string message)
|
||||
{
|
||||
Message = message;
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MessageBoxResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the response.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The response.
|
||||
/// </value>
|
||||
public int Response { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [checkbox checked].
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [checkbox checked]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool CheckboxChecked { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,33 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum MessageBoxType
|
||||
{
|
||||
/// <summary>
|
||||
/// The none
|
||||
/// </summary>
|
||||
none,
|
||||
|
||||
/// <summary>
|
||||
/// The information
|
||||
/// </summary>
|
||||
info,
|
||||
|
||||
/// <summary>
|
||||
/// The error
|
||||
/// </summary>
|
||||
error,
|
||||
|
||||
/// <summary>
|
||||
/// The question
|
||||
/// </summary>
|
||||
question,
|
||||
|
||||
/// <summary>
|
||||
/// The warning
|
||||
/// </summary>
|
||||
warning
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
// TODO: Fertig coden
|
||||
// TODO: Need some of real code :)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NativeImage
|
||||
{
|
||||
// public static NativeImage CreateEmpty()
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NotificationAction
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -3,6 +3,9 @@ using System;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NotificationOptions
|
||||
{
|
||||
/// <summary>
|
||||
@@ -61,6 +64,12 @@ namespace ElectronNET.API.Entities
|
||||
[JsonIgnore]
|
||||
public Action OnShow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the show identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The show identifier.
|
||||
/// </value>
|
||||
[JsonProperty]
|
||||
internal string ShowID { get; set; }
|
||||
|
||||
@@ -70,6 +79,12 @@ namespace ElectronNET.API.Entities
|
||||
[JsonIgnore]
|
||||
public Action OnClick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the click identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The click identifier.
|
||||
/// </value>
|
||||
[JsonProperty]
|
||||
internal string ClickID { get; set; }
|
||||
|
||||
@@ -81,6 +96,12 @@ namespace ElectronNET.API.Entities
|
||||
[JsonIgnore]
|
||||
public Action OnClose { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the close identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The close identifier.
|
||||
/// </value>
|
||||
[JsonProperty]
|
||||
internal string CloseID { get; set; }
|
||||
|
||||
@@ -92,6 +113,12 @@ namespace ElectronNET.API.Entities
|
||||
[JsonIgnore]
|
||||
public Action<string> OnReply { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the reply identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The reply identifier.
|
||||
/// </value>
|
||||
[JsonProperty]
|
||||
internal string ReplyID { get; set; }
|
||||
|
||||
@@ -101,9 +128,20 @@ namespace ElectronNET.API.Entities
|
||||
[JsonIgnore]
|
||||
public Action<string> OnAction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the action identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The action identifier.
|
||||
/// </value>
|
||||
[JsonProperty]
|
||||
internal string ActionID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NotificationOptions"/> class.
|
||||
/// </summary>
|
||||
/// <param name="title">The title.</param>
|
||||
/// <param name="body">The body.</param>
|
||||
public NotificationOptions(string title, string body)
|
||||
{
|
||||
Title = title;
|
||||
|
||||
@@ -2,19 +2,53 @@
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum OnTopLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// The normal
|
||||
/// </summary>
|
||||
normal,
|
||||
|
||||
/// <summary>
|
||||
/// The floating
|
||||
/// </summary>
|
||||
floating,
|
||||
|
||||
/// <summary>
|
||||
/// The torn off menu
|
||||
/// </summary>
|
||||
[Description("torn-off-menu")]
|
||||
tornOffMenu,
|
||||
|
||||
/// <summary>
|
||||
/// The modal panel
|
||||
/// </summary>
|
||||
[Description("modal-panel")]
|
||||
modalPanel,
|
||||
|
||||
/// <summary>
|
||||
/// The main menu
|
||||
/// </summary>
|
||||
[Description("main-menu")]
|
||||
mainMenu,
|
||||
|
||||
/// <summary>
|
||||
/// The status
|
||||
/// </summary>
|
||||
status,
|
||||
|
||||
/// <summary>
|
||||
/// The pop up menu
|
||||
/// </summary>
|
||||
[Description("pop-up-menu")]
|
||||
popUpMenu,
|
||||
|
||||
/// <summary>
|
||||
/// The screen saver
|
||||
/// </summary>
|
||||
[Description("screen-saver")]
|
||||
screenSaver
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class OpenDevToolsOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -3,9 +3,25 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class OpenDialogOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The title.
|
||||
/// </value>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default path.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The default path.
|
||||
/// </value>
|
||||
public string DefaultPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,14 +1,48 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum OpenDialogProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// The open file
|
||||
/// </summary>
|
||||
openFile,
|
||||
|
||||
/// <summary>
|
||||
/// The open directory
|
||||
/// </summary>
|
||||
openDirectory,
|
||||
|
||||
/// <summary>
|
||||
/// The multi selections
|
||||
/// </summary>
|
||||
multiSelections,
|
||||
|
||||
/// <summary>
|
||||
/// The show hidden files
|
||||
/// </summary>
|
||||
showHiddenFiles,
|
||||
|
||||
/// <summary>
|
||||
/// The create directory
|
||||
/// </summary>
|
||||
createDirectory,
|
||||
|
||||
/// <summary>
|
||||
/// The prompt to create
|
||||
/// </summary>
|
||||
promptToCreate,
|
||||
|
||||
/// <summary>
|
||||
/// The no resolve aliases
|
||||
/// </summary>
|
||||
noResolveAliases,
|
||||
|
||||
/// <summary>
|
||||
/// The treat package as directory
|
||||
/// </summary>
|
||||
treatPackageAsDirectory
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class OpenExternalOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum PathName
|
||||
{
|
||||
/// <summary>
|
||||
@@ -64,7 +67,7 @@
|
||||
videos,
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// The logs
|
||||
/// </summary>
|
||||
logs,
|
||||
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Point
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the x.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The x.
|
||||
/// </value>
|
||||
public int X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the y.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The y.
|
||||
/// </value>
|
||||
public int Y { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PrintToPDFOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ProcessMetric
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,11 +1,33 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum ProgressBarMode
|
||||
{
|
||||
/// <summary>
|
||||
/// The none
|
||||
/// </summary>
|
||||
none,
|
||||
|
||||
/// <summary>
|
||||
/// The normal
|
||||
/// </summary>
|
||||
normal,
|
||||
|
||||
/// <summary>
|
||||
/// The indeterminate
|
||||
/// </summary>
|
||||
indeterminate,
|
||||
|
||||
/// <summary>
|
||||
/// The error
|
||||
/// </summary>
|
||||
error,
|
||||
|
||||
/// <summary>
|
||||
/// The paused
|
||||
/// </summary>
|
||||
paused
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,9 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ProgressBarOptions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ReadBookmark
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The title.
|
||||
/// </value>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the URL.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The URL.
|
||||
/// </value>
|
||||
public string Url { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,40 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Rectangle
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the x.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The x.
|
||||
/// </value>
|
||||
public int X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the y.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The y.
|
||||
/// </value>
|
||||
public int Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the width.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The width.
|
||||
/// </value>
|
||||
public int Width { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the height.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The height.
|
||||
/// </value>
|
||||
public int Height { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,24 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RelaunchOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the arguments.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The arguments.
|
||||
/// </value>
|
||||
public string[] Args { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the execute path.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The execute path.
|
||||
/// </value>
|
||||
public string ExecPath { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,17 @@
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SaveDialogOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The title.
|
||||
/// </value>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ShortcutDetails
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum ShortcutLinkOperation
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,13 +6,19 @@
|
||||
public class Size
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// Gets or sets the width.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The width.
|
||||
/// </value>
|
||||
public int Width { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Gets or sets the height.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The height.
|
||||
/// </value>
|
||||
public int Height { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,25 @@ using System;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ThumbarButton
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The identifier.
|
||||
/// </value>
|
||||
public string Id { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the click.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The click.
|
||||
/// </value>
|
||||
[JsonIgnore]
|
||||
public Action Click { get; set; }
|
||||
|
||||
@@ -34,6 +49,10 @@ namespace ElectronNET.API.Entities
|
||||
/// </summary>
|
||||
public string Tooltip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ThumbarButton"/> class.
|
||||
/// </summary>
|
||||
/// <param name="icon">The icon.</param>
|
||||
public ThumbarButton(string icon)
|
||||
{
|
||||
Icon = icon;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum ThumbarButtonFlag
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -2,12 +2,30 @@
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum TitleBarStyle
|
||||
{
|
||||
/// <summary>
|
||||
/// The default style
|
||||
/// </summary>
|
||||
[JsonProperty("default")]
|
||||
defaultStyle,
|
||||
|
||||
/// <summary>
|
||||
/// The hidden
|
||||
/// </summary>
|
||||
hidden,
|
||||
|
||||
/// <summary>
|
||||
/// The hidden inset
|
||||
/// </summary>
|
||||
hiddenInset,
|
||||
|
||||
/// <summary>
|
||||
/// The custom buttons on hover
|
||||
/// </summary>
|
||||
customButtonsOnHover
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,43 @@
|
||||
namespace ElectronNET.API
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class TrayClickEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [alt key].
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [alt key]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [shift key].
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [shift key]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [control key].
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [control key]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [meta key].
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [meta key]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool MetaKey { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,56 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the arguments.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The arguments.
|
||||
/// </value>
|
||||
public string Arguments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The description.
|
||||
/// </value>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index of the icon.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The index of the icon.
|
||||
/// </value>
|
||||
public int IconIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the icon path.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The icon path.
|
||||
/// </value>
|
||||
public string IconPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the program.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The program.
|
||||
/// </value>
|
||||
public string Program { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The title.
|
||||
/// </value>
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,19 +2,61 @@
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum Vibrancy
|
||||
{
|
||||
/// <summary>
|
||||
/// The appearance based
|
||||
/// </summary>
|
||||
[JsonProperty("appearance-based")]
|
||||
appearanceBased,
|
||||
|
||||
/// <summary>
|
||||
/// The light
|
||||
/// </summary>
|
||||
light,
|
||||
|
||||
/// <summary>
|
||||
/// The dark
|
||||
/// </summary>
|
||||
dark,
|
||||
|
||||
/// <summary>
|
||||
/// The titlebar
|
||||
/// </summary>
|
||||
titlebar,
|
||||
|
||||
/// <summary>
|
||||
/// The selection
|
||||
/// </summary>
|
||||
selection,
|
||||
|
||||
/// <summary>
|
||||
/// The menu
|
||||
/// </summary>
|
||||
menu,
|
||||
|
||||
/// <summary>
|
||||
/// The popover
|
||||
/// </summary>
|
||||
popover,
|
||||
|
||||
/// <summary>
|
||||
/// The sidebar
|
||||
/// </summary>
|
||||
sidebar,
|
||||
|
||||
/// <summary>
|
||||
/// The medium light
|
||||
/// </summary>
|
||||
[JsonProperty("medium-light")]
|
||||
mediumLight,
|
||||
|
||||
/// <summary>
|
||||
/// The ultra dark
|
||||
/// </summary>
|
||||
[JsonProperty("ultra-dark")]
|
||||
ultraDark
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WebPreferences
|
||||
{
|
||||
/// <summary>
|
||||
@@ -182,13 +182,16 @@ namespace ElectronNET.API.Entities
|
||||
public bool NativeWindowOpen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable the . Defaults to the value of the nodeIntegration option. The
|
||||
/// preload script configured for the<webview> will have node integration enabled
|
||||
/// Whether to enable the Webview. Defaults to the value of the nodeIntegration option. The
|
||||
/// preload script configured for the Webview will have node integration enabled
|
||||
/// when it is executed so you should ensure remote/untrusted content is not able to
|
||||
/// create a<webview> tag with a possibly malicious preload script.You can use the
|
||||
/// create a Webview tag with a possibly malicious preload script.You can use the
|
||||
/// will-attach-webview event on to strip away the preload script and to validate or
|
||||
/// alter the<webview>'s initial settings.
|
||||
/// alter the Webview's initial settings.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [webview tag]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool WebviewTag { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class HybridSupport
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is electron active.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if this instance is electron active; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public static bool IsElectronActive
|
||||
{
|
||||
get
|
||||
|
||||
@@ -10,6 +10,9 @@ using System;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// Create native application menus and context menus.
|
||||
/// </summary>
|
||||
public sealed class Menu
|
||||
{
|
||||
private static Menu _menu;
|
||||
@@ -29,9 +32,19 @@ namespace ElectronNET.API
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the menu items.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The menu items.
|
||||
/// </value>
|
||||
public IReadOnlyCollection<MenuItem> MenuItems { get { return _menuItems.AsReadOnly(); } }
|
||||
private List<MenuItem> _menuItems = new List<MenuItem>();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the application menu.
|
||||
/// </summary>
|
||||
/// <param name="menuItems">The menu items.</param>
|
||||
public void SetApplicationMenu(MenuItem[] menuItems)
|
||||
{
|
||||
_menuItems.Clear();
|
||||
@@ -47,9 +60,20 @@ namespace ElectronNET.API
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the context menu items.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The context menu items.
|
||||
/// </value>
|
||||
public IReadOnlyDictionary<int, ReadOnlyCollection<MenuItem>> ContextMenuItems { get; internal set; }
|
||||
private Dictionary<int, List<MenuItem>> _contextMenuItems = new Dictionary<int, List<MenuItem>>();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the context menu.
|
||||
/// </summary>
|
||||
/// <param name="browserWindow">The browser window.</param>
|
||||
/// <param name="menuItems">The menu items.</param>
|
||||
public void SetContextMenu(BrowserWindow browserWindow, MenuItem[] menuItems)
|
||||
{
|
||||
if (!_contextMenuItems.ContainsKey(browserWindow.Id))
|
||||
@@ -73,6 +97,10 @@ namespace ElectronNET.API
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Contexts the menu popup.
|
||||
/// </summary>
|
||||
/// <param name="browserWindow">The browser window.</param>
|
||||
public void ContextMenuPopup(BrowserWindow browserWindow)
|
||||
{
|
||||
BridgeConnector.Socket.Emit("menu-contextMenuPopup", browserWindow.Id);
|
||||
|
||||
@@ -9,6 +9,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// Create OS desktop notifications
|
||||
/// </summary>
|
||||
public sealed class Notification
|
||||
{
|
||||
private static Notification _notification;
|
||||
|
||||
@@ -9,6 +9,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// Add icons and context menus to the system's notification area.
|
||||
/// </summary>
|
||||
public sealed class Tray
|
||||
{
|
||||
/// <summary>
|
||||
@@ -196,14 +199,30 @@ namespace ElectronNET.API
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyCollection<MenuItem> Items { get { return _items.AsReadOnly(); } }
|
||||
/// <summary>
|
||||
/// Gets the menu items.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The menu items.
|
||||
/// </value>
|
||||
public IReadOnlyCollection<MenuItem> MenuItems { get { return _items.AsReadOnly(); } }
|
||||
private List<MenuItem> _items = new List<MenuItem>();
|
||||
|
||||
/// <summary>
|
||||
/// Shows the Traybar.
|
||||
/// </summary>
|
||||
/// <param name="image">The image.</param>
|
||||
/// <param name="menuItem">The menu item.</param>
|
||||
public void Show(string image, MenuItem menuItem)
|
||||
{
|
||||
Show(image, new MenuItem[] { menuItem });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the Traybar.
|
||||
/// </summary>
|
||||
/// <param name="image">The image.</param>
|
||||
/// <param name="menuItems">The menu items.</param>
|
||||
public void Show(string image, MenuItem[] menuItems)
|
||||
{
|
||||
menuItems.AddMenuItemsId();
|
||||
@@ -211,7 +230,8 @@ namespace ElectronNET.API
|
||||
_items.AddRange(menuItems);
|
||||
|
||||
BridgeConnector.Socket.Off("trayMenuItemClicked");
|
||||
BridgeConnector.Socket.On("trayMenuItemClicked", (id) => {
|
||||
BridgeConnector.Socket.On("trayMenuItemClicked", (id) =>
|
||||
{
|
||||
MenuItem menuItem = _items.GetMenuItem(id.ToString());
|
||||
menuItem?.Click();
|
||||
});
|
||||
|
||||
@@ -3,8 +3,17 @@ using System;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class WebHostBuilderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Use a Electron support for this .NET Core Project.
|
||||
/// </summary>
|
||||
/// <param name="builder">The builder.</param>
|
||||
/// <param name="args">The arguments.</param>
|
||||
/// <returns></returns>
|
||||
public static IWebHostBuilder UseElectron(this IWebHostBuilder builder, string[] args)
|
||||
{
|
||||
foreach (string argument in args)
|
||||
|
||||
@@ -8,6 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class WindowManager
|
||||
{
|
||||
private static WindowManager _windowManager;
|
||||
@@ -27,14 +30,31 @@ namespace ElectronNET.API
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the browser windows.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The browser windows.
|
||||
/// </value>
|
||||
public IReadOnlyCollection<BrowserWindow> BrowserWindows { get { return _browserWindows.AsReadOnly(); } }
|
||||
private List<BrowserWindow> _browserWindows = new List<BrowserWindow>();
|
||||
|
||||
/// <summary>
|
||||
/// Creates the window asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="loadUrl">The load URL.</param>
|
||||
/// <returns></returns>
|
||||
public async Task<BrowserWindow> CreateWindowAsync(string loadUrl = "http://localhost")
|
||||
{
|
||||
return await CreateWindowAsync(new BrowserWindowOptions(), loadUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the window asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <param name="loadUrl">The load URL.</param>
|
||||
/// <returns></returns>
|
||||
public Task<BrowserWindow> CreateWindowAsync(BrowserWindowOptions options, string loadUrl = "http://localhost")
|
||||
{
|
||||
var taskCompletionSource = new TaskCompletionSource<BrowserWindow>();
|
||||
|
||||
Reference in New Issue
Block a user