diff --git a/ElectronNET.API/App.cs b/ElectronNET.API/App.cs index e4849ad..d1b39dd 100644 --- a/ElectronNET.API/App.cs +++ b/ElectronNET.API/App.cs @@ -7,6 +7,9 @@ using System.Threading.Tasks; namespace ElectronNET.API { + /// + /// Control your application's event lifecycle. + /// public sealed class App { /// @@ -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 /// /// Sets the application's dock menu. /// diff --git a/ElectronNET.API/BridgeConnector.cs b/ElectronNET.API/BridgeConnector.cs index bac492d..e479e05 100644 --- a/ElectronNET.API/BridgeConnector.cs +++ b/ElectronNET.API/BridgeConnector.cs @@ -5,15 +5,27 @@ namespace ElectronNET.API { internal static class BridgeConnector { - public static Socket Socket; + private static Socket _socket; - public static void StartConnection() + public static Socket Socket { - Socket = IO.Socket("http://localhost:" + BridgeSettings.SocketPort); - Socket.On(Socket.EVENT_CONNECT, () => + get { - Console.WriteLine("BridgeConnector connected!"); - }); + if(_socket == null && HybridSupport.IsElectronActive) + { + _socket = IO.Socket("http://localhost:" + BridgeSettings.SocketPort); + _socket.On(Socket.EVENT_CONNECT, () => + { + Console.WriteLine("BridgeConnector connected!"); + }); + } + else if(_socket == null && !HybridSupport.IsElectronActive) + { + _socket = IO.Socket(new Uri("http://localhost"), new IO.Options { AutoConnect = false }); + } + + return _socket; + } } } } diff --git a/ElectronNET.API/BridgeSettings.cs b/ElectronNET.API/BridgeSettings.cs index 2f32157..96a2653 100644 --- a/ElectronNET.API/BridgeSettings.cs +++ b/ElectronNET.API/BridgeSettings.cs @@ -1,8 +1,24 @@ namespace ElectronNET.API { + /// + /// + /// public static class BridgeSettings { - public static string SocketPort { get; set; } - public static string WebPort { get; set; } + /// + /// Gets the socket port. + /// + /// + /// The socket port. + /// + public static string SocketPort { get; internal set; } + + /// + /// Gets the web port. + /// + /// + /// The web port. + /// + public static string WebPort { get; internal set; } } } diff --git a/ElectronNET.API/BrowserWindow.cs b/ElectronNET.API/BrowserWindow.cs index de023d0..bd4d0f6 100644 --- a/ElectronNET.API/BrowserWindow.cs +++ b/ElectronNET.API/BrowserWindow.cs @@ -10,8 +10,17 @@ using System.Threading.Tasks; namespace ElectronNET.API { + /// + /// Create and control browser windows. + /// public class BrowserWindow { + /// + /// Gets the identifier. + /// + /// + /// The identifier. + /// public int Id { get; private set; } /// @@ -156,7 +165,7 @@ namespace ElectronNET.API { if (_unresponsive == null) { - BridgeConnector.Socket.On("browserWindow-unresponsive", () => + BridgeConnector.Socket.On("browserWindow-unresponsive" + Id, () => { _unresponsive(); }); @@ -182,7 +191,7 @@ namespace ElectronNET.API { if (_responsive == null) { - BridgeConnector.Socket.On("browserWindow-responsive", () => + BridgeConnector.Socket.On("browserWindow-responsive" + Id, () => { _responsive(); }); @@ -807,6 +816,7 @@ namespace ElectronNET.API internal BrowserWindow(int id) { Id = id; + WebContents = new WebContents(id); } /// @@ -1111,6 +1121,10 @@ namespace ElectronNET.API BridgeConnector.Socket.Emit("browserWindowSetBounds", Id, JObject.FromObject(bounds, _jsonSerializer), animate); } + /// + /// Gets the bounds asynchronous. + /// + /// public Task GetBoundsAsync() { var taskCompletionSource = new TaskCompletionSource(); @@ -1145,6 +1159,10 @@ namespace ElectronNET.API BridgeConnector.Socket.Emit("browserWindowSetContentBounds", Id, JObject.FromObject(bounds, _jsonSerializer), animate); } + /// + /// Gets the content bounds asynchronous. + /// + /// public Task GetContentBoundsAsync() { var taskCompletionSource = new TaskCompletionSource(); @@ -1165,7 +1183,6 @@ namespace ElectronNET.API /// /// /// - /// public void SetSize(int width, int height) { BridgeConnector.Socket.Emit("browserWindowSetSize", Id, width, height); @@ -1206,7 +1223,6 @@ namespace ElectronNET.API /// /// /// - /// public void SetContentSize(int width, int height) { BridgeConnector.Socket.Emit("browserWindowSetContentSize", Id, width, height); @@ -1741,11 +1757,17 @@ namespace ElectronNET.API return taskCompletionSource.Task; } + /// + /// Focuses the on web view. + /// public void FocusOnWebView() { BridgeConnector.Socket.Emit("browserWindowFocusOnWebView", Id); } + /// + /// Blurs the web view. + /// public void BlurWebView() { BridgeConnector.Socket.Emit("browserWindowBlurWebView", Id); @@ -1780,7 +1802,13 @@ namespace ElectronNET.API BridgeConnector.Socket.Emit("browserWindowReload", Id); } - public IReadOnlyCollection Items { get { return _items.AsReadOnly(); } } + /// + /// Gets the menu items. + /// + /// + /// The menu items. + /// + public IReadOnlyCollection MenuItems { get { return _items.AsReadOnly(); } } private List _items = new List(); /// @@ -1803,7 +1831,7 @@ namespace ElectronNET.API /// /// 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 @@ -1819,7 +1847,7 @@ namespace ElectronNET.API /// /// 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 @@ -1864,6 +1892,12 @@ namespace ElectronNET.API return taskCompletionSource.Task; } + /// + /// Gets the thumbar buttons. + /// + /// + /// The thumbar buttons. + /// public IReadOnlyCollection ThumbarButtons { get { return _thumbarButtons.AsReadOnly(); } } private List _thumbarButtons = new List(); @@ -2053,7 +2087,7 @@ namespace ElectronNET.API /// On macOS it sets the NSWindow’s sharingType to NSWindowSharingNone. /// On Windows it calls SetWindowDisplayAffinity with WDA_MONITOR. /// - /// + /// public void SetContentProtection(bool enable) { BridgeConnector.Socket.Emit("browserWindowSetContentProtection", Id, enable); @@ -2072,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. /// - /// + /// public void SetParentWindow(BrowserWindow parent) { BridgeConnector.Socket.Emit("browserWindowSetParentWindow", Id, JObject.FromObject(parent, _jsonSerializer)); @@ -2148,6 +2182,11 @@ namespace ElectronNET.API BridgeConnector.Socket.Emit("browserWindowSetVibrancy", Id, type.GetDescription()); } + /// + /// Render and control web pages. + /// + public WebContents WebContents { get; internal set; } + private JsonSerializer _jsonSerializer = new JsonSerializer() { ContractResolver = new CamelCasePropertyNamesContractResolver(), diff --git a/ElectronNET.API/Clipboard.cs b/ElectronNET.API/Clipboard.cs new file mode 100644 index 0000000..06f05fc --- /dev/null +++ b/ElectronNET.API/Clipboard.cs @@ -0,0 +1,240 @@ +using ElectronNET.API.Entities; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using System.Threading.Tasks; + +namespace ElectronNET.API +{ + /// + /// Perform copy and paste operations on the system clipboard. + /// + public sealed class Clipboard + { + private static Clipboard _clipboard; + + internal Clipboard() { } + + internal static Clipboard Instance + { + get + { + if (_clipboard == null) + { + _clipboard = new Clipboard(); + } + + return _clipboard; + } + } + + /// + /// Read the content in the clipboard as plain text. + /// + /// + /// The content in the clipboard as plain text. + public Task ReadTextAsync(string type = "") + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("clipboard-readText-Completed", (text) => + { + BridgeConnector.Socket.Off("clipboard-readText-Completed"); + + taskCompletionSource.SetResult(text.ToString()); + }); + + BridgeConnector.Socket.Emit("clipboard-readText", type); + + return taskCompletionSource.Task; + } + + /// + /// Writes the text into the clipboard as plain text. + /// + /// + /// + public void WriteText(string text, string type = "") + { + BridgeConnector.Socket.Emit("clipboard-writeText", text, type); + } + + /// + /// The content in the clipboard as markup. + /// + /// + /// + public Task ReadHTMLAsync(string type = "") + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("clipboard-readHTML-Completed", (text) => + { + BridgeConnector.Socket.Off("clipboard-readHTML-Completed"); + + taskCompletionSource.SetResult(text.ToString()); + }); + + BridgeConnector.Socket.Emit("clipboard-readHTML", type); + + return taskCompletionSource.Task; + } + + /// + /// Writes markup to the clipboard. + /// + /// + /// + public void WriteHTML(string markup, string type = "") + { + BridgeConnector.Socket.Emit("clipboard-writeHTML", markup, type); + } + + /// + /// The content in the clipboard as RTF. + /// + /// + /// + public Task ReadRTFAsync(string type = "") + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("clipboard-readRTF-Completed", (text) => + { + BridgeConnector.Socket.Off("clipboard-readRTF-Completed"); + + taskCompletionSource.SetResult(text.ToString()); + }); + + BridgeConnector.Socket.Emit("clipboard-readRTF", type); + + return taskCompletionSource.Task; + } + + /// + /// Writes the text into the clipboard in RTF. + /// + /// + /// + public void WriteRTF(string text, string type = "") + { + BridgeConnector.Socket.Emit("clipboard-writeHTML", text, type); + } + + /// + /// Returns an Object containing title and url keys representing + /// the bookmark in the clipboard. The title and url values will + /// be empty strings when the bookmark is unavailable. + /// + /// + public Task ReadBookmarkAsync() + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("clipboard-readBookmark-Completed", (bookmark) => + { + BridgeConnector.Socket.Off("clipboard-readBookmark-Completed"); + + taskCompletionSource.SetResult(((JObject)bookmark).ToObject()); + }); + + BridgeConnector.Socket.Emit("clipboard-readBookmark"); + + return taskCompletionSource.Task; + } + + /// + /// Writes the title and url into the clipboard as a bookmark. + /// + /// Note: Most apps on Windows don’t support pasting bookmarks + /// into them so you can use clipboard.write to write both a + /// bookmark and fallback text to the clipboard. + /// + /// + /// + /// + public void WriteBookmark(string title, string url, string type = "") + { + BridgeConnector.Socket.Emit("clipboard-writeBookmark", title, url, type); + } + + /// + /// macOS: The text on the find pasteboard. This method uses synchronous IPC + /// when called from the renderer process. The cached value is reread from the + /// find pasteboard whenever the application is activated. + /// + /// + public Task ReadFindTextAsync() + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("clipboard-readFindText-Completed", (text) => + { + BridgeConnector.Socket.Off("clipboard-readFindText-Completed"); + + taskCompletionSource.SetResult(text.ToString()); + }); + + BridgeConnector.Socket.Emit("clipboard-readFindText"); + + return taskCompletionSource.Task; + } + + /// + /// macOS: Writes the text into the find pasteboard as plain text. This method uses + /// synchronous IPC when called from the renderer process. + /// + /// + public void WriteFindText(string text) + { + BridgeConnector.Socket.Emit("clipboard-writeFindText", text); + } + + /// + /// Clears the clipboard content. + /// + /// + public void Clear(string type = "") + { + BridgeConnector.Socket.Emit("clipboard-clear", type); + } + + /// + /// An array of supported formats for the clipboard type. + /// + /// + /// + public Task AvailableFormatsAsync(string type = "") + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("clipboard-availableFormats-Completed", (formats) => + { + BridgeConnector.Socket.Off("clipboard-availableFormats-Completed"); + + taskCompletionSource.SetResult(((JArray)formats).ToObject()); + }); + + BridgeConnector.Socket.Emit("clipboard-availableFormats", type); + + return taskCompletionSource.Task; + } + + /// + /// Writes data to the clipboard. + /// + /// + /// + public void Write(Data data, string type = "") + { + BridgeConnector.Socket.Emit("clipboard-write", JObject.FromObject(data, _jsonSerializer), type); + } + + private JsonSerializer _jsonSerializer = new JsonSerializer() + { + ContractResolver = new CamelCasePropertyNamesContractResolver(), + NullValueHandling = NullValueHandling.Ignore, + DefaultValueHandling = DefaultValueHandling.Ignore + }; + } +} \ No newline at end of file diff --git a/ElectronNET.API/Dialog.cs b/ElectronNET.API/Dialog.cs index e1716a2..053837d 100644 --- a/ElectronNET.API/Dialog.cs +++ b/ElectronNET.API/Dialog.cs @@ -7,6 +7,9 @@ using System.Threading.Tasks; namespace ElectronNET.API { + /// + /// Display native system dialogs for opening and saving files, alerting, etc. + /// public sealed class Dialog { private static Dialog _dialog; diff --git a/ElectronNET.API/Electron.cs b/ElectronNET.API/Electron.cs index 6002677..064ef98 100644 --- a/ElectronNET.API/Electron.cs +++ b/ElectronNET.API/Electron.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API { + /// + /// The Electron.NET API + /// public static class Electron { /// @@ -36,5 +39,25 @@ /// Add icons and context menus to the system’s notification area. /// public static Tray Tray { get { return Tray.Instance; } } + + /// + /// Detect keyboard events when the application does not have keyboard focus. + /// + public static GlobalShortcut GlobalShortcut { get { return GlobalShortcut.Instance; } } + + /// + /// Manage files and URLs using their default applications. + /// + public static Shell Shell { get { return Shell.Instance; } } + + /// + /// Retrieve information about screen size, displays, cursor position, etc. + /// + public static Screen Screen { get { return Screen.Instance; } } + + /// + /// Perform copy and paste operations on the system clipboard. + /// + public static Clipboard Clipboard { get { return Clipboard.Instance; } } } } diff --git a/ElectronNET.API/Entities/AboutPanelOptions.cs b/ElectronNET.API/Entities/AboutPanelOptions.cs index db47d7e..4c17513 100644 --- a/ElectronNET.API/Entities/AboutPanelOptions.cs +++ b/ElectronNET.API/Entities/AboutPanelOptions.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class AboutPanelOptions { /// diff --git a/ElectronNET.API/Entities/AppDetailsOptions.cs b/ElectronNET.API/Entities/AppDetailsOptions.cs index e05417c..55a92e9 100644 --- a/ElectronNET.API/Entities/AppDetailsOptions.cs +++ b/ElectronNET.API/Entities/AppDetailsOptions.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class AppDetailsOptions { /// diff --git a/ElectronNET.API/Entities/BrowserWindowOptions.cs b/ElectronNET.API/Entities/BrowserWindowOptions.cs index 3a7e15d..e72c29f 100644 --- a/ElectronNET.API/Entities/BrowserWindowOptions.cs +++ b/ElectronNET.API/Entities/BrowserWindowOptions.cs @@ -4,6 +4,9 @@ using System.ComponentModel; namespace ElectronNET.API.Entities { + /// + /// + /// public class BrowserWindowOptions { /// diff --git a/ElectronNET.API/Entities/CPUUsage.cs b/ElectronNET.API/Entities/CPUUsage.cs index 0fb461a..f76324d 100644 --- a/ElectronNET.API/Entities/CPUUsage.cs +++ b/ElectronNET.API/Entities/CPUUsage.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class CPUUsage { /// diff --git a/ElectronNET.API/Entities/Certificate.cs b/ElectronNET.API/Entities/Certificate.cs index 957ce5b..646c126 100644 --- a/ElectronNET.API/Entities/Certificate.cs +++ b/ElectronNET.API/Entities/Certificate.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class Certificate { /// diff --git a/ElectronNET.API/Entities/CertificatePrincipal.cs b/ElectronNET.API/Entities/CertificatePrincipal.cs index 8691c96..0b1245a 100644 --- a/ElectronNET.API/Entities/CertificatePrincipal.cs +++ b/ElectronNET.API/Entities/CertificatePrincipal.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class CertificatePrincipal { /// diff --git a/ElectronNET.API/Entities/CertificateTrustDialogOptions.cs b/ElectronNET.API/Entities/CertificateTrustDialogOptions.cs index ed5729d..9a3bfda 100644 --- a/ElectronNET.API/Entities/CertificateTrustDialogOptions.cs +++ b/ElectronNET.API/Entities/CertificateTrustDialogOptions.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class CertificateTrustDialogOptions { /// diff --git a/ElectronNET.API/Entities/Data.cs b/ElectronNET.API/Entities/Data.cs new file mode 100644 index 0000000..2dcca89 --- /dev/null +++ b/ElectronNET.API/Entities/Data.cs @@ -0,0 +1,38 @@ +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class Data + { + /// + /// Gets or sets the text. + /// + /// + /// The text. + /// + public string Text { get; set; } + + /// + /// Gets or sets the HTML. + /// + /// + /// The HTML. + /// + public string Html { get; set; } + + + /// + /// Gets or sets the RTF. + /// + /// + /// The RTF. + /// + public string Rtf { get; set; } + + /// + /// The title of the url at text. + /// + public string Bookmark { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/DefaultFontFamily.cs b/ElectronNET.API/Entities/DefaultFontFamily.cs index d178a9d..105d205 100644 --- a/ElectronNET.API/Entities/DefaultFontFamily.cs +++ b/ElectronNET.API/Entities/DefaultFontFamily.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class DefaultFontFamily { /// diff --git a/ElectronNET.API/Entities/DevToolsMode.cs b/ElectronNET.API/Entities/DevToolsMode.cs new file mode 100644 index 0000000..7290d8c --- /dev/null +++ b/ElectronNET.API/Entities/DevToolsMode.cs @@ -0,0 +1,30 @@ +namespace ElectronNET.API.Entities +{ + /// + /// 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. + /// + public enum DevToolsMode + { + /// + /// The right + /// + right, + + /// + /// The bottom + /// + bottom, + + /// + /// The undocked + /// + undocked, + + /// + /// The detach + /// + detach + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/Display.cs b/ElectronNET.API/Entities/Display.cs new file mode 100644 index 0000000..cdf9ac8 --- /dev/null +++ b/ElectronNET.API/Entities/Display.cs @@ -0,0 +1,60 @@ +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class Display + { + /// + /// Gets or sets the bounds. + /// + /// + /// The bounds. + /// + public Rectangle Bounds { get; set; } + + /// + /// Unique identifier associated with the display. + /// + public string Id { get; set; } + + /// + /// Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. + /// + public int Rotation { get; set; } + + /// + /// Output device's pixel scale factor. + /// + public int ScaleFactor { get; set; } + + /// + /// Gets or sets the size. + /// + /// + /// The size. + /// + public Size Size { get; set; } + + /// + /// Can be available, unavailable, unknown. + /// + public string TouchSupport { get; set; } + + /// + /// Gets or sets the work area. + /// + /// + /// The work area. + /// + public Rectangle WorkArea { get; set; } + + /// + /// Gets or sets the size of the work area. + /// + /// + /// The size of the work area. + /// + public Size WorkAreaSize { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/DisplayBalloonOptions.cs b/ElectronNET.API/Entities/DisplayBalloonOptions.cs index da59480..c223511 100644 --- a/ElectronNET.API/Entities/DisplayBalloonOptions.cs +++ b/ElectronNET.API/Entities/DisplayBalloonOptions.cs @@ -1,9 +1,32 @@ namespace ElectronNET.API { + /// + /// + /// public class DisplayBalloonOptions { + /// + /// Gets or sets the icon. + /// + /// + /// The icon. + /// public string Icon { get; set; } + + /// + /// Gets or sets the title. + /// + /// + /// The title. + /// public string Title { get; set; } + + /// + /// Gets or sets the content. + /// + /// + /// The content. + /// public string Content { get; set; } } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/DockBounceType.cs b/ElectronNET.API/Entities/DockBounceType.cs index 5af53ed..d3d0b82 100644 --- a/ElectronNET.API/Entities/DockBounceType.cs +++ b/ElectronNET.API/Entities/DockBounceType.cs @@ -1,8 +1,18 @@ namespace ElectronNET.API { + /// + /// + /// public enum DockBounceType { + /// + /// The critical + /// critical, + + /// + /// The informational + /// informational } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/Error.cs b/ElectronNET.API/Entities/Error.cs new file mode 100644 index 0000000..33d7ed4 --- /dev/null +++ b/ElectronNET.API/Entities/Error.cs @@ -0,0 +1,16 @@ +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class Error + { + /// + /// Gets or sets the stack. + /// + /// + /// The stack. + /// + public string Stack { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/FileFilter.cs b/ElectronNET.API/Entities/FileFilter.cs index fa15bbf..3f573ed 100644 --- a/ElectronNET.API/Entities/FileFilter.cs +++ b/ElectronNET.API/Entities/FileFilter.cs @@ -1,8 +1,24 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class FileFilter { + /// + /// Gets or sets the extensions. + /// + /// + /// The extensions. + /// public string[] Extensions { get; set; } + + /// + /// Gets or sets the name. + /// + /// + /// The name. + /// public string Name { get; set; } } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/FileIconOptions.cs b/ElectronNET.API/Entities/FileIconOptions.cs index 4293a0a..f2e1d25 100644 --- a/ElectronNET.API/Entities/FileIconOptions.cs +++ b/ElectronNET.API/Entities/FileIconOptions.cs @@ -1,9 +1,22 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class FileIconOptions { + /// + /// Gets the size. + /// + /// + /// The size. + /// public string Size { get; private set; } + /// + /// Initializes a new instance of the class. + /// + /// Size of the file icon. public FileIconOptions(FileIconSize fileIconSize) { Size = fileIconSize.ToString(); diff --git a/ElectronNET.API/Entities/FileIconSize.cs b/ElectronNET.API/Entities/FileIconSize.cs index 7841ee8..75430d6 100644 --- a/ElectronNET.API/Entities/FileIconSize.cs +++ b/ElectronNET.API/Entities/FileIconSize.cs @@ -1,9 +1,23 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum FileIconSize { + /// + /// The small + /// small, + + /// + /// The normal + /// normal, + + /// + /// The large + /// large } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/GPUFeatureStatus.cs b/ElectronNET.API/Entities/GPUFeatureStatus.cs index a21aac5..a252191 100644 --- a/ElectronNET.API/Entities/GPUFeatureStatus.cs +++ b/ElectronNET.API/Entities/GPUFeatureStatus.cs @@ -2,6 +2,9 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class GPUFeatureStatus { /// diff --git a/ElectronNET.API/Entities/HighlightMode.cs b/ElectronNET.API/Entities/HighlightMode.cs index 19dc276..f5f810c 100644 --- a/ElectronNET.API/Entities/HighlightMode.cs +++ b/ElectronNET.API/Entities/HighlightMode.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum HighlightMode { /// diff --git a/ElectronNET.API/Entities/ImportCertificateOptions.cs b/ElectronNET.API/Entities/ImportCertificateOptions.cs index 779992c..cb8775a 100644 --- a/ElectronNET.API/Entities/ImportCertificateOptions.cs +++ b/ElectronNET.API/Entities/ImportCertificateOptions.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class ImportCertificateOptions { /// diff --git a/ElectronNET.API/Entities/JumpListCategory.cs b/ElectronNET.API/Entities/JumpListCategory.cs index e52e5f8..0a1f54c 100644 --- a/ElectronNET.API/Entities/JumpListCategory.cs +++ b/ElectronNET.API/Entities/JumpListCategory.cs @@ -4,6 +4,9 @@ using Newtonsoft.Json.Converters; namespace ElectronNET.API { + /// + /// + /// public class JumpListCategory { /// diff --git a/ElectronNET.API/Entities/JumpListCategoryType.cs b/ElectronNET.API/Entities/JumpListCategoryType.cs index 9c00bf8..4b96112 100644 --- a/ElectronNET.API/Entities/JumpListCategoryType.cs +++ b/ElectronNET.API/Entities/JumpListCategoryType.cs @@ -1,10 +1,28 @@ namespace ElectronNET.API { + /// + /// + /// public enum JumpListCategoryType { + /// + /// The tasks + /// tasks, + + /// + /// The frequent + /// frequent, + + /// + /// The recent + /// recent, + + /// + /// The custom + /// custom } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/JumpListItem.cs b/ElectronNET.API/Entities/JumpListItem.cs index d9258b3..0341c8a 100644 --- a/ElectronNET.API/Entities/JumpListItem.cs +++ b/ElectronNET.API/Entities/JumpListItem.cs @@ -3,6 +3,9 @@ using Newtonsoft.Json.Converters; namespace ElectronNET.API.Entities { + /// + /// + /// public class JumpListItem { /// diff --git a/ElectronNET.API/Entities/JumpListItemType.cs b/ElectronNET.API/Entities/JumpListItemType.cs index 049834c..6bc2382 100644 --- a/ElectronNET.API/Entities/JumpListItemType.cs +++ b/ElectronNET.API/Entities/JumpListItemType.cs @@ -1,9 +1,23 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum JumpListItemType { + /// + /// The task + /// task, + + /// + /// The separator + /// separator, + + /// + /// The file + /// file } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/JumpListSettings.cs b/ElectronNET.API/Entities/JumpListSettings.cs index b7964cd..e56c151 100644 --- a/ElectronNET.API/Entities/JumpListSettings.cs +++ b/ElectronNET.API/Entities/JumpListSettings.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class JumpListSettings { /// diff --git a/ElectronNET.API/Entities/LoadURLOptions.cs b/ElectronNET.API/Entities/LoadURLOptions.cs index bd897ab..f332a77 100644 --- a/ElectronNET.API/Entities/LoadURLOptions.cs +++ b/ElectronNET.API/Entities/LoadURLOptions.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class LoadURLOptions { /// diff --git a/ElectronNET.API/Entities/LoginItemSettings.cs b/ElectronNET.API/Entities/LoginItemSettings.cs index 67e9535..c30ede6 100644 --- a/ElectronNET.API/Entities/LoginItemSettings.cs +++ b/ElectronNET.API/Entities/LoginItemSettings.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class LoginItemSettings { /// diff --git a/ElectronNET.API/Entities/LoginItemSettingsOptions.cs b/ElectronNET.API/Entities/LoginItemSettingsOptions.cs index aee888d..bd23d45 100644 --- a/ElectronNET.API/Entities/LoginItemSettingsOptions.cs +++ b/ElectronNET.API/Entities/LoginItemSettingsOptions.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class LoginItemSettingsOptions { /// diff --git a/ElectronNET.API/Entities/LoginSettings.cs b/ElectronNET.API/Entities/LoginSettings.cs index aec8203..b48011e 100644 --- a/ElectronNET.API/Entities/LoginSettings.cs +++ b/ElectronNET.API/Entities/LoginSettings.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class LoginSettings { /// diff --git a/ElectronNET.API/Entities/MemoryInfo.cs b/ElectronNET.API/Entities/MemoryInfo.cs index f31423b..ec79121 100644 --- a/ElectronNET.API/Entities/MemoryInfo.cs +++ b/ElectronNET.API/Entities/MemoryInfo.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class MemoryInfo { /// diff --git a/ElectronNET.API/Entities/MenuItem.cs b/ElectronNET.API/Entities/MenuItem.cs index 983dcff..5a58d7a 100644 --- a/ElectronNET.API/Entities/MenuItem.cs +++ b/ElectronNET.API/Entities/MenuItem.cs @@ -4,6 +4,9 @@ using System; namespace ElectronNET.API.Entities { + /// + /// + /// public class MenuItem { /// @@ -27,15 +30,39 @@ namespace ElectronNET.API.Entities public MenuType Type { get; set; } + /// + /// Gets or sets the label. + /// + /// + /// The label. + /// public string Label { get; set; } + /// + /// Gets or sets the sublabel. + /// + /// + /// The sublabel. + /// public string Sublabel { get; set; } + /// + /// Gets or sets the accelerator. + /// + /// + /// The accelerator. + /// public string Accelerator { get; set; } + /// + /// Gets or sets the icon. + /// + /// + /// The icon. + /// public string Icon { get; set; } /// diff --git a/ElectronNET.API/Entities/MenuRole.cs b/ElectronNET.API/Entities/MenuRole.cs index a1f8962..0e5673f 100644 --- a/ElectronNET.API/Entities/MenuRole.cs +++ b/ElectronNET.API/Entities/MenuRole.cs @@ -1,14 +1,48 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum MenuRole { + /// + /// The undo + /// undo, + + /// + /// The redo + /// redo, + + /// + /// The cut + /// cut, + + /// + /// The copy + /// copy, + + /// + /// The paste + /// paste, + + /// + /// The pasteandmatchstyle + /// pasteandmatchstyle, + + /// + /// The selectall + /// selectall, + + /// + /// The delete + /// delete, /// diff --git a/ElectronNET.API/Entities/MenuType.cs b/ElectronNET.API/Entities/MenuType.cs index 704f888..9da110c 100644 --- a/ElectronNET.API/Entities/MenuType.cs +++ b/ElectronNET.API/Entities/MenuType.cs @@ -1,11 +1,33 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum MenuType { + /// + /// The normal + /// normal, + + /// + /// The separator + /// separator, + + /// + /// The submenu + /// submenu, + + /// + /// The checkbox + /// checkbox, + + /// + /// The radio + /// radio } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/MessageBoxOptions.cs b/ElectronNET.API/Entities/MessageBoxOptions.cs index ba652d7..ccb405b 100644 --- a/ElectronNET.API/Entities/MessageBoxOptions.cs +++ b/ElectronNET.API/Entities/MessageBoxOptions.cs @@ -3,6 +3,9 @@ using Newtonsoft.Json.Converters; namespace ElectronNET.API.Entities { + /// + /// + /// public class MessageBoxOptions { /// @@ -51,6 +54,12 @@ namespace ElectronNET.API.Entities /// public bool CheckboxChecked { get; set; } + /// + /// Gets or sets the icon. + /// + /// + /// The icon. + /// public string Icon { get; set; } /// @@ -80,6 +89,10 @@ namespace ElectronNET.API.Entities /// public bool NormalizeAccessKeys { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The message. public MessageBoxOptions(string message) { Message = message; diff --git a/ElectronNET.API/Entities/MessageBoxResult.cs b/ElectronNET.API/Entities/MessageBoxResult.cs index 20a19b6..835c292 100644 --- a/ElectronNET.API/Entities/MessageBoxResult.cs +++ b/ElectronNET.API/Entities/MessageBoxResult.cs @@ -1,9 +1,24 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class MessageBoxResult { + /// + /// Gets or sets the response. + /// + /// + /// The response. + /// public int Response { get; set; } + /// + /// Gets or sets a value indicating whether [checkbox checked]. + /// + /// + /// true if [checkbox checked]; otherwise, false. + /// public bool CheckboxChecked { get; set; } } } diff --git a/ElectronNET.API/Entities/MessageBoxType.cs b/ElectronNET.API/Entities/MessageBoxType.cs index 877a793..09fb3b0 100644 --- a/ElectronNET.API/Entities/MessageBoxType.cs +++ b/ElectronNET.API/Entities/MessageBoxType.cs @@ -1,11 +1,33 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum MessageBoxType { + /// + /// The none + /// none, + + /// + /// The information + /// info, + + /// + /// The error + /// error, + + /// + /// The question + /// question, + + /// + /// The warning + /// warning } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/NativeImage.cs b/ElectronNET.API/Entities/NativeImage.cs index deb6210..2e408d1 100644 --- a/ElectronNET.API/Entities/NativeImage.cs +++ b/ElectronNET.API/Entities/NativeImage.cs @@ -1,6 +1,9 @@ namespace ElectronNET.API.Entities { - // TODO: Fertig coden + // TODO: Need some of real code :) + /// + /// + /// public class NativeImage { // public static NativeImage CreateEmpty() diff --git a/ElectronNET.API/Entities/NotificationAction.cs b/ElectronNET.API/Entities/NotificationAction.cs index 25bee11..c7194cd 100644 --- a/ElectronNET.API/Entities/NotificationAction.cs +++ b/ElectronNET.API/Entities/NotificationAction.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class NotificationAction { /// diff --git a/ElectronNET.API/Entities/NotificationOptions.cs b/ElectronNET.API/Entities/NotificationOptions.cs index f2fc91c..ce73b04 100644 --- a/ElectronNET.API/Entities/NotificationOptions.cs +++ b/ElectronNET.API/Entities/NotificationOptions.cs @@ -3,6 +3,9 @@ using System; namespace ElectronNET.API.Entities { + /// + /// + /// public class NotificationOptions { /// @@ -61,6 +64,12 @@ namespace ElectronNET.API.Entities [JsonIgnore] public Action OnShow { get; set; } + /// + /// Gets or sets the show identifier. + /// + /// + /// The show identifier. + /// [JsonProperty] internal string ShowID { get; set; } @@ -70,6 +79,12 @@ namespace ElectronNET.API.Entities [JsonIgnore] public Action OnClick { get; set; } + /// + /// Gets or sets the click identifier. + /// + /// + /// The click identifier. + /// [JsonProperty] internal string ClickID { get; set; } @@ -81,6 +96,12 @@ namespace ElectronNET.API.Entities [JsonIgnore] public Action OnClose { get; set; } + /// + /// Gets or sets the close identifier. + /// + /// + /// The close identifier. + /// [JsonProperty] internal string CloseID { get; set; } @@ -92,6 +113,12 @@ namespace ElectronNET.API.Entities [JsonIgnore] public Action OnReply { get; set; } + /// + /// Gets or sets the reply identifier. + /// + /// + /// The reply identifier. + /// [JsonProperty] internal string ReplyID { get; set; } @@ -101,9 +128,20 @@ namespace ElectronNET.API.Entities [JsonIgnore] public Action OnAction { get; set; } + /// + /// Gets or sets the action identifier. + /// + /// + /// The action identifier. + /// [JsonProperty] internal string ActionID { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The title. + /// The body. public NotificationOptions(string title, string body) { Title = title; diff --git a/ElectronNET.API/Entities/OnTopLevel.cs b/ElectronNET.API/Entities/OnTopLevel.cs index e57a283..f2a125c 100644 --- a/ElectronNET.API/Entities/OnTopLevel.cs +++ b/ElectronNET.API/Entities/OnTopLevel.cs @@ -2,19 +2,53 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum OnTopLevel { + /// + /// The normal + /// normal, + + /// + /// The floating + /// floating, + + /// + /// The torn off menu + /// [Description("torn-off-menu")] tornOffMenu, + + /// + /// The modal panel + /// [Description("modal-panel")] modalPanel, + + /// + /// The main menu + /// [Description("main-menu")] mainMenu, + + /// + /// The status + /// status, + + /// + /// The pop up menu + /// [Description("pop-up-menu")] popUpMenu, + + /// + /// The screen saver + /// [Description("screen-saver")] screenSaver } diff --git a/ElectronNET.API/Entities/OpenDevToolsOptions.cs b/ElectronNET.API/Entities/OpenDevToolsOptions.cs new file mode 100644 index 0000000..23a9aa7 --- /dev/null +++ b/ElectronNET.API/Entities/OpenDevToolsOptions.cs @@ -0,0 +1,19 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class OpenDevToolsOptions + { + /// + /// 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. + /// + [JsonConverter(typeof(StringEnumConverter))] + public DevToolsMode Mode { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/OpenDialogOptions.cs b/ElectronNET.API/Entities/OpenDialogOptions.cs index 85b81f9..3f18dff 100644 --- a/ElectronNET.API/Entities/OpenDialogOptions.cs +++ b/ElectronNET.API/Entities/OpenDialogOptions.cs @@ -3,9 +3,25 @@ using Newtonsoft.Json.Converters; namespace ElectronNET.API.Entities { + /// + /// + /// public class OpenDialogOptions { + /// + /// Gets or sets the title. + /// + /// + /// The title. + /// public string Title { get; set; } + + /// + /// Gets or sets the default path. + /// + /// + /// The default path. + /// public string DefaultPath { get; set; } /// diff --git a/ElectronNET.API/Entities/OpenDialogProperty.cs b/ElectronNET.API/Entities/OpenDialogProperty.cs index a1b7723..44a16b1 100644 --- a/ElectronNET.API/Entities/OpenDialogProperty.cs +++ b/ElectronNET.API/Entities/OpenDialogProperty.cs @@ -1,14 +1,48 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum OpenDialogProperty { + /// + /// The open file + /// openFile, + + /// + /// The open directory + /// openDirectory, + + /// + /// The multi selections + /// multiSelections, + + /// + /// The show hidden files + /// showHiddenFiles, + + /// + /// The create directory + /// createDirectory, + + /// + /// The prompt to create + /// promptToCreate, + + /// + /// The no resolve aliases + /// noResolveAliases, + + /// + /// The treat package as directory + /// treatPackageAsDirectory } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/OpenExternalOptions.cs b/ElectronNET.API/Entities/OpenExternalOptions.cs new file mode 100644 index 0000000..f5819c6 --- /dev/null +++ b/ElectronNET.API/Entities/OpenExternalOptions.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; + +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class OpenExternalOptions + { + /// + /// true to bring the opened application to the foreground. The default is true. + /// + [DefaultValue(true)] + public bool Activate { get; set; } = true; + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/PathName.cs b/ElectronNET.API/Entities/PathName.cs index 0435b4c..560b9f9 100644 --- a/ElectronNET.API/Entities/PathName.cs +++ b/ElectronNET.API/Entities/PathName.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum PathName { /// @@ -64,7 +67,7 @@ videos, /// - /// + /// The logs /// logs, diff --git a/ElectronNET.API/Entities/Point.cs b/ElectronNET.API/Entities/Point.cs new file mode 100644 index 0000000..a464bed --- /dev/null +++ b/ElectronNET.API/Entities/Point.cs @@ -0,0 +1,24 @@ +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class Point + { + /// + /// Gets or sets the x. + /// + /// + /// The x. + /// + public int X { get; set; } + + /// + /// Gets or sets the y. + /// + /// + /// The y. + /// + public int Y { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/PrintToPDFOptions.cs b/ElectronNET.API/Entities/PrintToPDFOptions.cs new file mode 100644 index 0000000..3604d38 --- /dev/null +++ b/ElectronNET.API/Entities/PrintToPDFOptions.cs @@ -0,0 +1,35 @@ +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class PrintToPDFOptions + { + /// + /// Specifies the type of margins to use. Uses 0 for default margin, 1 for no + /// margin, and 2 for minimum margin. + /// + public int MarginsType { get; set; } + + /// + /// Specify page size of the generated PDF. Can be A3, A4, A5, Legal, Letter, + /// Tabloid or an Object containing height and width in microns. + /// + public string PageSize { get; set; } + + /// + /// Whether to print CSS backgrounds. + /// + public bool PrintBackground { get; set; } + + /// + /// Whether to print selection only. + /// + public bool PrintSelectionOnly { get; set; } + + /// + /// true for landscape, false for portrait. + /// + public bool Landscape { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/ProcessMetric.cs b/ElectronNET.API/Entities/ProcessMetric.cs index 79cab89..cf1973f 100644 --- a/ElectronNET.API/Entities/ProcessMetric.cs +++ b/ElectronNET.API/Entities/ProcessMetric.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class ProcessMetric { /// diff --git a/ElectronNET.API/Entities/ProgressBarMode.cs b/ElectronNET.API/Entities/ProgressBarMode.cs index dc47445..b9fed42 100644 --- a/ElectronNET.API/Entities/ProgressBarMode.cs +++ b/ElectronNET.API/Entities/ProgressBarMode.cs @@ -1,11 +1,33 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum ProgressBarMode { + /// + /// The none + /// none, + + /// + /// The normal + /// normal, + + /// + /// The indeterminate + /// indeterminate, + + /// + /// The error + /// error, + + /// + /// The paused + /// paused } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/ProgressBarOptions.cs b/ElectronNET.API/Entities/ProgressBarOptions.cs index ffcc25e..7177a2f 100644 --- a/ElectronNET.API/Entities/ProgressBarOptions.cs +++ b/ElectronNET.API/Entities/ProgressBarOptions.cs @@ -3,6 +3,9 @@ using Newtonsoft.Json.Converters; namespace ElectronNET.API.Entities { + /// + /// + /// public class ProgressBarOptions { /// diff --git a/ElectronNET.API/Entities/ReadBookmark.cs b/ElectronNET.API/Entities/ReadBookmark.cs new file mode 100644 index 0000000..fd5b665 --- /dev/null +++ b/ElectronNET.API/Entities/ReadBookmark.cs @@ -0,0 +1,24 @@ +namespace ElectronNET.API.Entities +{ + /// + /// + /// + public class ReadBookmark + { + /// + /// Gets or sets the title. + /// + /// + /// The title. + /// + public string Title { get; set; } + + /// + /// Gets or sets the URL. + /// + /// + /// The URL. + /// + public string Url { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/Rectangle.cs b/ElectronNET.API/Entities/Rectangle.cs index 7e1a8eb..5d171e7 100644 --- a/ElectronNET.API/Entities/Rectangle.cs +++ b/ElectronNET.API/Entities/Rectangle.cs @@ -1,10 +1,40 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class Rectangle { + /// + /// Gets or sets the x. + /// + /// + /// The x. + /// public int X { get; set; } + + /// + /// Gets or sets the y. + /// + /// + /// The y. + /// public int Y { get; set; } + + /// + /// Gets or sets the width. + /// + /// + /// The width. + /// public int Width { get; set; } + + /// + /// Gets or sets the height. + /// + /// + /// The height. + /// public int Height { get; set; } } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/RelaunchOptions.cs b/ElectronNET.API/Entities/RelaunchOptions.cs index 55ff88e..9d81603 100644 --- a/ElectronNET.API/Entities/RelaunchOptions.cs +++ b/ElectronNET.API/Entities/RelaunchOptions.cs @@ -1,8 +1,24 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class RelaunchOptions { + /// + /// Gets or sets the arguments. + /// + /// + /// The arguments. + /// public string[] Args { get; set; } + + /// + /// Gets or sets the execute path. + /// + /// + /// The execute path. + /// public string ExecPath { get; set; } } } diff --git a/ElectronNET.API/Entities/SaveDialogOptions.cs b/ElectronNET.API/Entities/SaveDialogOptions.cs index 42c4954..16811d7 100644 --- a/ElectronNET.API/Entities/SaveDialogOptions.cs +++ b/ElectronNET.API/Entities/SaveDialogOptions.cs @@ -2,8 +2,17 @@ namespace ElectronNET.API { + /// + /// + /// public class SaveDialogOptions { + /// + /// Gets or sets the title. + /// + /// + /// The title. + /// public string Title { get; set; } /// diff --git a/ElectronNET.API/Entities/ShortcutDetails.cs b/ElectronNET.API/Entities/ShortcutDetails.cs new file mode 100644 index 0000000..d011c9e --- /dev/null +++ b/ElectronNET.API/Entities/ShortcutDetails.cs @@ -0,0 +1,44 @@ +namespace ElectronNET.API +{ + /// + /// + /// + public class ShortcutDetails + { + /// + /// The Application User Model ID. Default is empty. + /// + public string AppUserModelId { get; set; } + + /// + /// The arguments to be applied to target when launching from this shortcut. Default is empty. + /// + public string Args { get; set; } + + /// + /// The working directory. Default is empty. + /// + public string Cwd { get; set; } + + /// + /// The description of the shortcut. Default is empty. + /// + public string Description { get; set; } + + /// + /// 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. + /// + public string Icon { get; set; } + + /// + /// The resource ID of icon when icon is a DLL or EXE. Default is 0. + /// + public int IconIndex { get; set; } + + /// + /// The target to launch from this shortcut. + /// + public string Target { get; set; } + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/ShortcutLinkOperation.cs b/ElectronNET.API/Entities/ShortcutLinkOperation.cs new file mode 100644 index 0000000..ed501a2 --- /dev/null +++ b/ElectronNET.API/Entities/ShortcutLinkOperation.cs @@ -0,0 +1,23 @@ +namespace ElectronNET.API +{ + /// + /// + /// + public enum ShortcutLinkOperation + { + /// + /// Creates a new shortcut, overwriting if necessary. + /// + create, + + /// + /// Updates specified properties only on an existing shortcut. + /// + update, + + /// + /// Overwrites an existing shortcut, fails if the shortcut doesn’t exist. + /// + replace + } +} \ No newline at end of file diff --git a/ElectronNET.API/Entities/Size.cs b/ElectronNET.API/Entities/Size.cs index 459428a..d63d180 100644 --- a/ElectronNET.API/Entities/Size.cs +++ b/ElectronNET.API/Entities/Size.cs @@ -1,9 +1,24 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class Size { + /// + /// Gets or sets the width. + /// + /// + /// The width. + /// public int Width { get; set; } + /// + /// Gets or sets the height. + /// + /// + /// The height. + /// public int Height { get; set; } } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/ThumbarButton.cs b/ElectronNET.API/Entities/ThumbarButton.cs index ce2e0be..504c26f 100644 --- a/ElectronNET.API/Entities/ThumbarButton.cs +++ b/ElectronNET.API/Entities/ThumbarButton.cs @@ -4,10 +4,25 @@ using System; namespace ElectronNET.API.Entities { + /// + /// + /// public class ThumbarButton { + /// + /// Gets the identifier. + /// + /// + /// The identifier. + /// public string Id { get; internal set; } + /// + /// Gets or sets the click. + /// + /// + /// The click. + /// [JsonIgnore] public Action Click { get; set; } @@ -34,6 +49,10 @@ namespace ElectronNET.API.Entities /// public string Tooltip { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The icon. public ThumbarButton(string icon) { Icon = icon; diff --git a/ElectronNET.API/Entities/ThumbarButtonFlag.cs b/ElectronNET.API/Entities/ThumbarButtonFlag.cs index 869a283..e68ca86 100644 --- a/ElectronNET.API/Entities/ThumbarButtonFlag.cs +++ b/ElectronNET.API/Entities/ThumbarButtonFlag.cs @@ -1,5 +1,8 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum ThumbarButtonFlag { /// diff --git a/ElectronNET.API/Entities/TitleBarStyle.cs b/ElectronNET.API/Entities/TitleBarStyle.cs index 99c923c..8fb108e 100644 --- a/ElectronNET.API/Entities/TitleBarStyle.cs +++ b/ElectronNET.API/Entities/TitleBarStyle.cs @@ -2,12 +2,30 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum TitleBarStyle { + /// + /// The default style + /// [JsonProperty("default")] defaultStyle, + + /// + /// The hidden + /// hidden, + + /// + /// The hidden inset + /// hiddenInset, + + /// + /// The custom buttons on hover + /// customButtonsOnHover } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/TrayClickEventArgs.cs b/ElectronNET.API/Entities/TrayClickEventArgs.cs index 5e7b09b..4a881a1 100644 --- a/ElectronNET.API/Entities/TrayClickEventArgs.cs +++ b/ElectronNET.API/Entities/TrayClickEventArgs.cs @@ -1,10 +1,43 @@ -namespace ElectronNET.API +/// +/// +/// +namespace ElectronNET.API { + /// + /// + /// public class TrayClickEventArgs { + /// + /// Gets or sets a value indicating whether [alt key]. + /// + /// + /// true if [alt key]; otherwise, false. + /// public bool AltKey { get; set; } + + /// + /// Gets or sets a value indicating whether [shift key]. + /// + /// + /// true if [shift key]; otherwise, false. + /// public bool ShiftKey { get; set; } + + /// + /// Gets or sets a value indicating whether [control key]. + /// + /// + /// true if [control key]; otherwise, false. + /// public bool CtrlKey { get; set; } + + /// + /// Gets or sets a value indicating whether [meta key]. + /// + /// + /// true if [meta key]; otherwise, false. + /// public bool MetaKey { get; set; } } } \ No newline at end of file diff --git a/ElectronNET.API/Entities/UserTask.cs b/ElectronNET.API/Entities/UserTask.cs index 1b37d67..985717d 100644 --- a/ElectronNET.API/Entities/UserTask.cs +++ b/ElectronNET.API/Entities/UserTask.cs @@ -1,12 +1,56 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public class UserTask { + /// + /// Gets or sets the arguments. + /// + /// + /// The arguments. + /// public string Arguments { get; set; } + + /// + /// Gets or sets the description. + /// + /// + /// The description. + /// public string Description { get; set; } + + /// + /// Gets or sets the index of the icon. + /// + /// + /// The index of the icon. + /// public int IconIndex { get; set; } + + /// + /// Gets or sets the icon path. + /// + /// + /// The icon path. + /// public string IconPath { get; set; } + + /// + /// Gets or sets the program. + /// + /// + /// The program. + /// public string Program { get; set; } + + /// + /// Gets or sets the title. + /// + /// + /// The title. + /// public string Title { get; set; } } } diff --git a/ElectronNET.API/Entities/Vibrancy.cs b/ElectronNET.API/Entities/Vibrancy.cs index d4fe52a..07ca743 100644 --- a/ElectronNET.API/Entities/Vibrancy.cs +++ b/ElectronNET.API/Entities/Vibrancy.cs @@ -2,19 +2,61 @@ namespace ElectronNET.API.Entities { + /// + /// + /// public enum Vibrancy { + /// + /// The appearance based + /// [JsonProperty("appearance-based")] appearanceBased, + + /// + /// The light + /// light, + + /// + /// The dark + /// dark, + + /// + /// The titlebar + /// titlebar, + + /// + /// The selection + /// selection, + + /// + /// The menu + /// menu, + + /// + /// The popover + /// popover, + + /// + /// The sidebar + /// sidebar, + + /// + /// The medium light + /// [JsonProperty("medium-light")] mediumLight, + + /// + /// The ultra dark + /// [JsonProperty("ultra-dark")] ultraDark } diff --git a/ElectronNET.API/Entities/WebPreferences.cs b/ElectronNET.API/Entities/WebPreferences.cs index 6e12ea4..11c562b 100644 --- a/ElectronNET.API/Entities/WebPreferences.cs +++ b/ElectronNET.API/Entities/WebPreferences.cs @@ -1,8 +1,8 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace ElectronNET.API.Entities +namespace ElectronNET.API.Entities { + /// + /// + /// public class WebPreferences { /// @@ -182,13 +182,16 @@ namespace ElectronNET.API.Entities public bool NativeWindowOpen { get; set; } /// - /// Whether to enable the . Defaults to the value of the nodeIntegration option. The - /// preload script configured for the 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 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's initial settings. + /// alter the Webview's initial settings. /// + /// + /// true if [webview tag]; otherwise, false. + /// public bool WebviewTag { get; set; } } } \ No newline at end of file diff --git a/ElectronNET.API/Extensions/MenuItemExtensions.cs b/ElectronNET.API/Extensions/MenuItemExtensions.cs index 0ca7282..6644bd1 100644 --- a/ElectronNET.API/Extensions/MenuItemExtensions.cs +++ b/ElectronNET.API/Extensions/MenuItemExtensions.cs @@ -17,7 +17,7 @@ namespace ElectronNET.API.Extensions AddMenuItemsId(menuItem.Submenu); } - if (string.IsNullOrEmpty(menuItem.Id)) + if (string.IsNullOrEmpty(menuItem.Id) && menuItem.Click != null) { menuItem.Id = Guid.NewGuid().ToString(); } diff --git a/ElectronNET.API/GlobalShortcut.cs b/ElectronNET.API/GlobalShortcut.cs new file mode 100644 index 0000000..a17668e --- /dev/null +++ b/ElectronNET.API/GlobalShortcut.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace ElectronNET.API +{ + /// + /// Detect keyboard events when the application does not have keyboard focus. + /// + public sealed class GlobalShortcut + { + private static GlobalShortcut _globalShortcut; + + internal GlobalShortcut() { } + + internal static GlobalShortcut Instance + { + get + { + if (_globalShortcut == null) + { + _globalShortcut = new GlobalShortcut(); + } + + return _globalShortcut; + } + } + + private Dictionary _shortcuts = new Dictionary(); + + /// + /// Registers a global shortcut of accelerator. + /// The callback is called when the registered shortcut is pressed by the user. + /// + /// When the accelerator is already taken by other applications, this call will + /// silently fail.This behavior is intended by operating systems, since they don’t + /// want applications to fight for global shortcuts. + /// + public void Register(string accelerator, Action function) + { + if (!_shortcuts.ContainsKey(accelerator)) + { + _shortcuts.Add(accelerator, function); + + BridgeConnector.Socket.Off("globalShortcut-pressed"); + BridgeConnector.Socket.On("globalShortcut-pressed", (shortcut) => + { + if (_shortcuts.ContainsKey(shortcut.ToString())) + { + _shortcuts[shortcut.ToString()](); + } + }); + + BridgeConnector.Socket.Emit("globalShortcut-register", accelerator); + } + } + + /// + /// When the accelerator is already taken by other applications, + /// this call will still return false. This behavior is intended by operating systems, + /// since they don’t want applications to fight for global shortcuts. + /// + /// Whether this application has registered accelerator. + public Task IsRegisteredAsync(string accelerator) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("globalShortcut-isRegisteredCompleted", (isRegistered) => + { + BridgeConnector.Socket.Off("globalShortcut-isRegisteredCompleted"); + + taskCompletionSource.SetResult((bool)isRegistered); + }); + + BridgeConnector.Socket.Emit("globalShortcut-isRegistered", accelerator); + + return taskCompletionSource.Task; + } + + /// + /// Unregisters the global shortcut of accelerator. + /// + public void Unregister(string accelerator) + { + _shortcuts.Remove(accelerator); + BridgeConnector.Socket.Emit("globalShortcut-unregister", accelerator); + } + + /// + /// Unregisters all of the global shortcuts. + /// + public void UnregisterAll() + { + _shortcuts.Clear(); + BridgeConnector.Socket.Emit("globalShortcut-unregisterAll"); + } + } +} \ No newline at end of file diff --git a/ElectronNET.API/HybridSupport.cs b/ElectronNET.API/HybridSupport.cs new file mode 100644 index 0000000..935ea51 --- /dev/null +++ b/ElectronNET.API/HybridSupport.cs @@ -0,0 +1,22 @@ +namespace ElectronNET.API +{ + /// + /// + /// + public static class HybridSupport + { + /// + /// Gets a value indicating whether this instance is electron active. + /// + /// + /// true if this instance is electron active; otherwise, false. + /// + public static bool IsElectronActive + { + get + { + return !string.IsNullOrEmpty(BridgeSettings.SocketPort); + } + } + } +} \ No newline at end of file diff --git a/ElectronNET.API/IpcMain.cs b/ElectronNET.API/IpcMain.cs index b0f56f9..ee8c2dd 100644 --- a/ElectronNET.API/IpcMain.cs +++ b/ElectronNET.API/IpcMain.cs @@ -2,6 +2,9 @@ using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization; using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; namespace ElectronNET.API { @@ -36,7 +39,64 @@ namespace ElectronNET.API public void On(string channel, Action listener) { BridgeConnector.Socket.Emit("registerIpcMainChannel", channel); - BridgeConnector.Socket.On(channel, listener); + BridgeConnector.Socket.On(channel, (args) => + { + List objectArray = FormatArguments(args); + + if(objectArray.Count == 1) + { + listener(objectArray.First()); + } + else + { + listener(objectArray); + } + }); + } + + private List FormatArguments(object args) + { + List objectArray = ((JArray)args).ToObject().ToList(); + + for (int index = 0; index < objectArray.Count; index++) + { + var item = objectArray[index]; + if (item == null) + { + objectArray.Remove(item); + } + } + + return objectArray; + } + + /// + /// Send a message to the renderer process synchronously via channel, + /// you can also send arbitrary arguments. + /// + /// Note: Sending a synchronous message will block the whole renderer process, + /// unless you know what you are doing you should never use it. + /// + /// + /// + public void OnSync(string channel, Func listener) + { + BridgeConnector.Socket.Emit("registerSyncIpcMainChannel", channel); + BridgeConnector.Socket.On(channel, (args) => { + List objectArray = FormatArguments(args); + object parameter; + if (objectArray.Count == 1) + { + parameter = objectArray.First(); + } + else + { + parameter = objectArray; + } + + var result = listener(parameter); + BridgeConnector.Socket.Emit(channel + "Sync", result); + }); } /// @@ -48,7 +108,19 @@ namespace ElectronNET.API public void Once(string channel, Action listener) { BridgeConnector.Socket.Emit("registerOnceIpcMainChannel", channel); - BridgeConnector.Socket.On(channel, listener); + BridgeConnector.Socket.On(channel, (args) => + { + List objectArray = FormatArguments(args); + + if (objectArray.Count == 1) + { + listener(objectArray.First()); + } + else + { + listener(objectArray); + } + }); } /// @@ -71,7 +143,32 @@ namespace ElectronNET.API /// Arguments data. public void Send(BrowserWindow browserWindow, string channel, params object[] data) { - BridgeConnector.Socket.Emit("sendToIpcRenderer", JObject.FromObject(browserWindow, _jsonSerializer), channel, data); + List jobjects = new List(); + List jarrays = new List(); + List objects = new List(); + + foreach (var parameterObject in data) + { + if(parameterObject.GetType().IsArray || parameterObject.GetType().IsGenericType && parameterObject is IEnumerable) + { + jarrays.Add(JArray.FromObject(parameterObject, _jsonSerializer)); + } else if(parameterObject.GetType().IsClass && !parameterObject.GetType().IsPrimitive && !(parameterObject is string)) + { + jobjects.Add(JObject.FromObject(parameterObject, _jsonSerializer)); + } else if(parameterObject.GetType().IsPrimitive || (parameterObject is string)) + { + objects.Add(parameterObject); + } + } + + if(jobjects.Count > 0 || jarrays.Count > 0) + { + BridgeConnector.Socket.Emit("sendToIpcRenderer", JObject.FromObject(browserWindow, _jsonSerializer), channel, jarrays.ToArray(), jobjects.ToArray(), objects.ToArray()); + } + else + { + BridgeConnector.Socket.Emit("sendToIpcRenderer", JObject.FromObject(browserWindow, _jsonSerializer), channel, data); + } } private JsonSerializer _jsonSerializer = new JsonSerializer() diff --git a/ElectronNET.API/Menu.cs b/ElectronNET.API/Menu.cs index e35ec4e..bbd593c 100644 --- a/ElectronNET.API/Menu.cs +++ b/ElectronNET.API/Menu.cs @@ -4,9 +4,15 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System.Collections.Generic; using ElectronNET.API.Extensions; +using System.Linq; +using System.Collections.ObjectModel; +using System; namespace ElectronNET.API { + /// + /// Create native application menus and context menus. + /// public sealed class Menu { private static Menu _menu; @@ -26,22 +32,80 @@ namespace ElectronNET.API } } - public IReadOnlyCollection Items { get { return _items.AsReadOnly(); } } - private List _items = new List(); + /// + /// Gets the menu items. + /// + /// + /// The menu items. + /// + public IReadOnlyCollection MenuItems { get { return _menuItems.AsReadOnly(); } } + private List _menuItems = new List(); + /// + /// Sets the application menu. + /// + /// The menu items. public void SetApplicationMenu(MenuItem[] menuItems) { + _menuItems.Clear(); + menuItems.AddMenuItemsId(); BridgeConnector.Socket.Emit("menu-setApplicationMenu", JArray.FromObject(menuItems, _jsonSerializer)); - _items.AddRange(menuItems); + _menuItems.AddRange(menuItems); BridgeConnector.Socket.Off("menuItemClicked"); BridgeConnector.Socket.On("menuItemClicked", (id) => { - MenuItem menuItem = _items.GetMenuItem(id.ToString()); - menuItem?.Click(); + MenuItem menuItem = _menuItems.GetMenuItem(id.ToString()); + menuItem.Click?.Invoke(); }); } + /// + /// Gets the context menu items. + /// + /// + /// The context menu items. + /// + public IReadOnlyDictionary> ContextMenuItems { get; internal set; } + private Dictionary> _contextMenuItems = new Dictionary>(); + + /// + /// Sets the context menu. + /// + /// The browser window. + /// The menu items. + public void SetContextMenu(BrowserWindow browserWindow, MenuItem[] menuItems) + { + if (!_contextMenuItems.ContainsKey(browserWindow.Id)) + { + menuItems.AddMenuItemsId(); + BridgeConnector.Socket.Emit("menu-setContextMenu", browserWindow.Id, JArray.FromObject(menuItems, _jsonSerializer)); + _contextMenuItems.Add(browserWindow.Id, menuItems.ToList()); + + var x = _contextMenuItems.ToDictionary(kv => kv.Key, kv => kv.Value.AsReadOnly()); + ContextMenuItems = new ReadOnlyDictionary>(x); + + BridgeConnector.Socket.Off("contextMenuItemClicked"); + BridgeConnector.Socket.On("contextMenuItemClicked", (results) => + { + var id = ((JArray)results).First.ToString(); + var browserWindowId = (int)((JArray)results).Last; + + MenuItem menuItem = _contextMenuItems[browserWindowId].GetMenuItem(id); + menuItem.Click?.Invoke(); + }); + } + } + + /// + /// Contexts the menu popup. + /// + /// The browser window. + public void ContextMenuPopup(BrowserWindow browserWindow) + { + BridgeConnector.Socket.Emit("menu-contextMenuPopup", browserWindow.Id); + } + private JsonSerializer _jsonSerializer = new JsonSerializer() { ContractResolver = new CamelCasePropertyNamesContractResolver(), diff --git a/ElectronNET.API/Notification.cs b/ElectronNET.API/Notification.cs index b7fd081..b8c5579 100644 --- a/ElectronNET.API/Notification.cs +++ b/ElectronNET.API/Notification.cs @@ -9,6 +9,9 @@ using System.Threading.Tasks; namespace ElectronNET.API { + /// + /// Create OS desktop notifications + /// public sealed class Notification { private static Notification _notification; diff --git a/ElectronNET.API/Screen.cs b/ElectronNET.API/Screen.cs new file mode 100644 index 0000000..1e9153c --- /dev/null +++ b/ElectronNET.API/Screen.cs @@ -0,0 +1,243 @@ +using ElectronNET.API.Entities; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using System; +using System.Threading.Tasks; + +namespace ElectronNET.API +{ + /// + /// Retrieve information about screen size, displays, cursor position, etc. + /// + public sealed class Screen + { + /// + /// Emitted when an new Display has been added. + /// + public event Action OnDisplayAdded + { + add + { + if (_onDisplayAdded == null) + { + BridgeConnector.Socket.On("screen-display-added-event" + GetHashCode(), (display) => + { + _onDisplayAdded(((JObject)display).ToObject()); + }); + + BridgeConnector.Socket.Emit("register-screen-display-added", GetHashCode()); + } + _onDisplayAdded += value; + } + remove + { + _onDisplayAdded -= value; + } + } + + private event Action _onDisplayAdded; + + /// + /// Emitted when oldDisplay has been removed. + /// + public event Action OnDisplayRemoved + { + add + { + if (_onDisplayRemoved == null) + { + BridgeConnector.Socket.On("screen-display-removed-event" + GetHashCode(), (display) => + { + _onDisplayRemoved(((JObject)display).ToObject()); + }); + + BridgeConnector.Socket.Emit("register-screen-display-removed", GetHashCode()); + } + _onDisplayRemoved += value; + } + remove + { + _onDisplayRemoved -= value; + } + } + + private event Action _onDisplayRemoved; + + /// + /// Emitted when one or more metrics change in a display. + /// The changedMetrics is an array of strings that describe the changes. + /// Possible changes are bounds, workArea, scaleFactor and rotation. + /// + public event Action OnDisplayMetricsChanged + { + add + { + if (_onDisplayMetricsChanged == null) + { + BridgeConnector.Socket.On("screen-display-metrics-changed-event" + GetHashCode(), (args) => + { + var display = ((JArray)args).First.ToObject(); + var metrics = ((JArray)args).Last.ToObject(); + + _onDisplayMetricsChanged(display, metrics); + }); + + BridgeConnector.Socket.Emit("register-screen-display-metrics-changed", GetHashCode()); + } + _onDisplayMetricsChanged += value; + } + remove + { + _onDisplayMetricsChanged -= value; + } + } + + private event Action _onDisplayMetricsChanged; + + private static Screen _screen; + + internal Screen() { } + + internal static Screen Instance + { + get + { + if (_screen == null) + { + _screen = new Screen(); + } + + return _screen; + } + } + + /// + /// The current absolute position of the mouse pointer. + /// + /// + public Task GetCursorScreenPointAsync() + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("screen-getCursorScreenPointCompleted", (point) => + { + BridgeConnector.Socket.Off("screen-getCursorScreenPointCompleted"); + + taskCompletionSource.SetResult(((JObject)point).ToObject()); + }); + + BridgeConnector.Socket.Emit("screen-getCursorScreenPoint"); + + return taskCompletionSource.Task; + } + + /// + /// macOS: The height of the menu bar in pixels. + /// + /// The height of the menu bar in pixels. + public Task GetMenuBarHeightAsync() + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("screen-getMenuBarHeightCompleted", (height) => + { + BridgeConnector.Socket.Off("screen-getMenuBarHeightCompleted"); + + taskCompletionSource.SetResult(int.Parse(height.ToString())); + }); + + BridgeConnector.Socket.Emit("screen-getMenuBarHeight"); + + return taskCompletionSource.Task; + } + + /// + /// The primary display. + /// + /// + public Task GetPrimaryDisplayAsync() + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("screen-getPrimaryDisplayCompleted", (display) => + { + BridgeConnector.Socket.Off("screen-getPrimaryDisplayCompleted"); + + taskCompletionSource.SetResult(((JObject)display).ToObject()); + }); + + BridgeConnector.Socket.Emit("screen-getPrimaryDisplay"); + + return taskCompletionSource.Task; + } + + /// + /// An array of displays that are currently available. + /// + /// An array of displays that are currently available. + public Task GetAllDisplaysAsync() + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("screen-getAllDisplaysCompleted", (displays) => + { + BridgeConnector.Socket.Off("screen-getAllDisplaysCompleted"); + + taskCompletionSource.SetResult(((JArray)displays).ToObject()); + }); + + BridgeConnector.Socket.Emit("screen-getAllDisplays"); + + return taskCompletionSource.Task; + } + + /// + /// The display nearest the specified point. + /// + /// The display nearest the specified point. + public Task GetDisplayNearestPointAsync(Point point) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("screen-getDisplayNearestPointCompleted", (display) => + { + BridgeConnector.Socket.Off("screen-getDisplayNearestPointCompleted"); + + taskCompletionSource.SetResult(((JObject)display).ToObject()); + }); + + BridgeConnector.Socket.Emit("screen-getDisplayNearestPoint", JObject.FromObject(point, _jsonSerializer)); + + return taskCompletionSource.Task; + } + + /// + /// The display that most closely intersects the provided bounds. + /// + /// + /// The display that most closely intersects the provided bounds. + public Task GetDisplayMatchingAsync(Rectangle rectangle) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("screen-getDisplayMatching", (display) => + { + BridgeConnector.Socket.Off("screen-getDisplayMatching"); + + taskCompletionSource.SetResult(((JObject)display).ToObject()); + }); + + BridgeConnector.Socket.Emit("screen-getDisplayMatching", JObject.FromObject(rectangle, _jsonSerializer)); + + return taskCompletionSource.Task; + } + + private JsonSerializer _jsonSerializer = new JsonSerializer() + { + ContractResolver = new CamelCasePropertyNamesContractResolver(), + NullValueHandling = NullValueHandling.Ignore, + DefaultValueHandling = DefaultValueHandling.Ignore + }; + } +} \ No newline at end of file diff --git a/ElectronNET.API/Shell.cs b/ElectronNET.API/Shell.cs new file mode 100644 index 0000000..15406c3 --- /dev/null +++ b/ElectronNET.API/Shell.cs @@ -0,0 +1,244 @@ +using ElectronNET.API.Entities; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace ElectronNET.API +{ + /// + /// Manage files and URLs using their default applications. + /// + public sealed class Shell + { + private static Shell _shell; + + internal Shell() { } + + internal static Shell Instance + { + get + { + if (_shell == null) + { + _shell = new Shell(); + } + + return _shell; + } + } + + /// + /// Show the given file in a file manager. If possible, select the file. + /// + /// + /// Whether the item was successfully shown. + public Task ShowItemInFolderAsync(string fullPath) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-showItemInFolderCompleted", (success) => + { + BridgeConnector.Socket.Off("shell-showItemInFolderCompleted"); + + taskCompletionSource.SetResult((bool)success); + }); + + BridgeConnector.Socket.Emit("shell-showItemInFolder", fullPath); + + return taskCompletionSource.Task; + } + + /// + /// Open the given file in the desktop’s default manner. + /// + /// + /// Whether the item was successfully opened. + public Task OpenItemAsync(string fullPath) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-openItemCompleted", (success) => + { + BridgeConnector.Socket.Off("shell-openItemCompleted"); + + taskCompletionSource.SetResult((bool)success); + }); + + BridgeConnector.Socket.Emit("shell-openItem", fullPath); + + return taskCompletionSource.Task; + } + + /// + /// Open the given external protocol URL in the desktop’s default manner. + /// (For example, mailto: URLs in the user’s default mail agent). + /// + /// + /// Whether an application was available to open the URL. + /// If callback is specified, always returns true. + public Task OpenExternalAsync(string url) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-openExternalCompleted", (success) => + { + BridgeConnector.Socket.Off("shell-openExternalCompleted"); + + taskCompletionSource.SetResult((bool)success); + }); + + BridgeConnector.Socket.Emit("shell-openExternal", url); + + return taskCompletionSource.Task; + } + + /// + /// Open the given external protocol URL in the desktop’s default manner. + /// (For example, mailto: URLs in the user’s default mail agent). + /// + /// + /// macOS only + /// Whether an application was available to open the URL. + /// If callback is specified, always returns true. + public Task OpenExternalAsync(string url, OpenExternalOptions options) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-openExternalCompleted", (success) => + { + BridgeConnector.Socket.Off("shell-openExternalCompleted"); + + taskCompletionSource.SetResult((bool)success); + }); + + BridgeConnector.Socket.Emit("shell-openExternal", url, JObject.FromObject(options, _jsonSerializer)); + + return taskCompletionSource.Task; + } + + /// + /// Open the given external protocol URL in the desktop’s default manner. + /// (For example, mailto: URLs in the user’s default mail agent). + /// + /// + /// macOS only + /// macOS only + /// Whether an application was available to open the URL. + /// If callback is specified, always returns true. + public Task OpenExternalAsync(string url, OpenExternalOptions options, Action action) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-openExternalCompleted", (success) => + { + BridgeConnector.Socket.Off("shell-openExternalCompleted"); + + taskCompletionSource.SetResult((bool)success); + }); + + BridgeConnector.Socket.Off("shell-openExternalCallback"); + BridgeConnector.Socket.On("shell-openExternalCallback", (args) => { + var urlKey = ((JArray)args).First.ToString(); + var error = ((JArray)args).Last.ToObject(); + + if(_openExternalCallbacks.ContainsKey(urlKey)) + { + _openExternalCallbacks[urlKey](error); + } + }); + + _openExternalCallbacks.Add(url, action); + + BridgeConnector.Socket.Emit("shell-openExternal", url, JObject.FromObject(options, _jsonSerializer), true); + + return taskCompletionSource.Task; + } + + private Dictionary> _openExternalCallbacks = new Dictionary>(); + + /// + /// Move the given file to trash and returns a boolean status for the operation. + /// + /// + /// Whether the item was successfully moved to the trash. + public Task MoveItemToTrashAsync(string fullPath) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-moveItemToTrashCompleted", (success) => + { + BridgeConnector.Socket.Off("shell-moveItemToTrashCompleted"); + + taskCompletionSource.SetResult((bool)success); + }); + + BridgeConnector.Socket.Emit("shell-moveItemToTrash", fullPath); + + return taskCompletionSource.Task; + } + + /// + /// Play the beep sound. + /// + public void Beep() + { + BridgeConnector.Socket.Emit("shell-beep"); + } + + /// + /// Creates or updates a shortcut link at shortcutPath. + /// + /// + /// + /// + /// Whether the shortcut was created successfully. + public Task WriteShortcutLinkAsync(string shortcutPath, ShortcutLinkOperation operation, ShortcutDetails options) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-writeShortcutLinkCompleted", (success) => + { + BridgeConnector.Socket.Off("shell-writeShortcutLinkCompleted"); + + taskCompletionSource.SetResult((bool)success); + }); + + BridgeConnector.Socket.Emit("shell-writeShortcutLink", shortcutPath, operation.ToString(), JObject.FromObject(options, _jsonSerializer)); + + return taskCompletionSource.Task; + } + + /// + /// Resolves the shortcut link at shortcutPath. + /// + /// An exception will be thrown when any error happens. + /// + /// + /// + public Task ReadShortcutLinkAsync(string shortcutPath) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("shell-readShortcutLinkCompleted", (shortcutDetails) => + { + BridgeConnector.Socket.Off("shell-readShortcutLinkCompleted"); + + taskCompletionSource.SetResult((ShortcutDetails)shortcutDetails); + }); + + BridgeConnector.Socket.Emit("shell-readShortcutLink", shortcutPath); + + return taskCompletionSource.Task; + } + + private JsonSerializer _jsonSerializer = new JsonSerializer() + { + ContractResolver = new CamelCasePropertyNamesContractResolver(), + NullValueHandling = NullValueHandling.Ignore, + DefaultValueHandling = DefaultValueHandling.Ignore + }; + } +} \ No newline at end of file diff --git a/ElectronNET.API/Tray.cs b/ElectronNET.API/Tray.cs index aa42268..75aa8b2 100644 --- a/ElectronNET.API/Tray.cs +++ b/ElectronNET.API/Tray.cs @@ -9,6 +9,9 @@ using System.Threading.Tasks; namespace ElectronNET.API { + /// + /// Add icons and context menus to the system's notification area. + /// public sealed class Tray { /// @@ -196,9 +199,30 @@ namespace ElectronNET.API } } - public IReadOnlyCollection Items { get { return _items.AsReadOnly(); } } + /// + /// Gets the menu items. + /// + /// + /// The menu items. + /// + public IReadOnlyCollection MenuItems { get { return _items.AsReadOnly(); } } private List _items = new List(); + /// + /// Shows the Traybar. + /// + /// The image. + /// The menu item. + public void Show(string image, MenuItem menuItem) + { + Show(image, new MenuItem[] { menuItem }); + } + + /// + /// Shows the Traybar. + /// + /// The image. + /// The menu items. public void Show(string image, MenuItem[] menuItems) { menuItems.AddMenuItemsId(); @@ -206,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(); }); @@ -218,6 +243,7 @@ namespace ElectronNET.API public void Destroy() { BridgeConnector.Socket.Emit("tray-destroy"); + _items.Clear(); } /// diff --git a/ElectronNET.API/WebContents.cs b/ElectronNET.API/WebContents.cs new file mode 100644 index 0000000..68ce8f3 --- /dev/null +++ b/ElectronNET.API/WebContents.cs @@ -0,0 +1,131 @@ +using ElectronNET.API.Entities; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using System; +using System.Diagnostics; +using System.Threading.Tasks; + +namespace ElectronNET.API +{ + /// + /// Render and control web pages. + /// + public class WebContents + { + public int Id { get; private set; } + + /// + /// Emitted when the renderer process crashes or is killed. + /// + public event Action OnCrashed + { + add + { + if (_crashed == null) + { + BridgeConnector.Socket.On("webContents-crashed" + Id, (killed) => + { + _crashed((bool)killed); + }); + + BridgeConnector.Socket.Emit("register-webContents-crashed", Id); + } + _crashed += value; + } + remove + { + _crashed -= value; + } + } + + private event Action _crashed; + + /// + /// Emitted when the navigation is done, i.e. the spinner of the tab has + /// stopped spinning, and the onload event was dispatched. + /// + public event Action OnDidFinishLoad + { + add + { + if (_didFinishLoad == null) + { + BridgeConnector.Socket.On("webContents-didFinishLoad" + Id, () => + { + _didFinishLoad(); + }); + + BridgeConnector.Socket.Emit("register-webContents-didFinishLoad", Id); + } + _didFinishLoad += value; + } + remove + { + _didFinishLoad -= value; + } + } + + private event Action _didFinishLoad; + + internal WebContents(int id) + { + Id = id; + } + + /// + /// Opens the devtools. + /// + public void OpenDevTools() + { + BridgeConnector.Socket.Emit("webContentsOpenDevTools", Id); + } + + /// + /// Opens the devtools. + /// + /// + public void OpenDevTools(OpenDevToolsOptions openDevToolsOptions) + { + BridgeConnector.Socket.Emit("webContentsOpenDevTools", Id, JObject.FromObject(openDevToolsOptions, _jsonSerializer)); + } + + /// + /// Prints window's web page as PDF with Chromium's preview printing custom + /// settings.The landscape will be ignored if @page CSS at-rule is used in the web page. + /// By default, an empty options will be regarded as: Use page-break-before: always; + /// CSS style to force to print to a new page. + /// + /// + /// + /// success + public Task PrintToPDFAsync(string path, PrintToPDFOptions options = null) + { + var taskCompletionSource = new TaskCompletionSource(); + + BridgeConnector.Socket.On("webContents-printToPDF-completed", (success) => + { + BridgeConnector.Socket.Off("webContents-printToPDF-completed"); + taskCompletionSource.SetResult((bool)success); + }); + + if(options == null) + { + BridgeConnector.Socket.Emit("webContents-printToPDF", Id, "", path); + } + else + { + BridgeConnector.Socket.Emit("webContents-printToPDF", Id, JObject.FromObject(options, _jsonSerializer), path); + } + + return taskCompletionSource.Task; + } + + private JsonSerializer _jsonSerializer = new JsonSerializer() + { + ContractResolver = new CamelCasePropertyNamesContractResolver(), + NullValueHandling = NullValueHandling.Ignore, + DefaultValueHandling = DefaultValueHandling.Ignore + }; + } +} \ No newline at end of file diff --git a/ElectronNET.API/WebHostBuilderExtensions.cs b/ElectronNET.API/WebHostBuilderExtensions.cs index 0409f6b..5547f46 100644 --- a/ElectronNET.API/WebHostBuilderExtensions.cs +++ b/ElectronNET.API/WebHostBuilderExtensions.cs @@ -3,8 +3,17 @@ using System; namespace ElectronNET.API { + /// + /// + /// public static class WebHostBuilderExtensions { + /// + /// Use a Electron support for this .NET Core Project. + /// + /// The builder. + /// The arguments. + /// public static IWebHostBuilder UseElectron(this IWebHostBuilder builder, string[] args) { foreach (string argument in args) @@ -19,20 +28,13 @@ namespace ElectronNET.API } } - if(IsElectronActive()) + if(HybridSupport.IsElectronActive) { builder.UseContentRoot(AppDomain.CurrentDomain.BaseDirectory) .UseUrls("http://0.0.0.0:" + BridgeSettings.WebPort); - - BridgeConnector.StartConnection(); } return builder; } - - private static bool IsElectronActive() - { - return !string.IsNullOrEmpty(BridgeSettings.SocketPort); - } } } diff --git a/ElectronNET.API/WindowManager.cs b/ElectronNET.API/WindowManager.cs index 7c91da0..f6519d5 100644 --- a/ElectronNET.API/WindowManager.cs +++ b/ElectronNET.API/WindowManager.cs @@ -8,6 +8,9 @@ using System.Threading.Tasks; namespace ElectronNET.API { + /// + /// + /// public sealed class WindowManager { private static WindowManager _windowManager; @@ -27,14 +30,31 @@ namespace ElectronNET.API } } + /// + /// Gets the browser windows. + /// + /// + /// The browser windows. + /// public IReadOnlyCollection BrowserWindows { get { return _browserWindows.AsReadOnly(); } } private List _browserWindows = new List(); + /// + /// Creates the window asynchronous. + /// + /// The load URL. + /// public async Task CreateWindowAsync(string loadUrl = "http://localhost") { return await CreateWindowAsync(new BrowserWindowOptions(), loadUrl); } + /// + /// Creates the window asynchronous. + /// + /// The options. + /// The load URL. + /// public Task CreateWindowAsync(BrowserWindowOptions options, string loadUrl = "http://localhost") { var taskCompletionSource = new TaskCompletionSource(); diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index 802e6ca..3637e26 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -108,6 +108,11 @@ namespace ElectronNET.CLI.Commands EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "menu.js", "api."); EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "notification.js", "api."); EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "tray.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "webContents.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "globalShortcut.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "shell.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "screen.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "clipboard.js", "api."); Console.WriteLine("Start npm install..."); ProcessHelper.CmdExecute("npm install", tempPath); diff --git a/ElectronNET.CLI/Commands/StartElectronCommand.cs b/ElectronNET.CLI/Commands/StartElectronCommand.cs index 474e1da..3ec5147 100644 --- a/ElectronNET.CLI/Commands/StartElectronCommand.cs +++ b/ElectronNET.CLI/Commands/StartElectronCommand.cs @@ -65,6 +65,11 @@ namespace ElectronNET.CLI.Commands EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "menu.js", "api."); EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "notification.js", "api."); EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "tray.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "webContents.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "globalShortcut.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "shell.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "screen.js", "api."); + EmbeddedFileHelper.DeployEmbeddedFile(hostApiFolder, "clipboard.js", "api."); Console.WriteLine("Start npm install..."); ProcessHelper.CmdExecute("npm install", tempPath); diff --git a/ElectronNET.CLI/ElectronNET.CLI.csproj b/ElectronNET.CLI/ElectronNET.CLI.csproj index e82b091..8a6a5ec 100644 --- a/ElectronNET.CLI/ElectronNET.CLI.csproj +++ b/ElectronNET.CLI/ElectronNET.CLI.csproj @@ -49,10 +49,6 @@ This package contains the dotnet tooling to electronize your application. - - - - @@ -68,6 +64,17 @@ This package contains the dotnet tooling to electronize your application. + + + + + + + + + + + diff --git a/ElectronNET.Host/api/browserWindows.js b/ElectronNET.Host/api/browserWindows.js index 43e30df..bb55ec4 100644 --- a/ElectronNET.Host/api/browserWindows.js +++ b/ElectronNET.Host/api/browserWindows.js @@ -31,12 +31,12 @@ module.exports = function (socket) { }); socket.on('register-browserWindow-unresponsive', function (id) { getWindowById(id).on('unresponsive', function () { - socket.emit('browserWindow-unresponsive'); + socket.emit('browserWindow-unresponsive' + id); }); }); socket.on('register-browserWindow-responsive', function (id) { getWindowById(id).on('responsive', function () { - socket.emit('browserWindow-responsive'); + socket.emit('browserWindow-responsive' + id); }); }); socket.on('register-browserWindow-blur', function (id) { diff --git a/ElectronNET.Host/api/browserWindows.js.map b/ElectronNET.Host/api/browserWindows.js.map index 67fa517..e2364dc 100644 --- a/ElectronNET.Host/api/browserWindows.js.map +++ b/ElectronNET.Host/api/browserWindows.js.map @@ -1 +1 @@ -{"version":3,"file":"browserWindows.js","sourceRoot":"","sources":["browserWindows.ts"],"names":[],"mappings":";;AAAA,qCAA4D;AAC5D,IAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,IAAM,OAAO,GAA6B,EAAE,CAAA;AAE5C,MAAM,CAAC,OAAO,GAAG,UAAC,MAAuB;IACrC,MAAM,CAAC,EAAE,CAAC,sCAAsC,EAAE,UAAC,EAAE;QACjD,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,eAAe,EAAE;YAClC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,2CAA2C,EAAE,UAAC,EAAE;QACtD,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,oBAA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C,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YAClD,IAAI,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YAC7B,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;gBACnB,MAAM,CAAC,OAAO,CAAC;YACnB,CAAC;QACL,CAAC;IACL,CAAC;AACL,CAAC,CAAA"} \ No newline at end of file diff --git a/ElectronNET.Host/api/browserWindows.ts b/ElectronNET.Host/api/browserWindows.ts index ce57873..8db8422 100644 --- a/ElectronNET.Host/api/browserWindows.ts +++ b/ElectronNET.Host/api/browserWindows.ts @@ -3,6 +3,7 @@ const path = require('path'); const windows: Electron.BrowserWindow[] = [] module.exports = (socket: SocketIO.Server) => { + socket.on('register-browserWindow-ready-to-show', (id) => { getWindowById(id).on('ready-to-show', () => { socket.emit('browserWindow-ready-to-show'); @@ -35,13 +36,13 @@ module.exports = (socket: SocketIO.Server) => { socket.on('register-browserWindow-unresponsive', (id) => { getWindowById(id).on('unresponsive', () => { - socket.emit('browserWindow-unresponsive'); + socket.emit('browserWindow-unresponsive' + id); }); }); socket.on('register-browserWindow-responsive', (id) => { getWindowById(id).on('responsive', () => { - socket.emit('browserWindow-responsive'); + socket.emit('browserWindow-responsive' + id); }); }); diff --git a/ElectronNET.Host/api/clipboard.js b/ElectronNET.Host/api/clipboard.js new file mode 100644 index 0000000..2f86a6d --- /dev/null +++ b/ElectronNET.Host/api/clipboard.js @@ -0,0 +1,51 @@ +"use strict"; +exports.__esModule = true; +var electron_1 = require("electron"); +module.exports = function (socket) { + socket.on('clipboard-readText', function (type) { + var text = electron_1.clipboard.readText(type); + socket.emit('clipboard-readText-Completed', text); + }); + socket.on('clipboard-writeText', function (text, type) { + electron_1.clipboard.writeText(text, type); + }); + socket.on('clipboard-readHTML', function (type) { + var content = electron_1.clipboard.readHTML(type); + socket.emit('clipboard-readHTML-Completed', content); + }); + socket.on('clipboard-writeHTML', function (markup, type) { + electron_1.clipboard.writeHTML(markup, type); + }); + socket.on('clipboard-readRTF', function (type) { + var content = electron_1.clipboard.readRTF(type); + socket.emit('clipboard-readRTF-Completed', content); + }); + socket.on('clipboard-writeRTF', function (text, type) { + electron_1.clipboard.writeHTML(text, type); + }); + socket.on('clipboard-readBookmark', function () { + var bookmark = electron_1.clipboard.readBookmark(); + socket.emit('clipboard-readBookmark-Completed', bookmark); + }); + socket.on('clipboard-writeBookmark', function (title, url, type) { + electron_1.clipboard.writeBookmark(title, url, type); + }); + socket.on('clipboard-readFindText', function () { + var content = electron_1.clipboard.readFindText(); + socket.emit('clipboard-readFindText-Completed', content); + }); + socket.on('clipboard-writeFindText', function (text) { + electron_1.clipboard.writeFindText(text); + }); + socket.on('clipboard-clear', function (type) { + electron_1.clipboard.clear(type); + }); + socket.on('clipboard-availableFormats', function (type) { + var formats = electron_1.clipboard.availableFormats(type); + socket.emit('clipboard-availableFormats-Completed', formats); + }); + socket.on('clipboard-write', function (data, type) { + electron_1.clipboard.write(data, type); + }); +}; +//# sourceMappingURL=clipboard.js.map \ No newline at end of file diff --git a/ElectronNET.Host/api/clipboard.js.map b/ElectronNET.Host/api/clipboard.js.map new file mode 100644 index 0000000..c8d4b6e --- /dev/null +++ b/ElectronNET.Host/api/clipboard.js.map @@ -0,0 +1 @@ +{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["clipboard.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AAErC,MAAM,CAAC,OAAO,GAAG,UAAC,MAAuB;IAErC,MAAM,CAAC,EAAE,CAAC,oBAAoB,EAAE,UAAC,IAAI;QACjC,IAAM,IAAI,GAAG,oBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,CAAC,IAAI,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,qBAAqB,EAA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EAAE,CAAC,wBAAwB,EAAE;QAChC,IAAM,OAAO,GAAG,oBAAS,CAAC,YAAY,EAAE,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,yBAAyB,EAAE,UAAC,IAAI;QACtC,oBAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAC,IAAI;QAC9B,oBAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,4BAA4B,EAAE,UAAC,IAAI;QACzC,IAAM,OAAO,GAAG,oBAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACjD,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAC,IAAI,EAAE,IAAI;QACpC,oBAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAA"} \ No newline at end of file diff --git a/ElectronNET.Host/api/clipboard.ts b/ElectronNET.Host/api/clipboard.ts new file mode 100644 index 0000000..e6bf71c --- /dev/null +++ b/ElectronNET.Host/api/clipboard.ts @@ -0,0 +1,62 @@ +import { clipboard } from "electron"; + +module.exports = (socket: SocketIO.Server) => { + + socket.on('clipboard-readText', (type) => { + const text = clipboard.readText(type); + socket.emit('clipboard-readText-Completed', text); + }); + + socket.on('clipboard-writeText', (text, type) => { + clipboard.writeText(text, type); + }); + + socket.on('clipboard-readHTML', (type) => { + const content = clipboard.readHTML(type); + socket.emit('clipboard-readHTML-Completed', content); + }); + + socket.on('clipboard-writeHTML', (markup, type) => { + clipboard.writeHTML(markup, type); + }); + + socket.on('clipboard-readRTF', (type) => { + const content = clipboard.readRTF(type); + socket.emit('clipboard-readRTF-Completed', content); + }); + + socket.on('clipboard-writeRTF', (text, type) => { + clipboard.writeHTML(text, type); + }); + + socket.on('clipboard-readBookmark', () => { + const bookmark = clipboard.readBookmark(); + socket.emit('clipboard-readBookmark-Completed', bookmark); + }); + + socket.on('clipboard-writeBookmark', (title, url, type) => { + clipboard.writeBookmark(title, url, type); + }); + + socket.on('clipboard-readFindText', () => { + const content = clipboard.readFindText(); + socket.emit('clipboard-readFindText-Completed', content); + }); + + socket.on('clipboard-writeFindText', (text) => { + clipboard.writeFindText(text); + }); + + socket.on('clipboard-clear', (type) => { + clipboard.clear(type); + }); + + socket.on('clipboard-availableFormats', (type) => { + const formats = clipboard.availableFormats(type); + socket.emit('clipboard-availableFormats-Completed', formats); + }); + + socket.on('clipboard-write', (data, type) => { + clipboard.write(data, type); + }); +} \ No newline at end of file diff --git a/ElectronNET.Host/api/globalShortcut.js b/ElectronNET.Host/api/globalShortcut.js new file mode 100644 index 0000000..b1f63a5 --- /dev/null +++ b/ElectronNET.Host/api/globalShortcut.js @@ -0,0 +1,24 @@ +"use strict"; +exports.__esModule = true; +var electron_1 = require("electron"); +module.exports = function (socket) { + socket.on('globalShortcut-register', function (accelerator) { + electron_1.globalShortcut.register(accelerator, function () { + socket.emit('globalShortcut-pressed', accelerator); + }); + }); + socket.on('globalShortcut-isRegistered', function (accelerator) { + var isRegistered = electron_1.globalShortcut.isRegistered(accelerator); + socket.emit('globalShortcut-isRegisteredCompleted', isRegistered); + }); + socket.on('globalShortcut-unregister', function (accelerator) { + electron_1.globalShortcut.unregister(accelerator); + }); + socket.on('globalShortcut-unregisterAll', function () { + try { + electron_1.globalShortcut.unregisterAll(); + } + catch (error) { } + }); +}; +//# sourceMappingURL=globalShortcut.js.map \ No newline at end of file diff --git a/ElectronNET.Host/api/globalShortcut.js.map b/ElectronNET.Host/api/globalShortcut.js.map new file mode 100644 index 0000000..243e38c --- /dev/null +++ b/ElectronNET.Host/api/globalShortcut.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globalShortcut.js","sourceRoot":"","sources":["globalShortcut.ts"],"names":[],"mappings":";;AAAA,qCAA0C;AAE1C,MAAM,CAAC,OAAO,GAAG,UAAC,MAAuB;IACrC,MAAM,CAAC,EAAE,CAAC,yBAAyB,EAAE,UAAC,WAAW;QAC7C,yBAAc,CAAC,QAAQ,CAAC,WAAW,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,6BAA6B,EAAE,UAAC,WAAW;QACjD,IAAM,YAAY,GAAG,yBAAc,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAE9D,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,2BAA2B,EAAE,UAAC,WAAW;QAC/C,yBAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,8BAA8B,EAAE;QACtC,IAAI,CAAC;YACD,yBAAc,CAAC,aAAa,EAAE,CAAC;QACnC,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACP,CAAC,CAAA"} \ No newline at end of file diff --git a/ElectronNET.Host/api/globalShortcut.ts b/ElectronNET.Host/api/globalShortcut.ts new file mode 100644 index 0000000..cf6e2e3 --- /dev/null +++ b/ElectronNET.Host/api/globalShortcut.ts @@ -0,0 +1,25 @@ +import { globalShortcut } from "electron"; + +module.exports = (socket: SocketIO.Server) => { + socket.on('globalShortcut-register', (accelerator) => { + globalShortcut.register(accelerator, () => { + socket.emit('globalShortcut-pressed', accelerator); + }); + }); + + socket.on('globalShortcut-isRegistered', (accelerator) => { + const isRegistered = globalShortcut.isRegistered(accelerator); + + socket.emit('globalShortcut-isRegisteredCompleted', isRegistered); + }); + + socket.on('globalShortcut-unregister', (accelerator) => { + globalShortcut.unregister(accelerator); + }); + + socket.on('globalShortcut-unregisterAll', () => { + try { + globalShortcut.unregisterAll(); + } catch (error) { } + }); +} \ No newline at end of file diff --git a/ElectronNET.Host/api/ipc.js b/ElectronNET.Host/api/ipc.js index 81d465d..8bb0fa5 100644 --- a/ElectronNET.Host/api/ipc.js +++ b/ElectronNET.Host/api/ipc.js @@ -7,6 +7,16 @@ module.exports = function (socket) { socket.emit(channel, [event.preventDefault(), args]); }); }); + socket.on('registerSyncIpcMainChannel', function (channel) { + electron_1.ipcMain.on(channel, function (event, args) { + var x = socket; + x.removeAllListeners(channel + 'Sync'); + socket.on(channel + 'Sync', function (result) { + event.returnValue = result; + }); + socket.emit(channel, [event.preventDefault(), args]); + }); + }); socket.on('registerOnceIpcMainChannel', function (channel) { electron_1.ipcMain.once(channel, function (event, args) { socket.emit(channel, [event.preventDefault(), args]); @@ -22,8 +32,9 @@ module.exports = function (socket) { } var window = electron_1.BrowserWindow.fromId(browserWindow.id); if (window) { - window.webContents.send(channel, data); + (_a = window.webContents).send.apply(_a, [channel].concat(data)); } + var _a; }); }; //# sourceMappingURL=ipc.js.map \ No newline at end of file diff --git a/ElectronNET.Host/api/ipc.js.map b/ElectronNET.Host/api/ipc.js.map index dea2f4c..e0347aa 100644 --- a/ElectronNET.Host/api/ipc.js.map +++ b/ElectronNET.Host/api/ipc.js.map @@ -1 +1 @@ -{"version":3,"file":"ipc.js","sourceRoot":"","sources":["ipc.ts"],"names":[],"mappings":";;AAAA,qCAAkD;AAElD,MAAM,CAAC,OAAO,GAAG,UAAC,MAAuB;IACrC,MAAM,CAAC,EAAE,CAAC,wBAAwB,EAAE,UAAC,OAAO;QACxC,kBAAO,CAAC,EAAE,CAAC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BAAa,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QAEtD,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACT,CAAA,KAAA,MAAM,CAAC,WAAW,CAAA,CAAC,IAAI,YAAC,OAAO,SAAK,IAAI,GAAE;QAC9C,CAAC;;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAA"} \ No newline at end of file diff --git a/ElectronNET.Host/api/ipc.ts b/ElectronNET.Host/api/ipc.ts index b3a7b2b..3ff6586 100644 --- a/ElectronNET.Host/api/ipc.ts +++ b/ElectronNET.Host/api/ipc.ts @@ -7,6 +7,18 @@ module.exports = (socket: SocketIO.Server) => { }); }); + socket.on('registerSyncIpcMainChannel', (channel) => { + ipcMain.on(channel, (event, args) => { + let x = socket; + x.removeAllListeners(channel + 'Sync'); + socket.on(channel + 'Sync', (result) => { + event.returnValue = result; + }); + + socket.emit(channel, [event.preventDefault(), args]); + }); + }); + socket.on('registerOnceIpcMainChannel', (channel) => { ipcMain.once(channel, (event, args) => { socket.emit(channel, [event.preventDefault(), args]); @@ -21,7 +33,7 @@ module.exports = (socket: SocketIO.Server) => { const window = BrowserWindow.fromId(browserWindow.id); if (window) { - window.webContents.send(channel, data); + window.webContents.send(channel, ...data); } }); } \ No newline at end of file diff --git a/ElectronNET.Host/api/menu.js b/ElectronNET.Host/api/menu.js index 4eb7eb3..cc6a8c9 100644 --- a/ElectronNET.Host/api/menu.js +++ b/ElectronNET.Host/api/menu.js @@ -1,7 +1,36 @@ "use strict"; exports.__esModule = true; var electron_1 = require("electron"); +var contextMenuItems = []; module.exports = function (socket) { + socket.on('menu-setContextMenu', function (browserWindowId, menuItems) { + var menu = electron_1.Menu.buildFromTemplate(menuItems); + addContextMenuItemClickConnector(menu.items, browserWindowId, function (id, browserWindowId) { + socket.emit("contextMenuItemClicked", [id, browserWindowId]); + }); + contextMenuItems.push({ + menu: menu, + browserWindowId: browserWindowId + }); + }); + function addContextMenuItemClickConnector(menuItems, browserWindowId, callback) { + menuItems.forEach(function (item) { + if (item.submenu && item.submenu.items.length > 0) { + addContextMenuItemClickConnector(item.submenu.items, browserWindowId, callback); + } + if ("id" in item && item.id) { + item.click = function () { callback(item.id, browserWindowId); }; + } + }); + } + socket.on('menu-contextMenuPopup', function (browserWindowId) { + contextMenuItems.forEach(function (x) { + if (x.browserWindowId === browserWindowId) { + var browserWindow = electron_1.BrowserWindow.fromId(browserWindowId); + x.menu.popup(browserWindow); + } + }); + }); socket.on('menu-setApplicationMenu', function (menuItems) { var menu = electron_1.Menu.buildFromTemplate(menuItems); addMenuItemClickConnector(menu.items, function (id) { diff --git a/ElectronNET.Host/api/menu.js.map b/ElectronNET.Host/api/menu.js.map index 94adcce..87ab594 100644 --- a/ElectronNET.Host/api/menu.js.map +++ b/ElectronNET.Host/api/menu.js.map @@ -1 +1 @@ -{"version":3,"file":"menu.js","sourceRoot":"","sources":["menu.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAEhC,MAAM,CAAC,OAAO,GAAG,UAAC,MAAuB;IACrC,MAAM,CAAC,EAAE,CAAC,yBAAyB,EAAE,UAAC,SAAS;QAC3C,IAAM,IAAI,GAAG,eAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAE/C,yBAAyB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAC,EAAE;YACrC,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,mCAAmC,SAAS,EAAE,QAAQ;QAClD,SAAS,CAAC,OAAO,CAAC,UAAC,IAAI;YACnB,EAAE,CAAA,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC/C,yBAAyB,CAAC,IAAI,CAAC,OAAO,C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AED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC1B,IAAI,CAAC,KAAK,GAAG,cAAQ,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAA"} \ No newline at end of file diff --git a/ElectronNET.Host/api/menu.ts b/ElectronNET.Host/api/menu.ts index 1d96344..41ba0d6 100644 --- a/ElectronNET.Host/api/menu.ts +++ b/ElectronNET.Host/api/menu.ts @@ -1,6 +1,41 @@ -import { Menu } from "electron"; +import { Menu, BrowserWindow } from "electron"; +const contextMenuItems = []; module.exports = (socket: SocketIO.Server) => { + socket.on('menu-setContextMenu', (browserWindowId, menuItems) => { + const menu = Menu.buildFromTemplate(menuItems); + + addContextMenuItemClickConnector(menu.items, browserWindowId, (id, browserWindowId) => { + socket.emit("contextMenuItemClicked", [id, browserWindowId]); + }); + + contextMenuItems.push({ + menu: menu, + browserWindowId: browserWindowId + }); + }); + + function addContextMenuItemClickConnector(menuItems, browserWindowId, callback) { + menuItems.forEach((item) => { + if (item.submenu && item.submenu.items.length > 0) { + addContextMenuItemClickConnector(item.submenu.items, browserWindowId, callback); + } + + if ("id" in item && item.id) { + item.click = () => { callback(item.id, browserWindowId); }; + } + }); + } + + socket.on('menu-contextMenuPopup', (browserWindowId) => { + contextMenuItems.forEach(x => { + if(x.browserWindowId === browserWindowId) { + let browserWindow = BrowserWindow.fromId(browserWindowId); + x.menu.popup(browserWindow); + } + }); + }); + socket.on('menu-setApplicationMenu', (menuItems) => { const menu = Menu.buildFromTemplate(menuItems); @@ -13,11 +48,11 @@ module.exports = (socket: SocketIO.Server) => { function addMenuItemClickConnector(menuItems, callback) { menuItems.forEach((item) => { - if(item.submenu && item.submenu.items.length > 0) { + if (item.submenu && item.submenu.items.length > 0) { addMenuItemClickConnector(item.submenu.items, callback); } - - if("id" in item && item.id) { + + if ("id" in item && item.id) { item.click = () => { callback(item.id); }; } }); diff --git a/ElectronNET.Host/api/screen.js b/ElectronNET.Host/api/screen.js new file mode 100644 index 0000000..dee3ea8 --- /dev/null +++ b/ElectronNET.Host/api/screen.js @@ -0,0 +1,45 @@ +"use strict"; +exports.__esModule = true; +var electron_1 = require("electron"); +module.exports = function (socket) { + socket.on('register-screen-display-added', function (id) { + electron_1.screen.on('display-added', function (event, display) { + socket.emit('screen-display-added-event' + id, display); + }); + }); + socket.on('register-screen-display-removed', function (id) { + electron_1.screen.on('display-removed', function (event, display) { + socket.emit('screen-display-removed-event' + id, display); + }); + }); + socket.on('register-screen-display-metrics-changed', function (id) { + electron_1.screen.on('display-metrics-changed', function (event, display, changedMetrics) { + socket.emit('screen-display-metrics-changed-event' + id, [display, changedMetrics]); + }); + }); + socket.on('screen-getCursorScreenPoint', function () { + var point = electron_1.screen.getCursorScreenPoint(); + socket.emit('screen-getCursorScreenPointCompleted', point); + }); + socket.on('screen-getMenuBarHeight', function () { + var height = electron_1.screen.getMenuBarHeight(); + socket.emit('screen-getMenuBarHeightCompleted', height); + }); + socket.on('screen-getPrimaryDisplay', function () { + var display = electron_1.screen.getPrimaryDisplay(); + socket.emit('screen-getPrimaryDisplayCompleted', display); + }); + socket.on('screen-getAllDisplays', function () { + var display = electron_1.screen.getAllDisplays(); + socket.emit('screen-getAllDisplaysCompleted', display); + }); + socket.on('screen-getDisplayNearestPoint', function (point) { + var display = electron_1.screen.getDisplayNearestPoint(point); + socket.emit('screen-getDisplayNearestPointCompleted', display); + }); + socket.on('screen-getDisplayMatching', function (rectangle) { + var display = electron_1.screen.getDisplayMatching(rectangle); + socket.emit('screen-getDisplayMatchingCompleted', display); + }); +}; +//# sourceMappingURL=screen.js.map \ No newline at end of file diff --git a/ElectronNET.Host/api/screen.js.map b/ElectronNET.Host/api/screen.js.map new file mode 100644 index 0000000..a92cc4a --- /dev/null +++ b/ElectronNET.Host/api/screen.js.map @@ -0,0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AAkC,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,0BAA0B,EAAE;QAClC,IAAI,OAAO,GAAG,iBAAM,CAAC,iBAAiB,EAAE,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,mCAAmC,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,uBAAuB,EAAE;QAC/B,IAAI,OAAO,GAAG,iBAAM,CAAC,cAAc,EAAE,CAAC;QACtC,MAAM,CAAC,IAAI,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,+BAA+B,EAAE,UAAC,KAAK;QAC7C,IAAI,OAAO,GAAG,iBAAM,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,wCAAwC,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,2BAA2B,EAAE,UAAC,SAAS;QAC7C,IAAI,OAAO,GAAG,iBAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAA"} \ No newline at end of file diff --git a/ElectronNET.Host/api/screen.ts b/ElectronNET.Host/api/screen.ts new file mode 100644 index 0000000..135c101 --- /dev/null +++ b/ElectronNET.Host/api/screen.ts @@ -0,0 +1,51 @@ +import { screen } from "electron"; + +module.exports = (socket: SocketIO.Server) => { + socket.on('register-screen-display-added', (id) => { + screen.on('display-added', (event, display) => { + socket.emit('screen-display-added-event' + id, display); + }); + }); + + socket.on('register-screen-display-removed', (id) => { + screen.on('display-removed', (event, display) => { + socket.emit('screen-display-removed-event' + id, display); + }); + }); + + socket.on('register-screen-display-metrics-changed', (id) => { + screen.on('display-metrics-changed', (event, display, changedMetrics) => { + socket.emit('screen-display-metrics-changed-event' + id, [display, changedMetrics]); + }); + }); + + socket.on('screen-getCursorScreenPoint', () => { + var point = screen.getCursorScreenPoint(); + socket.emit('screen-getCursorScreenPointCompleted', point); + }); + + socket.on('screen-getMenuBarHeight', () => { + var height = screen.getMenuBarHeight(); + socket.emit('screen-getMenuBarHeightCompleted', height); + }); + + socket.on('screen-getPrimaryDisplay', () => { + var display = screen.getPrimaryDisplay(); + socket.emit('screen-getPrimaryDisplayCompleted', display); + }); + + socket.on('screen-getAllDisplays', () => { + var display = screen.getAllDisplays(); + socket.emit('screen-getAllDisplaysCompleted', display); + }); + + socket.on('screen-getDisplayNearestPoint', (point) => { + var display = screen.getDisplayNearestPoint(point); + socket.emit('screen-getDisplayNearestPointCompleted', display); + }); + + socket.on('screen-getDisplayMatching', (rectangle) => { + var display = screen.getDisplayMatching(rectangle); + socket.emit('screen-getDisplayMatchingCompleted', display); + }); +} \ No newline at end of file diff --git a/ElectronNET.Host/api/shell.js b/ElectronNET.Host/api/shell.js new file mode 100644 index 0000000..e88c11b --- /dev/null +++ b/ElectronNET.Host/api/shell.js @@ -0,0 +1,44 @@ +"use strict"; +exports.__esModule = true; +var electron_1 = require("electron"); +module.exports = function (socket) { + socket.on('shell-showItemInFolder', function (fullPath) { + var success = electron_1.shell.showItemInFolder(fullPath); + socket.emit('shell-showItemInFolderCompleted', success); + }); + socket.on('shell-openItem', function (fullPath) { + var success = electron_1.shell.openItem(fullPath); + socket.emit('shell-openItemCompleted', success); + }); + socket.on('shell-openExternal', function (url, options, callback) { + var success = false; + if (options && callback) { + success = electron_1.shell.openExternal(url, options, function (error) { + socket.emit('shell-openExternalCallback', [url, error]); + }); + } + else if (options) { + success = electron_1.shell.openExternal(url, options); + } + else { + success = electron_1.shell.openExternal(url); + } + socket.emit('shell-openExternalCompleted', success); + }); + socket.on('shell-moveItemToTrash', function (fullPath) { + var success = electron_1.shell.moveItemToTrash(fullPath); + socket.emit('shell-moveItemToTrashCompleted', success); + }); + socket.on('shell-beep', function () { + electron_1.shell.beep(); + }); + socket.on('shell-writeShortcutLink', function (shortcutPath, operation, options) { + var success = electron_1.shell.writeShortcutLink(shortcutPath, operation, options); + socket.emit('shell-writeShortcutLinkCompleted', success); + }); + socket.on('shell-readShortcutLink', function (shortcutPath) { + var shortcutDetails = electron_1.shell.readShortcutLink(shortcutPath); + socket.emit('shell-readShortcutLinkCompleted', shortcutDetails); + }); +}; +//# sourceMappingURL=shell.js.map \ No newline at end of file diff --git a/ElectronNET.Host/api/shell.js.map b/ElectronNET.Host/api/shell.js.map new file mode 100644 index 0000000..e8a4b0e --- /dev/null +++ b/ElectronNET.Host/api/shell.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shell.js","sourceRoot":"","sources":["shell.ts"],"names":[],"mappings":";;AAAA,qCAAiC;AAEjC,MAAM,CAAC,OAAO,GAAG,UAAC,MAAuB;IACrC,MAAM,CAAC,EAAE,CAAC,wBAAwB,EAAE,UAAC,QAAQ;QACzC,IAAM,OAAO,GAAG,gBAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAEjD,MAAM,CAAC,IAAI,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,UAAC,QAAQ;QACjC,IAAM,OAAO,GAAG,gBAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEzC,MAAM,CAAC,IAAI,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,oBAAoB,EAAE,UAAC,GAAG,EAAE,OAAO,EAAE,QAAQ;QACnD,IAAI,OAAO,GAAG,KAAK,CAAC;QAEpB,EAAE,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC;YACtB,OAAO,GAA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7D,MAAM,CAAC,IAAI,CAAC,iCAAiC,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACP,CAAC,CAAA"} \ No newline at end of file diff --git a/ElectronNET.Host/api/shell.ts b/ElectronNET.Host/api/shell.ts new file mode 100644 index 0000000..09260ff --- /dev/null +++ b/ElectronNET.Host/api/shell.ts @@ -0,0 +1,53 @@ +import { shell } from "electron"; + +module.exports = (socket: SocketIO.Server) => { + socket.on('shell-showItemInFolder', (fullPath) => { + const success = shell.showItemInFolder(fullPath); + + socket.emit('shell-showItemInFolderCompleted', success); + }); + + socket.on('shell-openItem', (fullPath) => { + const success = shell.openItem(fullPath); + + socket.emit('shell-openItemCompleted', success); + }); + + socket.on('shell-openExternal', (url, options, callback) => { + let success = false; + + if (options && callback) { + success = shell.openExternal(url, options, (error) => { + socket.emit('shell-openExternalCallback', [url, error]); + }); + } else if (options) { + success = shell.openExternal(url, options); + } else { + success = shell.openExternal(url); + } + + socket.emit('shell-openExternalCompleted', success); + }); + + socket.on('shell-moveItemToTrash', (fullPath) => { + const success = shell.moveItemToTrash(fullPath); + + socket.emit('shell-moveItemToTrashCompleted', success); + }); + + socket.on('shell-beep', () => { + shell.beep(); + }); + + socket.on('shell-writeShortcutLink', (shortcutPath, operation, options) => { + const success = shell.writeShortcutLink(shortcutPath, operation, options); + + socket.emit('shell-writeShortcutLinkCompleted', success); + }); + + socket.on('shell-readShortcutLink', (shortcutPath) => { + const shortcutDetails = shell.readShortcutLink(shortcutPath); + + socket.emit('shell-readShortcutLinkCompleted', shortcutDetails); + }); +} \ No newline at end of file diff --git a/ElectronNET.Host/api/webContents.js b/ElectronNET.Host/api/webContents.js new file mode 100644 index 0000000..4a107b0 --- /dev/null +++ b/ElectronNET.Host/api/webContents.js @@ -0,0 +1,47 @@ +"use strict"; +exports.__esModule = true; +var electron_1 = require("electron"); +var fs = require('fs'); +module.exports = function (socket) { + socket.on('register-webContents-crashed', function (id) { + var browserWindow = getWindowById(id); + browserWindow.webContents.removeAllListeners('crashed'); + browserWindow.webContents.on('crashed', function (event, killed) { + socket.emit('webContents-crashed' + id, killed); + }); + }); + socket.on('register-webContents-didFinishLoad', function (id) { + var browserWindow = getWindowById(id); + browserWindow.webContents.removeAllListeners('did-finish-load'); + browserWindow.webContents.on('did-finish-load', function () { + socket.emit('webContents-didFinishLoad' + id); + }); + }); + socket.on('webContentsOpenDevTools', function (id, options) { + if (options) { + getWindowById(id).webContents.openDevTools(options); + } + else { + getWindowById(id).webContents.openDevTools(); + } + }); + socket.on('webContents-printToPDF', function (id, options, path) { + getWindowById(id).webContents.printToPDF(options || {}, function (error, data) { + if (error) { + throw error; + } + fs.writeFile(path, data, function (error) { + if (error) { + socket.emit('webContents-printToPDF-completed', false); + } + else { + socket.emit('webContents-printToPDF-completed', true); + } + }); + }); + }); + function getWindowById(id) { + return electron_1.BrowserWindow.fromId(id); + } +}; +//# sourceMappingURL=webContents.js.map \ No newline at end of file diff --git a/ElectronNET.Host/api/webContents.js.map b/ElectronNET.Host/api/webContents.js.map new file mode 100644 index 0000000..aa06d7d --- /dev/null +++ b/ElectronNET.Host/api/webContents.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webContents.js","sourceRoot":"","sources":["webContents.ts"],"names":[],"mappings":";;AAAA,qCAAyC;AACzC,IAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzB,MAAM,CAAC,OAAO,GAAG,UAAC,MAAuB;IACrC,MAAM,CAAC,EAAE,CAAC,8BAA8B,EAAE,UAAC,EAAE;QACzC,IAAI,aAAa,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;QAEtC,aAAa,CAAC,WAAW,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACxD,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,UAAC,KAAK,EAAE,MAAM;YAClD,MAAM,CAAC,IAAI,CAAC,qBAAqB,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;QACpD,C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AAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,uBAAuB,EAAU;QAC7B,MAAM,CAAC,wBAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file diff --git a/ElectronNET.Host/api/webContents.ts b/ElectronNET.Host/api/webContents.ts new file mode 100644 index 0000000..0f1bc59 --- /dev/null +++ b/ElectronNET.Host/api/webContents.ts @@ -0,0 +1,50 @@ +import { BrowserWindow } from 'electron'; +const fs = require('fs'); + +module.exports = (socket: SocketIO.Server) => { + socket.on('register-webContents-crashed', (id) => { + var browserWindow = getWindowById(id); + + browserWindow.webContents.removeAllListeners('crashed'); + browserWindow.webContents.on('crashed', (event, killed) => { + socket.emit('webContents-crashed' + id, killed); + }); + }); + + socket.on('register-webContents-didFinishLoad', (id) => { + let browserWindow = getWindowById(id); + + browserWindow.webContents.removeAllListeners('did-finish-load'); + browserWindow.webContents.on('did-finish-load', () => { + socket.emit('webContents-didFinishLoad' + id); + }); + }); + + socket.on('webContentsOpenDevTools', (id, options) => { + if (options) { + getWindowById(id).webContents.openDevTools(options); + } else { + getWindowById(id).webContents.openDevTools(); + } + }); + + socket.on('webContents-printToPDF', (id, options, path) => { + getWindowById(id).webContents.printToPDF(options || {}, (error, data) => { + if (error) { + throw error; + } + + fs.writeFile(path, data, (error) => { + if (error) { + socket.emit('webContents-printToPDF-completed', false); + } else { + socket.emit('webContents-printToPDF-completed', true); + } + }); + }); + }); + + function getWindowById(id: number): Electron.BrowserWindow { + return BrowserWindow.fromId(id); + } +}; \ No newline at end of file diff --git a/ElectronNET.Host/main.js b/ElectronNET.Host/main.js index 3437150..af3186a 100644 --- a/ElectronNET.Host/main.js +++ b/ElectronNET.Host/main.js @@ -3,7 +3,9 @@ const fs = require('fs'); const path = require('path'); const process = require('child_process').spawn; const portfinder = require('detect-port'); -let io, browserWindows, ipc, apiProcess, loadURL, appApi, menu, dialog, notification, tray; +let io, browserWindows, ipc, apiProcess, loadURL; +let appApi, menu, dialog, notification, tray, webContents; +let globalShortcut, shell, screen, clipboard; app.on('ready', () => { portfinder(8000, (error, port) => { @@ -25,6 +27,11 @@ function startSocketApiBridge(port) { dialog = require('./api/dialog')(socket); notification = require('./api/notification')(socket); tray = require('./api/tray')(socket); + webContents = require('./api/webContents')(socket); + globalShortcut = require('./api/globalShortcut')(socket); + shell = require('./api/shell')(socket); + screen = require('./api/screen')(socket); + clipboard = require('./api/clipboard')(socket); }); } diff --git a/ElectronNET.WebApp/Controllers/AboutController.cs b/ElectronNET.WebApp/Controllers/AboutController.cs new file mode 100644 index 0000000..009638c --- /dev/null +++ b/ElectronNET.WebApp/Controllers/AboutController.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace ElectronNET.WebApp.Controllers +{ + public class AboutController : Controller + { + public IActionResult Index() + { + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/AppSysInformationController.cs b/ElectronNET.WebApp/Controllers/AppSysInformationController.cs new file mode 100644 index 0000000..df4b6c8 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/AppSysInformationController.cs @@ -0,0 +1,42 @@ +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class AppSysInformationController : Controller + { + public IActionResult Index() + { + if(HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("app-info", async (args) => + { + string appPath = await Electron.App.GetAppPathAsync(); + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "got-app-path", appPath); + }); + + Electron.IpcMain.On("sys-info", async (args) => + { + string homePath = await Electron.App.GetPathAsync(PathName.home); + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "got-sys-info", homePath); + }); + + Electron.IpcMain.On("screen-info", async (args) => + { + var display = await Electron.Screen.GetPrimaryDisplayAsync(); + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "got-screen-info", display.Size); + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/ClipboardController.cs b/ElectronNET.WebApp/Controllers/ClipboardController.cs new file mode 100644 index 0000000..27f8d9e --- /dev/null +++ b/ElectronNET.WebApp/Controllers/ClipboardController.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using System.Linq; + +namespace ElectronNET.WebApp.Controllers +{ + public class ClipboardController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("copy-to", (text) => + { + Electron.Clipboard.WriteText(text.ToString()); + }); + + Electron.IpcMain.On("paste-to", async (text) => + { + Electron.Clipboard.WriteText(text.ToString()); + string pasteText = await Electron.Clipboard.ReadTextAsync(); + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "paste-from", pasteText); + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/CrashHangController.cs b/ElectronNET.WebApp/Controllers/CrashHangController.cs new file mode 100644 index 0000000..6df56ea --- /dev/null +++ b/ElectronNET.WebApp/Controllers/CrashHangController.cs @@ -0,0 +1,79 @@ +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class CrashHangController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("process-crash", async (args) => + { + string viewPath = $"http://localhost:{BridgeSettings.WebPort}/crashhang/processcrash"; + + var browserWindow = await Electron.WindowManager.CreateWindowAsync(viewPath); + browserWindow.WebContents.OnCrashed += async (killed) => + { + var options = new MessageBoxOptions("This process has crashed.") + { + Type = MessageBoxType.info, + Title = "Renderer Process Crashed", + Buttons = new string[] { "Reload", "Close" } + }; + var result = await Electron.Dialog.ShowMessageBoxAsync(options); + + if (result.Response == 0) + { + browserWindow.Reload(); + } + else + { + browserWindow.Close(); + } + }; + }); + + Electron.IpcMain.On("process-hang", async (args) => + { + string viewPath = $"http://localhost:{BridgeSettings.WebPort}/crashhang/processhang"; + + var browserWindow = await Electron.WindowManager.CreateWindowAsync(viewPath); + browserWindow.OnUnresponsive += async () => + { + var options = new MessageBoxOptions("This process is hanging.") + { + Type = MessageBoxType.info, + Title = "Renderer Process Hanging", + Buttons = new string[] { "Reload", "Close" } + }; + var result = await Electron.Dialog.ShowMessageBoxAsync(options); + + if (result.Response == 0) + { + browserWindow.Reload(); + } + else + { + browserWindow.Close(); + } + }; + }); + } + + return View(); + } + + public IActionResult ProcessCrash() + { + return View(); + } + + public IActionResult ProcessHang() + { + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/DesktopCapturerController.cs b/ElectronNET.WebApp/Controllers/DesktopCapturerController.cs new file mode 100644 index 0000000..9e3da21 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/DesktopCapturerController.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace ElectronNET.WebApp.Controllers +{ + public class DesktopCapturerController : Controller + { + public IActionResult Index() + { + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/DialogsController.cs b/ElectronNET.WebApp/Controllers/DialogsController.cs new file mode 100644 index 0000000..419e800 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/DialogsController.cs @@ -0,0 +1,68 @@ +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class DialogsController : Controller + { + public IActionResult Index() + { + if(HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("select-directory", async (args) => { + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + var options = new OpenDialogOptions + { + Properties = new OpenDialogProperty[] { + OpenDialogProperty.openFile, + OpenDialogProperty.openDirectory + } + }; + + string[] files = await Electron.Dialog.ShowOpenDialogAsync(mainWindow, options); + Electron.IpcMain.Send(mainWindow, "select-directory-reply", files); + }); + + Electron.IpcMain.On("error-dialog", (args) => + { + Electron.Dialog.ShowErrorBox("An Error Message", "Demonstrating an error message."); + }); + + Electron.IpcMain.On("information-dialog", async (args) => + { + var options = new MessageBoxOptions("This is an information dialog. Isn't it nice?") + { + Type = MessageBoxType.info, + Title = "Information", + Buttons = new string[] { "Yes", "No" } + }; + + var result = await Electron.Dialog.ShowMessageBoxAsync(options); + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "information-dialog-reply", result.Response); + }); + + Electron.IpcMain.On("save-dialog", async (args) => + { + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + var options = new SaveDialogOptions + { + Title = "Save an Image", + Filters = new FileFilter[] + { + new FileFilter { Name = "Images", Extensions = new string[] {"jpg", "png", "gif" } } + } + }; + + var result = await Electron.Dialog.ShowSaveDialogAsync(mainWindow, options); + Electron.IpcMain.Send(mainWindow, "save-dialog-reply", result); + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/HomeController.cs b/ElectronNET.WebApp/Controllers/HomeController.cs index c38ca90..3d997ef 100644 --- a/ElectronNET.WebApp/Controllers/HomeController.cs +++ b/ElectronNET.WebApp/Controllers/HomeController.cs @@ -1,7 +1,4 @@ using Microsoft.AspNetCore.Mvc; -using ElectronNET.API; -using ElectronNET.API.Entities; -using System.Linq; namespace ElectronNET.WebApp.Controllers { @@ -9,40 +6,6 @@ namespace ElectronNET.WebApp.Controllers { public IActionResult Index() { - Electron.IpcMain.On("SayHello", async (args) => - { - Electron.Notification.Show(new NotificationOptions("Hallo Robert", "Nachricht von ASP.NET Core App")); - Electron.IpcMain.Send(Electron.WindowManager.BrowserWindows.First(), "Goodbye", "Elephant!"); - - var currentBrowserWindow = Electron.WindowManager.BrowserWindows.First(); - var openDialogOptions = new OpenDialogOptions - { - Title = "Wuhuuu", - ButtonLabel = "Mhh Okay", - DefaultPath = await Electron.App.GetPathAsync(PathName.pictures), - Message = "Hello World", - Properties = new OpenDialogProperty[] { OpenDialogProperty.openDirectory } - }; - var filePaths = await Electron.Dialog.ShowOpenDialogAsync(currentBrowserWindow, openDialogOptions); - }); - - Electron.IpcMain.On("GetPath", async (args) => - { - Electron.Notification.Show(new NotificationOptions("test", "test2")); - - var currentBrowserWindow = Electron.WindowManager.BrowserWindows.First(); - - string pathName = await Electron.App.GetPathAsync(PathName.pictures); - Electron.IpcMain.Send(currentBrowserWindow, "GetPathComplete", pathName); - - currentBrowserWindow.Minimize(); - await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { - Title = "My second Window", - AutoHideMenuBar = true - },"http://www.google.de"); - }); - - return View(); } } diff --git a/ElectronNET.WebApp/Controllers/IpcController.cs b/ElectronNET.WebApp/Controllers/IpcController.cs new file mode 100644 index 0000000..2f64177 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/IpcController.cs @@ -0,0 +1,28 @@ +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using System.Linq; + +namespace ElectronNET.WebApp.Controllers +{ + public class IpcController : Controller + { + public IActionResult Index() + { + if(HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("async-msg", (args) => + { + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "asynchronous-reply", "pong"); + }); + + Electron.IpcMain.OnSync("sync-msg", (args) => + { + return "pong"; + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/ManageWindowsController.cs b/ElectronNET.WebApp/Controllers/ManageWindowsController.cs new file mode 100644 index 0000000..0749083 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/ManageWindowsController.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class WindowsController : Controller + { + public IActionResult Index() + { + string viewPath = $"http://localhost:{BridgeSettings.WebPort}/windows/demowindow"; + + Electron.IpcMain.On("new-window", async (args) => { + + await Electron.WindowManager.CreateWindowAsync(viewPath); + + }); + + Electron.IpcMain.On("manage-window", async (args) => { + + var browserWindow = await Electron.WindowManager.CreateWindowAsync(viewPath); + browserWindow.OnMove += UpdateReply; + browserWindow.OnResize += UpdateReply; + }); + + Electron.IpcMain.On("listen-to-window", async (args) => { + var mainBrowserWindow = Electron.WindowManager.BrowserWindows.First(); + + var browserWindow = await Electron.WindowManager.CreateWindowAsync(viewPath); + browserWindow.OnFocus += () => Electron.IpcMain.Send(mainBrowserWindow, "listen-to-window-focus"); + browserWindow.OnBlur += () => Electron.IpcMain.Send(mainBrowserWindow, "listen-to-window-blur"); + + Electron.IpcMain.On("listen-to-window-set-focus", (x) => browserWindow.Focus()); + }); + + Electron.IpcMain.On("frameless-window", async (args) => { + var options = new BrowserWindowOptions + { + Frame = false + }; + await Electron.WindowManager.CreateWindowAsync(options, viewPath); + }); + + return View(); + } + + private async void UpdateReply() + { + var browserWindow = Electron.WindowManager.BrowserWindows.Last(); + var size = await browserWindow.GetSizeAsync(); + var position = await browserWindow.GetPositionAsync(); + string message = $"Size: {size[0]},{size[1]} Position: {position[0]},{position[1]}"; + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "manage-window-reply", message); + } + + public IActionResult DemoWindow() + { + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/MenusController.cs b/ElectronNET.WebApp/Controllers/MenusController.cs new file mode 100644 index 0000000..d991e9a --- /dev/null +++ b/ElectronNET.WebApp/Controllers/MenusController.cs @@ -0,0 +1,123 @@ +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API.Entities; +using ElectronNET.API; + +namespace ElectronNET.WebApp.Controllers +{ + public class MenusController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + var menu = new MenuItem[] { + new MenuItem { Label = "Edit", Submenu = new MenuItem[] { + new MenuItem { Label = "Undo", Accelerator = "CmdOrCtrl+Z", Role = MenuRole.undo }, + new MenuItem { Label = "Redo", Accelerator = "Shift+CmdOrCtrl+Z", Role = MenuRole.redo }, + new MenuItem { Type = MenuType.separator }, + new MenuItem { Label = "Cut", Accelerator = "CmdOrCtrl+X", Role = MenuRole.cut }, + new MenuItem { Label = "Copy", Accelerator = "CmdOrCtrl+C", Role = MenuRole.copy }, + new MenuItem { Label = "Paste", Accelerator = "CmdOrCtrl+V", Role = MenuRole.paste }, + new MenuItem { Label = "Select All", Accelerator = "CmdOrCtrl+A", Role = MenuRole.selectall } + } + }, + new MenuItem { Label = "View", Submenu = new MenuItem[] { + new MenuItem + { + Label = "Reload", + Accelerator = "CmdOrCtrl+R", + Click = () => + { + // on reload, start fresh and close any old + // open secondary windows + Electron.WindowManager.BrowserWindows.ToList().ForEach(browserWindow => { + if(browserWindow.Id != 1) + { + browserWindow.Close(); + } + else + { + browserWindow.Reload(); + } + }); + } + }, + new MenuItem + { + Label = "Toggle Full Screen", + Accelerator = "CmdOrCtrl+F", + Click = async () => + { + bool isFullScreen = await Electron.WindowManager.BrowserWindows.First().IsFullScreenAsync(); + Electron.WindowManager.BrowserWindows.First().SetFullScreen(!isFullScreen); + } + }, + new MenuItem + { + Label = "Open Developer Tools", + Accelerator = "CmdOrCtrl+I", + Click = () => Electron.WindowManager.BrowserWindows.First().WebContents.OpenDevTools() + }, + new MenuItem + { + Type = MenuType.separator + }, + new MenuItem + { + Label = "App Menu Demo", + Click = async () => { + var options = new MessageBoxOptions("This demo is for the Menu section, showing how to create a clickable menu item in the application menu."); + options.Type = MessageBoxType.info; + options.Title = "Application Menu Demo"; + await Electron.Dialog.ShowMessageBoxAsync(options); + } + } + } + }, + new MenuItem { Label = "Window", Role = MenuRole.window, Submenu = new MenuItem[] { + new MenuItem { Label = "Minimize", Accelerator = "CmdOrCtrl+M", Role = MenuRole.minimize }, + new MenuItem { Label = "Close", Accelerator = "CmdOrCtrl+W", Role = MenuRole.close } + } + }, + new MenuItem { Label = "Help", Role = MenuRole.help, Submenu = new MenuItem[] { + new MenuItem + { + Label = "Learn More", + Click = async () => await Electron.Shell.OpenExternalAsync("https://github.com/ElectronNET") + } + } + } + }; + + Electron.Menu.SetApplicationMenu(menu); + + CreateContextMenu(); + } + + return View(); + } + + private void CreateContextMenu() + { + var menu = new MenuItem[] + { + new MenuItem + { + Label = "Hello", + Click = async () => await Electron.Dialog.ShowMessageBoxAsync("Electron.NET rocks!") + }, + new MenuItem { Type = MenuType.separator }, + new MenuItem { Label = "Electron.NET", Type = MenuType.checkbox, Checked = true } + }; + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.Menu.SetContextMenu(mainWindow, menu); + + Electron.IpcMain.On("show-context-menu", (args) => + { + Electron.Menu.ContextMenuPopup(mainWindow); + }); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/NotificationsController.cs b/ElectronNET.WebApp/Controllers/NotificationsController.cs new file mode 100644 index 0000000..ba41e35 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/NotificationsController.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class NotificationsController : Controller + { + public IActionResult Index() + { + if(HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("basic-noti", (args) => { + + var options = new NotificationOptions("Basic Notification", "Short message part") + { + OnClick = async () => await Electron.Dialog.ShowMessageBoxAsync("Notification clicked") + }; + + Electron.Notification.Show(options); + + }); + + Electron.IpcMain.On("advanced-noti", (args) => { + + var options = new NotificationOptions("Notification with image", "Short message plus a custom image") + { + OnClick = async () => await Electron.Dialog.ShowMessageBoxAsync("Notification clicked"), + Icon = "/assets/img/programming.png" + }; + + Electron.Notification.Show(options); + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/PdfController.cs b/ElectronNET.WebApp/Controllers/PdfController.cs new file mode 100644 index 0000000..18a4a1a --- /dev/null +++ b/ElectronNET.WebApp/Controllers/PdfController.cs @@ -0,0 +1,43 @@ +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class PdfController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("print-pdf", async (args) => + { + BrowserWindow mainWindow = Electron.WindowManager.BrowserWindows.First(); + + var saveOptions = new SaveDialogOptions + { + Title = "Save an PDF-File", + DefaultPath = await Electron.App.GetPathAsync(PathName.documents), + Filters = new FileFilter[] + { + new FileFilter { Name = "PDF", Extensions = new string[] { "pdf" } } + } + }; + var path = await Electron.Dialog.ShowSaveDialogAsync(mainWindow, saveOptions); + + if (await mainWindow.WebContents.PrintToPDFAsync(path)) + { + await Electron.Shell.OpenExternalAsync("file://" + path); + } + else + { + Electron.Dialog.ShowErrorBox("Error", "Failed to create pdf file."); + } + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/ShellController.cs b/ElectronNET.WebApp/Controllers/ShellController.cs new file mode 100644 index 0000000..d2c361d --- /dev/null +++ b/ElectronNET.WebApp/Controllers/ShellController.cs @@ -0,0 +1,29 @@ +using ElectronNET.API; +using ElectronNET.API.Entities; +using Microsoft.AspNetCore.Mvc; + +namespace ElectronNET.WebApp.Controllers +{ + public class ShellController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("open-file-manager", async (args) => + { + string path = await Electron.App.GetPathAsync(PathName.home); + await Electron.Shell.ShowItemInFolderAsync(path); + + }); + + Electron.IpcMain.On("open-ex-links", async (args) => + { + await Electron.Shell.OpenExternalAsync("https://github.com/ElectronNET"); + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/ShortcutsController.cs b/ElectronNET.WebApp/Controllers/ShortcutsController.cs new file mode 100644 index 0000000..80a5628 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/ShortcutsController.cs @@ -0,0 +1,30 @@ +using ElectronNET.API; +using ElectronNET.API.Entities; +using Microsoft.AspNetCore.Mvc; + +namespace ElectronNET.WebApp.Controllers +{ + public class ShortcutsController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + Electron.GlobalShortcut.Register("CommandOrControl+Alt+K", async () => + { + var options = new MessageBoxOptions("You pressed the registered global shortcut keybinding.") + { + Type = MessageBoxType.info, + Title = "Success!" + }; + + await Electron.Dialog.ShowMessageBoxAsync(options); + }); + + Electron.App.WillQuit += () => Electron.GlobalShortcut.UnregisterAll(); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/TrayController.cs b/ElectronNET.WebApp/Controllers/TrayController.cs new file mode 100644 index 0000000..a723025 --- /dev/null +++ b/ElectronNET.WebApp/Controllers/TrayController.cs @@ -0,0 +1,38 @@ +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class TrayController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + Electron.IpcMain.On("put-in-tray", (args) => + { + + if (Electron.Tray.Items.Count == 0) + { + var menu = new MenuItem + { + Label = "Remove", + Click = () => Electron.Tray.Destroy() + }; + + Electron.Tray.Show("/Assets/electron_32x32.png", menu); + Electron.Tray.SetToolTip("Electron Demo in the tray."); + } + else + { + Electron.Tray.Destroy(); + } + + }); + } + + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/Controllers/WindowsController.cs b/ElectronNET.WebApp/Controllers/WindowsController.cs new file mode 100644 index 0000000..a28888b --- /dev/null +++ b/ElectronNET.WebApp/Controllers/WindowsController.cs @@ -0,0 +1,71 @@ +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using ElectronNET.API; +using ElectronNET.API.Entities; + +namespace ElectronNET.WebApp.Controllers +{ + public class WindowsController : Controller + { + public IActionResult Index() + { + if (HybridSupport.IsElectronActive) + { + string viewPath = $"http://localhost:{BridgeSettings.WebPort}/windows/demowindow"; + + Electron.IpcMain.On("new-window", async (args) => + { + + await Electron.WindowManager.CreateWindowAsync(viewPath); + + }); + + Electron.IpcMain.On("manage-window", async (args) => + { + + var browserWindow = await Electron.WindowManager.CreateWindowAsync(viewPath); + browserWindow.OnMove += UpdateReply; + browserWindow.OnResize += UpdateReply; + }); + + Electron.IpcMain.On("listen-to-window", async (args) => + { + var mainBrowserWindow = Electron.WindowManager.BrowserWindows.First(); + + var browserWindow = await Electron.WindowManager.CreateWindowAsync(viewPath); + browserWindow.OnFocus += () => Electron.IpcMain.Send(mainBrowserWindow, "listen-to-window-focus"); + browserWindow.OnBlur += () => Electron.IpcMain.Send(mainBrowserWindow, "listen-to-window-blur"); + + Electron.IpcMain.On("listen-to-window-set-focus", (x) => browserWindow.Focus()); + }); + + Electron.IpcMain.On("frameless-window", async (args) => + { + var options = new BrowserWindowOptions + { + Frame = false + }; + await Electron.WindowManager.CreateWindowAsync(options, viewPath); + }); + } + + return View(); + } + + private async void UpdateReply() + { + var browserWindow = Electron.WindowManager.BrowserWindows.Last(); + var size = await browserWindow.GetSizeAsync(); + var position = await browserWindow.GetPositionAsync(); + string message = $"Size: {size[0]},{size[1]} Position: {position[0]},{position[1]}"; + + var mainWindow = Electron.WindowManager.BrowserWindows.First(); + Electron.IpcMain.Send(mainWindow, "manage-window-reply", message); + } + + public IActionResult DemoWindow() + { + return View(); + } + } +} \ No newline at end of file diff --git a/ElectronNET.WebApp/ElectronNET.WebApp.csproj b/ElectronNET.WebApp/ElectronNET.WebApp.csproj index a3bbb00..d6b4472 100644 --- a/ElectronNET.WebApp/ElectronNET.WebApp.csproj +++ b/ElectronNET.WebApp/ElectronNET.WebApp.csproj @@ -4,9 +4,15 @@ netcoreapp2.0 win10-x64 + + + + + + - + diff --git a/ElectronNET.WebApp/Properties/launchSettings.json b/ElectronNET.WebApp/Properties/launchSettings.json index 66a2abe..548e6c4 100644 --- a/ElectronNET.WebApp/Properties/launchSettings.json +++ b/ElectronNET.WebApp/Properties/launchSettings.json @@ -17,7 +17,6 @@ }, "ElectronNET.WebApp": { "commandName": "Project", - "commandLineArgs": "/electronPort=3000", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" diff --git a/ElectronNET.WebApp/Startup.cs b/ElectronNET.WebApp/Startup.cs index 4c55203..ad9a68c 100644 --- a/ElectronNET.WebApp/Startup.cs +++ b/ElectronNET.WebApp/Startup.cs @@ -2,12 +2,8 @@ using ElectronNET.API.Entities; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using System; -using System.Linq; -using System.Threading; namespace ElectronNET.WebApp { @@ -39,68 +35,24 @@ namespace ElectronNET.WebApp template: "{controller=Home}/{action=Index}/{id?}"); }); - Bootstrap(); + + if(HybridSupport.IsElectronActive) + { + ElectronBootstrap(); + } } - public async void Bootstrap() + public async void ElectronBootstrap() { - var menuItems = new MenuItem[] { - new MenuItem { - Label = "File", - Submenu = new MenuItem[] { - new MenuItem { - Label = "Exit", - Click = () => - { - Electron.App.Exit(); - } - } - } - }, - new MenuItem - { - Label = "About", - Click = async () => { - await Electron.Dialog.ShowMessageBoxAsync(new MessageBoxOptions("(c) 2017 Gregor Biswanger & Robert Muehsig") { - Title = "About us...", - Type = MessageBoxType.info - }); - } - } - }; - - Electron.Menu.SetApplicationMenu(menuItems); - Electron.Tray.Show("/Assets/electron_32x32.png", menuItems); - var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { + Width = 1152, + Height = 864, Show = false }); - browserWindow.OnReadyToShow += async () => - { - browserWindow.Show(); - - await browserWindow.SetThumbarButtonsAsync(new ThumbarButton[] { - new ThumbarButton("/Assets/electron.ico") - { - Tooltip = "Hello World", - Click = async () => { - await Electron.Dialog.ShowMessageBoxAsync(new MessageBoxOptions("Hallo von Thumbar Button!")); - } - }, - new ThumbarButton("/Assets/electron.ico") - { - Tooltip = "Hello World 2", - Click = async () => { - await Electron.Dialog.ShowMessageBoxAsync(new MessageBoxOptions("Hallo von Thumbar Button 2!")); - } - } - }); - - browserWindow.SetThumbnailToolTip("Electron.NET rocks!"); - }; - + browserWindow.OnReadyToShow += () => browserWindow.Show(); + browserWindow.SetTitle("Electron.NET API Demos"); } } } diff --git a/ElectronNET.WebApp/Views/About/Index.cshtml b/ElectronNET.WebApp/Views/About/Index.cshtml new file mode 100644 index 0000000..5d63504 --- /dev/null +++ b/ElectronNET.WebApp/Views/About/Index.cshtml @@ -0,0 +1,42 @@ + diff --git a/ElectronNET.WebApp/Views/AppSysInformation/Index.cshtml b/ElectronNET.WebApp/Views/AppSysInformation/Index.cshtml new file mode 100644 index 0000000..a22440e --- /dev/null +++ b/ElectronNET.WebApp/Views/AppSysInformation/Index.cshtml @@ -0,0 +1,187 @@ + diff --git a/ElectronNET.WebApp/Views/Clipboard/Index.cshtml b/ElectronNET.WebApp/Views/Clipboard/Index.cshtml new file mode 100644 index 0000000..77e3098 --- /dev/null +++ b/ElectronNET.WebApp/Views/Clipboard/Index.cshtml @@ -0,0 +1,115 @@ + diff --git a/ElectronNET.WebApp/Views/CrashHang/Index.cshtml b/ElectronNET.WebApp/Views/CrashHang/Index.cshtml new file mode 100644 index 0000000..2a77c5b --- /dev/null +++ b/ElectronNET.WebApp/Views/CrashHang/Index.cshtml @@ -0,0 +1,113 @@ + diff --git a/ElectronNET.WebApp/Views/CrashHang/ProcessCrash.cshtml b/ElectronNET.WebApp/Views/CrashHang/ProcessCrash.cshtml new file mode 100644 index 0000000..fd2d41b --- /dev/null +++ b/ElectronNET.WebApp/Views/CrashHang/ProcessCrash.cshtml @@ -0,0 +1,24 @@ + + +

Click the text below to crash and then reload this process.

+Crash this process diff --git a/ElectronNET.WebApp/Views/CrashHang/ProcessHang.cshtml b/ElectronNET.WebApp/Views/CrashHang/ProcessHang.cshtml new file mode 100644 index 0000000..8b14321 --- /dev/null +++ b/ElectronNET.WebApp/Views/CrashHang/ProcessHang.cshtml @@ -0,0 +1,29 @@ + + +

Click the text below to hang and then reload this process.

+(This will take up to 30 seconds.) + +Hang this process diff --git a/ElectronNET.WebApp/Views/DesktopCapturer/Index.cshtml b/ElectronNET.WebApp/Views/DesktopCapturer/Index.cshtml new file mode 100644 index 0000000..5e22c04 --- /dev/null +++ b/ElectronNET.WebApp/Views/DesktopCapturer/Index.cshtml @@ -0,0 +1,126 @@ + diff --git a/ElectronNET.WebApp/Views/Dialogs/Index.cshtml b/ElectronNET.WebApp/Views/Dialogs/Index.cshtml new file mode 100644 index 0000000..6e14603 --- /dev/null +++ b/ElectronNET.WebApp/Views/Dialogs/Index.cshtml @@ -0,0 +1,222 @@ + diff --git a/ElectronNET.WebApp/Views/Home/Index.cshtml b/ElectronNET.WebApp/Views/Home/Index.cshtml index 75b5ee5..e8ef942 100644 --- a/ElectronNET.WebApp/Views/Home/Index.cshtml +++ b/ElectronNET.WebApp/Views/Home/Index.cshtml @@ -1,45 +1,110 @@  - - + - + + + + + + + + + + + + + + + + + + + + + + + + + -

Hello from ASP.NET Core MVC!

- We are using node - , - Chrome - , - and Electron - . -

- + + +
+ + + + + + + diff --git a/ElectronNET.WebApp/Views/Ipc/Index.cshtml b/ElectronNET.WebApp/Views/Ipc/Index.cshtml new file mode 100644 index 0000000..9e65c70 --- /dev/null +++ b/ElectronNET.WebApp/Views/Ipc/Index.cshtml @@ -0,0 +1,104 @@ + diff --git a/ElectronNET.WebApp/Views/Menus/Index.cshtml b/ElectronNET.WebApp/Views/Menus/Index.cshtml new file mode 100644 index 0000000..28a4e1e --- /dev/null +++ b/ElectronNET.WebApp/Views/Menus/Index.cshtml @@ -0,0 +1,189 @@ + diff --git a/ElectronNET.WebApp/Views/Notifications/Index.cshtml b/ElectronNET.WebApp/Views/Notifications/Index.cshtml new file mode 100644 index 0000000..81965fc --- /dev/null +++ b/ElectronNET.WebApp/Views/Notifications/Index.cshtml @@ -0,0 +1,78 @@ + diff --git a/ElectronNET.WebApp/Views/Pdf/Index.cshtml b/ElectronNET.WebApp/Views/Pdf/Index.cshtml new file mode 100644 index 0000000..071e73d --- /dev/null +++ b/ElectronNET.WebApp/Views/Pdf/Index.cshtml @@ -0,0 +1,79 @@ + \ No newline at end of file diff --git a/ElectronNET.WebApp/Views/Shell/Index.cshtml b/ElectronNET.WebApp/Views/Shell/Index.cshtml new file mode 100644 index 0000000..2f647ba --- /dev/null +++ b/ElectronNET.WebApp/Views/Shell/Index.cshtml @@ -0,0 +1,71 @@ + diff --git a/ElectronNET.WebApp/Views/Shortcuts/Index.cshtml b/ElectronNET.WebApp/Views/Shortcuts/Index.cshtml new file mode 100644 index 0000000..b4e9e91 --- /dev/null +++ b/ElectronNET.WebApp/Views/Shortcuts/Index.cshtml @@ -0,0 +1,74 @@ + diff --git a/ElectronNET.WebApp/Views/Tray/Index.cshtml b/ElectronNET.WebApp/Views/Tray/Index.cshtml new file mode 100644 index 0000000..967632a --- /dev/null +++ b/ElectronNET.WebApp/Views/Tray/Index.cshtml @@ -0,0 +1,100 @@ + diff --git a/ElectronNET.WebApp/Views/Windows/DemoWindow.cshtml b/ElectronNET.WebApp/Views/Windows/DemoWindow.cshtml new file mode 100644 index 0000000..9f4629b --- /dev/null +++ b/ElectronNET.WebApp/Views/Windows/DemoWindow.cshtml @@ -0,0 +1,32 @@ + + +

Hello World!

+Close this Window \ No newline at end of file diff --git a/ElectronNET.WebApp/Views/Windows/HandleErrorCrashes.cshtml b/ElectronNET.WebApp/Views/Windows/HandleErrorCrashes.cshtml new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/ElectronNET.WebApp/Views/Windows/HandleErrorCrashes.cshtml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ElectronNET.WebApp/Views/Windows/Index.cshtml b/ElectronNET.WebApp/Views/Windows/Index.cshtml new file mode 100644 index 0000000..9dc1573 --- /dev/null +++ b/ElectronNET.WebApp/Views/Windows/Index.cshtml @@ -0,0 +1,201 @@ + diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/mac/app.icns b/ElectronNET.WebApp/wwwroot/assets/app-icon/mac/app.icns new file mode 100644 index 0000000..f8d4980 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/mac/app.icns differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/1024.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/1024.png new file mode 100644 index 0000000..fcda550 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/1024.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/128.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/128.png new file mode 100644 index 0000000..6dada48 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/128.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/16.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/16.png new file mode 100644 index 0000000..0bfd85d Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/16.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/24.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/24.png new file mode 100644 index 0000000..e6a95d5 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/24.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/256.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/256.png new file mode 100644 index 0000000..de890da Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/256.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/32.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/32.png new file mode 100644 index 0000000..a971ac5 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/32.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/48.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/48.png new file mode 100644 index 0000000..2771985 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/48.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/512.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/512.png new file mode 100644 index 0000000..7abee50 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/512.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/png/64.png b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/64.png new file mode 100644 index 0000000..dd98747 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/png/64.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/app-icon/win/app.ico b/ElectronNET.WebApp/wwwroot/assets/app-icon/win/app.ico new file mode 100644 index 0000000..4127fe8 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/app-icon/win/app.ico differ diff --git a/ElectronNET.WebApp/wwwroot/assets/code-blocks.js b/ElectronNET.WebApp/wwwroot/assets/code-blocks.js new file mode 100644 index 0000000..ebfeb3b --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/code-blocks.js @@ -0,0 +1,6 @@ +document.addEventListener('DOMContentLoaded', function () { + const codeBlocks = document.querySelectorAll('pre code'); + Array.prototype.forEach.call(codeBlocks, function (code) { + hljs.highlightBlock(code) + }); +}) diff --git a/ElectronNET.WebApp/wwwroot/assets/css/about.css b/ElectronNET.WebApp/wwwroot/assets/css/about.css new file mode 100644 index 0000000..380bc38 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/about.css @@ -0,0 +1,155 @@ +/* Welcome ------------------------ */ + +.about { + --about-space: 2rem; + + position: absolute; + display: flex; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1; + overflow-x: hidden; + overflow-y: auto; + padding: 0; + background-color: hsl(0,0%,98%); + pointer-events: none; + visibility: hidden; + opacity: 0; + transform: scale(1.1); + transition: visibility 0s .12s linear , opacity .12s ease-in, transform .12s ease-in; +} +.about.is-shown { + pointer-events: auto; + visibility: visible; + opacity: 1; + transform: scale(1); + transition: visibility 0s 0s linear , opacity .24s ease-out, transform .24s ease-out; +} + +.about-wrapper { + margin: auto; +} + +.about-header { + padding: var(--about-space) 0; + border-bottom: 1px solid hsl(0,0%,88%); +} + +.about-logo { + display: block; + margin: 0 auto; + width: 320px; /* TODO: Adjust asset to this size */ + max-width: 100%; +} + +.about-sections { + max-width: 680px; + padding: 0 var(--about-space); +} + +.about-section { + margin: var(--about-space) 0; +} + +.about h2 { + text-align: center; + margin: 0 0 1em 0; + font-size: 1.5em; + color: hsl(0, 0%, 55%); +} + +.about .about-code h2 { + color: hsl(330, 65%, 55%); +} + +.about .play-along h2 { + color: hsl(222, 53%, 50%); +} + +.about-button { + display: block; + margin: 0 auto; + padding: .4em 1.2em; + font: inherit; + font-size: 1.6em; + color: inherit; + border: 2px solid; + border-radius: 4px; + background-color: transparent; +} +.about-button:focus { + outline: none; + border-color: hsl(0,0%,88%); +} + +footer.about-section { + text-align: center; +} + +.rainbow-button-wrapper { + --rainbow-button-width: 170px; + --rainbow-button-height: 50px; + --rainbow-button-width-inner: 164px; + --rainbow-button-height-inner: 44px; + --rainbow-color-1: hsl(116, 30%, 36%); + --rainbow-color-2: hsl(194, 60%, 36%); + --rainbow-color-3: hsl(222, 53%, 50%); + --rainbow-color-4: hsl(285, 47%, 46%); + --rainbow-color-5: hsl(330, 65%, 48%); + --rainbow-color-6: hsl(32, 79%, 49%); + --rainbow-color-7: hsl(53, 84%, 50%); + + display: inline-block; + width: var(--rainbow-button-width); + height: var(--rainbow-button-height); + position: relative; + overflow: hidden; + border-radius: 5px; +} + +.rainbow-button-wrapper:before { + display: block; + position: absolute; + z-index: 2; + top: 0; + left: 0; + width: 600px; + height: var(--rainbow-button-height); + background: #CCC; + background: linear-gradient(to right, var(--rainbow-color-1) 0%, var(--rainbow-color-2) 14%, var(--rainbow-color-3) 28%, var(--rainbow-color-4) 42%, var(--rainbow-color-5) 56%, var(--rainbow-color-6) 70%, var(--rainbow-color-7) 84%, var(--rainbow-color-1) 100%); + background-position: -200px 0; + transition: all 0.5s; + content: ""; +} + +.rainbow-button-wrapper button { + display: block; + width: var(--rainbow-button-width-inner); + height: var(--rainbow-button-height-inner); + position: absolute; + z-index: 3; + top: 3px; + left: 3px; + border: none; + background: white; + color: black; + font-size: 1.3rem; +} + +.rainbow-button-wrapper:hover:before { + background-position: 200px 0; +} + +@media (min-width: 940px) { + .about-header { + align-self: center; + padding: var(--about-space); + border-right: 1px solid hsl(0,0%,88%); + border-bottom: none; + } + .about-wrapper { + display: flex; + } +} diff --git a/ElectronNET.WebApp/wwwroot/assets/css/demo.css b/ElectronNET.WebApp/wwwroot/assets/css/demo.css new file mode 100644 index 0000000..96afc4b --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/demo.css @@ -0,0 +1,205 @@ +/* Demo */ + +.demo:first-of-type { + margin-top: 2rem; +} +.demo:last-of-type { + margin-bottom: 2rem; +} +@media (min-width: 940px) { + .demo:last-of-type { + margin-bottom: 4rem; + } +} + +.demo-wrapper { + position: relative; + max-width: 740px; + margin: 0 auto; + padding: 0 2rem; +} + + +/* Toggle Button ----------------------------- */ + +.demo-toggle-button { + position: relative; + display: block; + margin: 0; + padding: .5em 1.5em; + line-height: 1.5; + font: inherit; + font-weight: 600; + font-size: 1.2em; + text-align: left; + border: none; + color: inherit; + background-color: transparent; + transition: border-color .12s; + outline: none; +} + +.demo-toggle-button:before, +.demo-toggle-button:after { + content: ""; + position: absolute; + left: 0; + width: 2px; + height: 50%; + background-color: hsl(0,0%,88%); + transition: transform .2s cubic-bezier(.4,.1,0,1); +} +.demo-toggle-button:before { + top: 0; + transform-origin: bottom center; + transform: translateX(.7em) rotate(-30deg) scale(.75); +} +.demo-toggle-button:after { + bottom: 0; + transform-origin: top center; + transform: translateX(.7em) rotate(30deg) scale(.75); +} +.is-open .demo-toggle-button:before, +.is-open .demo-toggle-button:after { + transform: rotate(0deg); +} +.demo-toggle-button:focus:before, +.demo-toggle-button:focus:after { + background-color: currentColor; +} + +/* Meta info */ + +.demo-meta { + margin-top: .2em; + font-size: 11px; + font-weight: 300; + text-transform: uppercase; + color: var(--color-subtle); +} +.demo-meta-divider { + margin: 0 .5em; +} + + +/* Demo Box ----------------------------- */ + +.demo-box { + display: none; + position: relative; + padding: 2em; + margin-top: 1em; + margin-bottom: 2em; + border-radius: 6px; + border: 1px solid var(--color-border); + background-color: var(--color-bg); +} +.demo-box:before { + content: ""; + position: absolute; + top: -11px; + width: 20px; + height: 20px; + background-color: inherit; + border-top: inherit; + border-right: inherit; + border-top-right-radius: 3px; + transform: rotate(-45deg); +} + +.is-open .demo-box { + display: block; + animation: demo-box-fade-in .2s cubic-bezier(0, .20, .20, .96); +} +@keyframes demo-box-fade-in { + 0% { opacity: 0; transform: translateY(-20px); } + 100% { opacity: 1; transform: translateY(0); } +} + +.demo-box > p:first-child { + margin-top: 0; +} + +.demo-box h5 { + font-size: 1em; + margin-bottom: .6em; +} + + +/* Demo Controls ----------------------------- */ + +.demo-controls { + display: flex; + align-items: center; +} + +.demo-button { + align-self: flex-start; + margin-right: 1em; + border: 2px solid; + border-radius: 4px; + font: inherit; + font-size: 1.2em; + padding: .4em 1.2em; + color: inherit; + background-color: transparent; +} +.demo-button:focus { + outline: none; + background-color: white; +} +.demo-button:active { + border-color: var(--color-border); +} + +.demo-input { + flex: 1; + border: 2px solid var(--color-border); + border-radius: 4px; + font: inherit; + font-size: 1.2em; + padding: .4em .8em; + color: inherit; + background-color: transparent; +} +.demo-input:focus { + outline: none; + border-color: hsl(0,0%,80%); + background-color: white; +} + +.demo-response { + flex: 1; + word-break: break-word; +} + +.smooth-appear { + opacity: 1; + transition: opacity .5s ease-in-out; +} + +.disappear { + opacity: 0; +} +.demo-button.smooth-disappear:focus { + outline: inherit; + border-color: inherit; + background-color: inherit; +} + +/* ProTip ----------------------------- */ + +.demo-protip { + margin-top: 2rem; + padding: 1.5rem 2rem 2rem 2rem; + border: 1px solid hsla(0,0%,0%,.06); + border-radius: 6px; + background: var(--color-accent) linear-gradient(hsla(0,0%,100%,.85), hsla(0,0%,100%,.85)); +} +.demo-protip h2 { + margin: 0 0 .5rem 0; +} +.demo-protip strong { + font-weight: 600; +} + diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceCodePro-Regular.ttf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceCodePro-Regular.ttf new file mode 100644 index 0000000..85686d9 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceCodePro-Regular.ttf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Black.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Black.otf new file mode 100644 index 0000000..21cdb25 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Black.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-BlackIt.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-BlackIt.otf new file mode 100644 index 0000000..e284181 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-BlackIt.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Bold.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Bold.otf new file mode 100644 index 0000000..200e2bf Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Bold.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-BoldIt.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-BoldIt.otf new file mode 100644 index 0000000..6d149ee Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-BoldIt.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-ExtraLight.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-ExtraLight.otf new file mode 100644 index 0000000..0db4a3a Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-ExtraLight.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-ExtraLightIt.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-ExtraLightIt.otf new file mode 100644 index 0000000..ce0b268 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-ExtraLightIt.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-It.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-It.otf new file mode 100644 index 0000000..e93d6e4 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-It.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Light.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Light.otf new file mode 100644 index 0000000..87e9fd8 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Light.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-LightIt.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-LightIt.otf new file mode 100644 index 0000000..5ba79c1 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-LightIt.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Regular.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Regular.otf new file mode 100644 index 0000000..ee2f16d Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Regular.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Semibold.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Semibold.otf new file mode 100644 index 0000000..5d49658 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-Semibold.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-SemiboldIt.otf b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-SemiboldIt.otf new file mode 100644 index 0000000..68bfb4b Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/css/fonts/SourceSansPro-SemiboldIt.otf differ diff --git a/ElectronNET.WebApp/wwwroot/assets/css/github.css b/ElectronNET.WebApp/wwwroot/assets/css/github.css new file mode 100644 index 0000000..791932b --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/github.css @@ -0,0 +1,99 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008080; +} + +.hljs-string, +.hljs-doctag { + color: #d14; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #900; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-link { + color: #009926; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/ElectronNET.WebApp/wwwroot/assets/css/global.css b/ElectronNET.WebApp/wwwroot/assets/css/global.css new file mode 100644 index 0000000..b9d96fc --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/global.css @@ -0,0 +1,164 @@ +/* Fonts ---------------------------- */ + +@font-face { + font-family: 'Source Code Pro'; + font-style: normal; + font-weight: 400; + src: local('Source Code Pro'), local('SourceCodePro'), url(fonts/SourceCodePro-Regular.ttf) format('truetype'); +} + + +/* Global ---------------------------- */ + +* { + box-sizing: border-box; +} + +html { + height: 100%; + font-family: 'BlinkMacSystemFont', 'Lucida Grande', 'Segoe UI', Ubuntu, Cantarell, sans-serif; + font-size: 14px; + line-height: 1.5; + overflow: hidden; /* Prevents rubber-band scrolling of the whole "page" */ + color: var(--color); + background-color: #fff; /* To cover OSes with no default background color */ +} + +body { + margin: 0; + height: 100%; + display: flex; +} + +a { + color: var(--color-link); +} + +h1, +h2, +h3 { + margin-top: 0; + line-height: 1.5; +} + +h1 { + font-size: 1.5em; + font-weight: 600; +} + +h2 { + font-size: 1.3em; + font-weight: normal; +} + +h3 { + font-size: 1.12em; + font-weight: 600; +} + +table { + width: 100%; + border-spacing: 0; + border: 1px solid hsla(0,0%,0%,.08); + border-width: 0 1px 1px 0; +} +th { + background-color: hsla(0,0%,50%,.06); +} +th, +td { + text-align: center; + border: 1px solid hsla(0,0%,0%,.08); + border-width: 1px 0 0 1px; +} + +svg { + fill: currentColor; +} + +/* Code */ + +code, kbd { + font-family: 'Source Code Pro', monospace; + border-radius: 4px; + padding: 1px 4px; + white-space: nowrap; + color: hsl(0,0%,36%); + background-color: hsla(0,0%,60%,.15); +} + +pre, kbd { + font-size: 13px; + overflow: auto; + padding: 1em; + margin: 0; + border-radius: 4px; + border: 1px solid; + border-color: var(--color-border); + background-color: white; +} + +pre code { + white-space: pre; +} + +pre > .hljs { + color: var(--color-subtle); + background-color: white; +} + +kbd { + padding: 0.5em; +} + + +/* Utilities ---------------------------- */ + +.u-avoid-clicks { + pointer-events: none; +} + +/* Visually hidden, but will be read by screen readers */ +.u-visible-to-screen-reader { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} + +.no-display { + display: none; +} + + +/* Content ------------------ */ + +.content { + flex: 1; + position: relative; + overflow: hidden; + visibility: hidden; + opacity: 0; +} +.content.is-shown { + visibility: visible;; + opacity: 1; +} + + +/* Hacks ---------------------------- */ + +/* Fixes horizontal scrolling in code blocks on OS X El Cap (10.11.3), retina screen + * + * By adding an invisible outline property, it will force a repaint + * which enables the scrolling. + */ + +.hljs:hover, +.hljs:active { + outline: 1px solid transparent; +} diff --git a/ElectronNET.WebApp/wwwroot/assets/css/highlight.min.css b/ElectronNET.WebApp/wwwroot/assets/css/highlight.min.css new file mode 100644 index 0000000..7d8be18 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/highlight.min.css @@ -0,0 +1 @@ +.hljs{display:block;overflow-x:auto;padding:0.5em;background:#F0F0F0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888888}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:#880000}.hljs-title,.hljs-section{color:#880000;font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-addition{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} \ No newline at end of file diff --git a/ElectronNET.WebApp/wwwroot/assets/css/nativize.css b/ElectronNET.WebApp/wwwroot/assets/css/nativize.css new file mode 100644 index 0000000..1942953 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/nativize.css @@ -0,0 +1,59 @@ +/* +** nativize.css +** Makes the UI feel more native +*/ + +html { + font-family: sans-serif; + -webkit-user-select: none; /* disable selection */ + -webkit-user-drag: none; /* disable dragging */ + cursor: default; /* use default cursor */ +} + +body { + margin: 0; /* remove default margin */ +} + + +/* enable text selection */ + +.is-selectable, +pre, +code { + -webkit-user-select: auto; + cursor: auto; +} + + +/* Buttons and links */ + +button{ + cursor: default; +} + +/* Internal links */ +a { + cursor: pointer; + text-decoration: none; + border-bottom: 1px dashed; + outline: none; +} + +/* New window (target) + external links */ +a[target], +a[href^="https://"], +a[href^="http://"] { + border-bottom: 1px solid; +} + +a:hover, +a:focus { + border-bottom: none; +} + + +/* Images */ + +img { + -webkit-user-drag: none; /* disable dragging */ +} diff --git a/ElectronNET.WebApp/wwwroot/assets/css/nav.css b/ElectronNET.WebApp/wwwroot/assets/css/nav.css new file mode 100644 index 0000000..4c371d4 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/nav.css @@ -0,0 +1,149 @@ +/* Nav */ + +.nav { + width: 340px; + overflow-x: hidden; + overflow-y: auto; + color: var(--color-subtle); + border-right: 1px solid var(--color-border); + background-color: var(--color-bg); + visibility: hidden; + opacity: 0; +} +.nav.is-shown { + visibility: visible;; + opacity: 1; +} + +.nav-header { + position: relative; + padding: 2rem; + margin-bottom: 1rem; + border-bottom: 1px solid var(--color-border); +} + +.nav-title { + text-transform: uppercase; + font-weight: 300; + line-height: 1; + margin: 0; +} + +.nav-title strong { + font-weight: 600; + color: var(--color-strong); +} + +.nav-header-icon { + position: absolute; + width: 36px; + height: 36px; + top: 1.5rem; /* magic */ + right: 1.75rem; /* magic */ +} + + + +.nav-item { + padding: .5em 0; +} + +.nav-icon { + width: 16px; + height: 16px; + vertical-align: top; + margin-right: .25rem; +} + +.nav-category { + margin: .2em 0; + padding-left: 2rem; + font-size: 11px; + font-weight: normal; + text-transform: uppercase; +} + +.nav-button { + display: block; + width: 100%; + padding: .3rem; + padding-left: calc(2rem + 16px + .5rem); /* padding + icon + magic */ + line-height: 2; + text-align: left; + font: inherit; + font-size: 13px; + color: inherit; + border: none; + background-color: transparent; + cursor: default; + outline: none; +} +.nav-button:hover, +.nav-button:focus:not(.is-selected) { + background-color: hsla(0,0%,0%,.1); +} +.nav-button.is-selected { + background-color: var(--color-accent); +} +.nav-button.is-selected, +.nav-button.is-selected em { + color: #fff; +} +.nav-button.is-selected:focus { + opacity: .8; +} + +.nav-button em { + font-style: normal; + font-weight: 600; + color: var(--color-strong); + pointer-events: none; /* makes it invisible to clicks */ +} + +.nav-footer { + margin-top: 1rem; + padding: 2rem; + border-top: 1px solid var(--color-border); + text-align: center; +} + +.nav-footer-icon { + width: calc(770px / 6.5); + height: calc(88px / 6.5); +} + +.nav-footer a { + outline: none; +} + +.nav-footer-button { + display: block; + width: 100%; + padding: 0; + margin-bottom: .75rem; + line-height: 2; + text-align: left; + font: inherit; + font-size: 13px; + color: inherit; + border: none; + background-color: transparent; + cursor: default; + outline: none; + text-align: center; +} +.nav-footer-button:focus { + color: var(--color-strong); +} + +.nav-footer-logo { + color: hsl(0,0%,66%); +} +.nav-footer-logo:focus { + color: hsl(0,0%,33%); +} + +/* Remove border on the logo */ +.nav-footer-logo.nav-footer-logo { + border-bottom: none; +} diff --git a/ElectronNET.WebApp/wwwroot/assets/css/print.css b/ElectronNET.WebApp/wwwroot/assets/css/print.css new file mode 100644 index 0000000..13c2d1b --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/print.css @@ -0,0 +1,31 @@ +@media print { + body { + background: none; + color: black !important; + font-size: 70%; + margin: 0; padding: 0; + } + + h1 { + font-size: 22px; + } + + .nav, button, .demo-box:before, + #pdf-path, header p { + display: none; + } + + .demo-box, h2, + pre, code { + padding: 0 !important; + margin: 0 !important; + } + + header { + padding: 0 0 10px 0; + } + + code, .support { + font-size: 10px; + } +} diff --git a/ElectronNET.WebApp/wwwroot/assets/css/section.css b/ElectronNET.WebApp/wwwroot/assets/css/section.css new file mode 100644 index 0000000..90f4407 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/section.css @@ -0,0 +1,51 @@ +/* Section ------------------ */ + +.section { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow-x: hidden; + overflow-y: auto; + color: var(--color-accent); + + /* Hide */ + pointer-events: none; + visibility: hidden; + opacity: 0; + transform: translateX(-20px); + transition: visibility 0s .12s linear , opacity .12s ease-in, transform .12s ease-in; +} +.section.is-shown { + pointer-events: auto; + visibility: visible; + opacity: 1; + transform: translateX(0); + transition: visibility 0s 0s linear , opacity .36s ease-out, transform .36s ease-out; +} + +.section h3, +.section p { + color: var(--color); +} + +.section-wrapper { + position: relative; + max-width: 740px; + margin: 0 auto; + padding: 2rem 2rem 1rem 2rem; + border-bottom: 1px solid var(--color-border); +} +@media (min-width: 940px) { + .section-wrapper { + padding-top: 4rem; + } +} + +.section-icon { + width: 32px; + height: 32px; + vertical-align: middle; + margin-right: .5em; +} diff --git a/ElectronNET.WebApp/wwwroot/assets/css/variables.css b/ElectronNET.WebApp/wwwroot/assets/css/variables.css new file mode 100644 index 0000000..3f20970 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/css/variables.css @@ -0,0 +1,24 @@ + +/* Custom Properties */ + +:root { + --color: hsl(0,0%,22%); + --color-subtle: hsl(0,0%,44%); + --color-strong: hsl(0,0%,11%); + --color-link: hsl(0,0%,22%); + + --color-border: hsl(0,0%,88%); + --color-bg: hsl(0,0%,96%); + + --color-accent: black; /* Fallback */ +} + + +/* Category Colors */ + +.u-category-windows { --color-accent: hsl(116, 30%, 36%); } +.u-category-menu { --color-accent: hsl(194, 60%, 36%); } +.u-category-native-ui { --color-accent: hsl(222, 53%, 50%); } +.u-category-communication { --color-accent: hsl(285, 47%, 46%); } +.u-category-system { --color-accent: hsl(330, 65%, 48%); } +.u-category-media { --color-accent: hsl( 36, 77%, 34%); } diff --git a/ElectronNET.WebApp/wwwroot/assets/demo-btns.js b/ElectronNET.WebApp/wwwroot/assets/demo-btns.js new file mode 100644 index 0000000..d3a2201 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/demo-btns.js @@ -0,0 +1,11 @@ +const demoBtns = document.querySelectorAll('.js-container-target'); + +// Listen for demo button clicks +Array.prototype.forEach.call(demoBtns, function (btn) { + btn.addEventListener('click', function (event) { + const parent = event.target.parentElement; + + // Toggles the "is-open" class on the demo's parent element. + parent.classList.toggle('is-open'); + }) +}) diff --git a/ElectronNET.WebApp/wwwroot/assets/ex-links.js b/ElectronNET.WebApp/wwwroot/assets/ex-links.js new file mode 100644 index 0000000..c898a8b --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/ex-links.js @@ -0,0 +1,14 @@ +(function () { + const shell = require('electron').shell + const links = document.querySelectorAll('a[href]') + + Array.prototype.forEach.call(links, function (link) { + const url = link.getAttribute('href') + if (url.indexOf('http') === 0) { + link.addEventListener('click', function (e) { + e.preventDefault() + shell.openExternal(url) + }) + } + }) +}) diff --git a/ElectronNET.WebApp/wwwroot/assets/highlight.min.js b/ElectronNET.WebApp/wwwroot/assets/highlight.min.js new file mode 100644 index 0000000..f30a334 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/highlight.min.js @@ -0,0 +1,3 @@ +/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */ +!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/&/g,"&").replace(//g,">")}function r(e){return e.nodeName.toLowerCase()}function a(e,t){var r=e&&e.exec(t);return r&&0===r.index}function n(e){return E.test(e)}function i(e){var t,r,a,i,s=e.className+" ";if(s+=e.parentNode?e.parentNode.className:"",r=M.exec(s))return w(r[1])?r[1]:"no-highlight";for(s=s.split(/\s+/),t=0,a=s.length;a>t;t++)if(i=s[t],n(i)||w(i))return i}function s(e){var t,r={},a=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return a.forEach(function(e){for(t in e)r[t]=e[t]}),r}function c(e){var t=[];return function a(e,n){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?n+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:n,node:i}),n=a(i,n),r(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:n,node:i}));return n}(e,0),t}function o(e,a,n){function i(){return e.length&&a.length?e[0].offset!==a[0].offset?e[0].offset"}function c(e){u+=""}function o(e){("start"===e.event?s:c)(e.node)}for(var l=0,u="",d=[];e.length||a.length;){var b=i();if(u+=t(n.substring(l,b[0].offset)),l=b[0].offset,b===e){d.reverse().forEach(c);do o(b.splice(0,1)[0]),b=i();while(b===e&&b.length&&b[0].offset===l);d.reverse().forEach(s)}else"start"===b[0].event?d.push(b[0].node):d.pop(),o(b.splice(0,1)[0])}return u+t(n.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(t){return s(e,{v:null},t)})),e.cached_variants||e.eW&&[s(e)]||[e]}function u(e){function t(e){return e&&e.source||e}function r(r,a){return new RegExp(t(r),"m"+(e.cI?"i":"")+(a?"g":""))}function a(n,i){if(!n.compiled){if(n.compiled=!0,n.k=n.k||n.bK,n.k){var s={},c=function(t,r){e.cI&&(r=r.toLowerCase()),r.split(" ").forEach(function(e){var r=e.split("|");s[r[0]]=[t,r[1]?Number(r[1]):1]})};"string"==typeof n.k?c("keyword",n.k):k(n.k).forEach(function(e){c(e,n.k[e])}),n.k=s}n.lR=r(n.l||/\w+/,!0),i&&(n.bK&&(n.b="\\b("+n.bK.split(" ").join("|")+")\\b"),n.b||(n.b=/\B|\b/),n.bR=r(n.b),n.e||n.eW||(n.e=/\B|\b/),n.e&&(n.eR=r(n.e)),n.tE=t(n.e)||"",n.eW&&i.tE&&(n.tE+=(n.e?"|":"")+i.tE)),n.i&&(n.iR=r(n.i)),null==n.r&&(n.r=1),n.c||(n.c=[]),n.c=Array.prototype.concat.apply([],n.c.map(function(e){return l("self"===e?n:e)})),n.c.forEach(function(e){a(e,n)}),n.starts&&a(n.starts,i);var o=n.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([n.tE,n.i]).map(t).filter(Boolean);n.t=o.length?r(o.join("|"),!0):{exec:function(){return null}}}}a(e)}function d(e,r,n,i){function s(e,t){var r,n;for(r=0,n=t.c.length;n>r;r++)if(a(t.c[r].bR,e))return t.c[r]}function c(e,t){if(a(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?c(e.parent,t):void 0}function o(e,t){return!n&&a(t.iR,e)}function l(e,t){var r=v.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function p(e,t,r,a){var n=a?"":L.classPrefix,i='',i+t+s}function m(){var e,r,a,n;if(!N.k)return t(E);for(n="",r=0,N.lR.lastIndex=0,a=N.lR.exec(E);a;)n+=t(E.substring(r,a.index)),e=l(N,a),e?(M+=e[1],n+=p(e[0],t(a[0]))):n+=t(a[0]),r=N.lR.lastIndex,a=N.lR.exec(E);return n+t(E.substr(r))}function f(){var e="string"==typeof N.sL;if(e&&!x[N.sL])return t(E);var r=e?d(N.sL,E,!0,k[N.sL]):b(E,N.sL.length?N.sL:void 0);return N.r>0&&(M+=r.r),e&&(k[N.sL]=r.top),p(r.language,r.value,!1,!0)}function g(){C+=null!=N.sL?f():m(),E=""}function _(e){C+=e.cN?p(e.cN,"",!0):"",N=Object.create(e,{parent:{value:N}})}function h(e,t){if(E+=e,null==t)return g(),0;var r=s(t,N);if(r)return r.skip?E+=t:(r.eB&&(E+=t),g(),r.rB||r.eB||(E=t)),_(r,t),r.rB?0:t.length;var a=c(N,t);if(a){var n=N;n.skip?E+=t:(n.rE||n.eE||(E+=t),g(),n.eE&&(E=t));do N.cN&&(C+=R),N.skip||(M+=N.r),N=N.parent;while(N!==a.parent);return a.starts&&_(a.starts,""),n.rE?0:t.length}if(o(t,N))throw new Error('Illegal lexeme "'+t+'" for mode "'+(N.cN||"")+'"');return E+=t,t.length||1}var v=w(e);if(!v)throw new Error('Unknown language: "'+e+'"');u(v);var y,N=i||v,k={},C="";for(y=N;y!==v;y=y.parent)y.cN&&(C=p(y.cN,"",!0)+C);var E="",M=0;try{for(var B,S,$=0;;){if(N.t.lastIndex=$,B=N.t.exec(r),!B)break;S=h(r.substring($,B.index),B[0]),$=B.index+S}for(h(r.substr($)),y=N;y.parent;y=y.parent)y.cN&&(C+=R);return{r:M,value:C,language:e,top:N}}catch(A){if(A.message&&-1!==A.message.indexOf("Illegal"))return{r:0,value:t(r)};throw A}}function b(e,r){r=r||L.languages||k(x);var a={r:0,value:t(e)},n=a;return r.filter(w).forEach(function(t){var r=d(t,e,!1);r.language=t,r.r>n.r&&(n=r),r.r>a.r&&(n=a,a=r)}),n.language&&(a.second_best=n),a}function p(e){return L.tabReplace||L.useBR?e.replace(B,function(e,t){return L.useBR&&"\n"===e?"
":L.tabReplace?t.replace(/\t/g,L.tabReplace):""}):e}function m(e,t,r){var a=t?C[t]:r,n=[e.trim()];return e.match(/\bhljs\b/)||n.push("hljs"),-1===e.indexOf(a)&&n.push(a),n.join(" ").trim()}function f(e){var t,r,a,s,l,u=i(e);n(u)||(L.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e,l=t.textContent,a=u?d(u,l,!0):b(l),r=c(t),r.length&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","div"),s.innerHTML=a.value,a.value=o(r,c(s),l)),a.value=p(a.value),e.innerHTML=a.value,e.className=m(e.className,u,a.language),e.result={language:a.language,re:a.r},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.r}))}function g(e){L=s(L,e)}function _(){if(!_.called){_.called=!0;var e=document.querySelectorAll("pre code");N.forEach.call(e,f)}}function h(){addEventListener("DOMContentLoaded",_,!1),addEventListener("load",_,!1)}function v(t,r){var a=x[t]=r(e);a.aliases&&a.aliases.forEach(function(e){C[e]=t})}function y(){return k(x)}function w(e){return e=(e||"").toLowerCase(),x[e]||x[C[e]]}var N=[],k=Object.keys,x={},C={},E=/^(no-?highlight|plain|text)$/i,M=/\blang(?:uage)?-([\w-]+)\b/i,B=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,R="
",L={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=d,e.highlightAuto=b,e.fixMarkup=p,e.highlightBlock=f,e.configure=g,e.initHighlighting=_,e.initHighlightingOnLoad=h,e.registerLanguage=v,e.listLanguages=y,e.getLanguage=w,e.inherit=s,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(t,r,a){var n=e.inherit({cN:"comment",b:t,e:r,c:[]},a||{});return n.c.push(e.PWM),n.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),n},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),e.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},r={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,r,a,t]}}),e.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},r="[A-Za-z$_][0-9A-Za-z$_]*",a={cN:"subst",b:/#\{/,e:/}/,k:t},n=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,a]},{b:/"/,e:/"/,c:[e.BE,a]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[a,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+r},{sL:"javascript",eB:!0,eE:!0,v:[{b:"```",e:"```"},{b:"`",e:"`"}]}];a.c=n;var i=e.inherit(e.TM,{b:r}),s="(\\(.*\\))?\\s*\\B[-=]>",c={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(n)}]};return{aliases:["coffee","cson","iced"],k:t,i:/\/\*/,c:n.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+r+"\\s*=\\s*"+s,e:"[-=]>",rB:!0,c:[i,c]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:s,e:"[-=]>",rB:!0,c:[c]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:r+":",e:":",rB:!0,rE:!0,r:0}])}}),e.registerLanguage("cpp",function(e){var t={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[e.BE]},{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},a={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},n={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},e.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},e.CLCM,e.CBCM]},i=e.IR+"\\s*\\(",s={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},c=[t,e.CLCM,e.CBCM,a,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:s,i:"",k:s,c:["self",t]},{b:e.IR+"::",k:s},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:s,c:c.concat([{b:/\(/,e:/\)/,k:s,c:c.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+e.IR+"[\\*&\\s]+)+"+i,rB:!0,e:/[{;=]/,eE:!0,k:s,i:/[^\w\s\*&]/,c:[{b:i,rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:s,r:0,c:[e.CLCM,e.CBCM,r,a,t]},e.CLCM,e.CBCM,n]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},e.TM]}]),exports:{preprocessor:n,strings:r,k:s}}}),e.registerLanguage("cs",function(e){var t={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},a=e.inherit(r,{i:/\n/}),n={cN:"subst",b:"{",e:"}",k:t},i=e.inherit(n,{i:/\n/}),s={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,i]},c={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},n]},o=e.inherit(c,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},i]});n.c=[c,s,r,e.ASM,e.QSM,e.CNM,e.CBCM],i.c=[o,s,a,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[c,s,r,e.ASM,e.QSM]},u=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:t,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+u+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}}),e.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:t,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,r]}]}}),e.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}}),e.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}}),e.registerLanguage("ini",function(e){var t={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},t,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}}),e.registerLanguage("java",function(e){var t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=t+"(<"+t+"(\\s*,\\s*"+t+")*>)?",a="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",n="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",i={cN:"number",b:n,r:0};return{aliases:["jsp"],k:a,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+r+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:a,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},i,{cN:"meta",b:"@[A-Za-z]+"}]}}),e.registerLanguage("javascript",function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",r={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:r,c:[]},i={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,i,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:r,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,i,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:t+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:t,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+t+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:t},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:t}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}}),e.registerLanguage("json",function(e){var t={literal:"true false null"},r=[e.QSM,e.CNM],a={e:",",eW:!0,eE:!0,c:r,k:t},n={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(a,{b:/:/})],i:"\\S"},i={b:"\\[",e:"\\]",c:[e.inherit(a)],i:"\\S"};return r.splice(r.length,0,n,i),{c:r,k:t,i:"\\S"}}),e.registerLanguage("makefile",function(e){var t={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},e.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[r],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[r],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}}),e.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}}),e.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},r={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[t]},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:r}],r:0}],i:"[^\\s\\}]"}}),e.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:r,l:a,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:a,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}}),e.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},a={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],s=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),a,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=s,a.c=s,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:s}}),e.registerLanguage("php",function(e){var t={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r={cN:"meta",b:/<\?(php)?|\?>/},a={cN:"string",c:[e.BE,r],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[r]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},r,{cN:"keyword",b:/\$this\b/},t,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBCM,a,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},a,n]}}),e.registerLanguage("python",function(e){var t={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},r={cN:"meta",b:/^(>>>|\.\.\.) /},a={cN:"subst",b:/\{/,e:/\}/,k:t,i:/#/},n={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[r,a]},{b:/(fr|rf|f)"""/,e:/"""/,c:[r,a]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[a]},{b:/(fr|rf|f)"/,e:/"/,c:[a]},e.ASM,e.QSM]},i={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},s={cN:"params",b:/\(/,e:/\)/,c:["self",r,i,n]};return a.c=[n,i,r],{aliases:["py","gyp"],k:t,i:/(<\/|->|\?)|=>/,c:[r,i,n,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,s,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}}),e.registerLanguage("ruby",function(e){ +var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},a={cN:"doctag",b:"@[A-Za-z]+"},n={b:"#<",e:">"},i=[e.C("#","$",{c:[a]}),e.C("^\\=begin","^\\=end",{c:[a],r:10}),e.C("^__END__","\\n$")],s={cN:"subst",b:"#\\{",e:"}",k:r},c={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},o={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},l=[c,n,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(i)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:t}),o].concat(i)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[c,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[n,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(i),r:0}].concat(i);s.c=l,o.c=l;var u="[>?]>",d="[\\w#]+\\(\\w+\\):\\d+:\\d+>",b="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{b:/^\s*=>/,starts:{e:"$",c:l}},{cN:"meta",b:"^("+u+"|"+d+"|"+b+")",starts:{e:"$",c:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:i.concat(p).concat(l)}}),e.registerLanguage("shell",function(e){return{aliases:["console"],c:[{cN:"meta",b:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{e:"$",sL:"bash"}}]}}),e.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}}),e}); \ No newline at end of file diff --git a/ElectronNET.WebApp/wwwroot/assets/img/about.png b/ElectronNET.WebApp/wwwroot/assets/img/about.png new file mode 100644 index 0000000..f7301a6 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/img/about.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/img/about@2x.png b/ElectronNET.WebApp/wwwroot/assets/img/about@2x.png new file mode 100644 index 0000000..b67f43c Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/img/about@2x.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/img/diagram.png b/ElectronNET.WebApp/wwwroot/assets/img/diagram.png new file mode 100644 index 0000000..ea4e64b Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/img/diagram.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/img/heart.jpg b/ElectronNET.WebApp/wwwroot/assets/img/heart.jpg new file mode 100644 index 0000000..fb25a53 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/img/heart.jpg differ diff --git a/ElectronNET.WebApp/wwwroot/assets/img/icons.svg b/ElectronNET.WebApp/wwwroot/assets/img/icons.svg new file mode 100644 index 0000000..d1a2c5f --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/img/icons.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ElectronNET.WebApp/wwwroot/assets/img/loading.gif b/ElectronNET.WebApp/wwwroot/assets/img/loading.gif new file mode 100644 index 0000000..dec47d8 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/img/loading.gif differ diff --git a/ElectronNET.WebApp/wwwroot/assets/img/programming.png b/ElectronNET.WebApp/wwwroot/assets/img/programming.png new file mode 100644 index 0000000..c68fdb6 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/img/programming.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/img/ui-terminology.png b/ElectronNET.WebApp/wwwroot/assets/img/ui-terminology.png new file mode 100644 index 0000000..4a10f9a Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/img/ui-terminology.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/imports.js b/ElectronNET.WebApp/wwwroot/assets/imports.js new file mode 100644 index 0000000..1c5a703 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/imports.js @@ -0,0 +1,12 @@ +const links = document.querySelectorAll('link[rel="import"]') + +// Import and add each page to the DOM +Array.prototype.forEach.call(links, function (link) { + let template = link.import.querySelector('.task-template') + let clone = document.importNode(template.content, true) + if (link.href.match('about.html')) { + document.querySelector('body').appendChild(clone) + } else { + document.querySelector('.content').appendChild(clone) + } +}) diff --git a/ElectronNET.WebApp/wwwroot/assets/mac/child.plist b/ElectronNET.WebApp/wwwroot/assets/mac/child.plist new file mode 100644 index 0000000..d8dc69e --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/mac/child.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.inherit + + + diff --git a/ElectronNET.WebApp/wwwroot/assets/mac/info.plist b/ElectronNET.WebApp/wwwroot/assets/mac/info.plist new file mode 100644 index 0000000..626f204 --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/mac/info.plist @@ -0,0 +1,19 @@ + + + + + CFBundleURLTypes + + + CFBundleURLSchemes + + electron-api-demos + + CFBundleURLName + Electron API Demos Protocol + + + ElectronTeamID + VEKTX9H2N7 + + diff --git a/ElectronNET.WebApp/wwwroot/assets/mac/parent.plist b/ElectronNET.WebApp/wwwroot/assets/mac/parent.plist new file mode 100644 index 0000000..0553a4b --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/mac/parent.plist @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.application-groups + VEKTX9H2N7.com.github.electron-api-demos + com.apple.security.files.user-selected.read-write + + + diff --git a/ElectronNET.WebApp/wwwroot/assets/nav.js b/ElectronNET.WebApp/wwwroot/assets/nav.js new file mode 100644 index 0000000..64bb05d --- /dev/null +++ b/ElectronNET.WebApp/wwwroot/assets/nav.js @@ -0,0 +1,78 @@ +document.body.addEventListener('click', function (event) { + if (event.target.dataset.section) { + handleSectionTrigger(event) + } else if (event.target.dataset.modal) { + handleModalTrigger(event) + } else if (event.target.classList.contains('modal-hide')) { + hideAllModals() + } +}); + +function handleSectionTrigger(event) { + hideAllSectionsAndDeselectButtons(); + + // Highlight clicked button and show view + event.target.classList.add('is-selected'); + + // Display the current section + const sectionId = event.target.dataset.section + '-section' + document.getElementById(sectionId).classList.add('is-shown'); +} + +function activateDefaultSection () { + document.getElementById('button-windows').click() +} + +function showMainContent() { + showNav(); + document.querySelector('.js-content').classList.add('is-shown'); +} + +function handleModalTrigger(event) { + hideAllModals(); + const modalId = event.target.dataset.modal + '-modal'; + + if (modalId === 'about-modal') { + hideNav(); + } + + document.getElementById(modalId).classList.add('is-shown'); +} + +function hideAllModals () { + const modals = document.querySelectorAll('.modal.is-shown') + Array.prototype.forEach.call(modals, function (modal) { + modal.classList.remove('is-shown') + }) + showMainContent() +} + +function hideAllSectionsAndDeselectButtons () { + const sections = document.querySelectorAll('.js-section.is-shown') + Array.prototype.forEach.call(sections, function (section) { + section.classList.remove('is-shown') + }) + + const buttons = document.querySelectorAll('.nav-button.is-selected') + Array.prototype.forEach.call(buttons, function (button) { + button.classList.remove('is-selected') + }) +} + +function displayAbout() { + hideNav(); + document.querySelector('#about-modal').classList.add('is-shown') +} + +function hideNav() { + document.querySelector('.js-nav').classList.remove('is-shown'); + document.querySelector('.js-nav').style.display = 'none'; +} + +function showNav() { + document.querySelector('.js-nav').style.display = null; + document.querySelector('.js-nav').classList.add('is-shown'); +} + +activateDefaultSection(); +displayAbout(); diff --git a/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.150x150.png b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.150x150.png new file mode 100644 index 0000000..bb99d9b Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.150x150.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.310x150.png b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.310x150.png new file mode 100644 index 0000000..fdf4109 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.310x150.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.44x44.png b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.44x44.png new file mode 100644 index 0000000..43e2d2f Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.44x44.png differ diff --git a/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.50x50.png b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.50x50.png new file mode 100644 index 0000000..839fcf3 Binary files /dev/null and b/ElectronNET.WebApp/wwwroot/assets/tiles/SampleAppx.50x50.png differ diff --git a/README.md b/README.md index 96558ae..f90357d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ [![Electron.NET Logo](https://github.com/GregorBiswanger/Electron.NET/blob/master/assets/images/electron.net-logo.png)](https://github.com/GregorBiswanger/Electron.NET) -Master: [![Build status](https://ci.appveyor.com/api/projects/status/u710d6hman5a4beb/branch/master?svg=true)](https://ci.appveyor.com/project/robertmuehsig/electron-net/branch/master) -Build cross platform desktop apps with .NET Core and ASP.NET NET Core. +AppVeyor (Win/Linux): [![Build status](https://ci.appveyor.com/api/projects/status/q95h4xt14papwi05/branch/master?svg=true)](https://ci.appveyor.com/project/robertmuehsig/electron-net/branch/master) + +Travis-CI (Win/OSX/Linux): [![Build Status](https://travis-ci.org/ElectronNET/Electron.NET.svg?branch=master)](https://travis-ci.org/ElectronNET/Electron.NET) + +Build cross platform desktop apps with .NET Core 2.0 and ASP.NET NET Core. # Usage: @@ -117,33 +120,18 @@ The end result should be an electron app under your __/bin/desktop__ folder. ### Note > An OS X App can only be built on a host OS X platform. -## Dev Notes: +# Contributing +Feel free to submit a pull request if you find any bugs (to see a list of active issues, visit the [Issues section](https://github.com/ElectronNET/Electron.NET/issues). +Please make sure all commits are properly documented. -Currently there are two main projects and a "WebApp" that serves as a demo playground. +# Authors -* ElectronNET.API: Defines the Electron / .NET API bridge -* ElectronNET.CLI: Responsible for the dotnet "electronize" tooling. +* **Gregor Biswanger** - (Microsoft MVP, Intel Black Belt and Intel Software Innovator) is a freelance lecturer, consultant, trainer, author and speaker. He is a consultant for large and medium-sized companies, organizations and agencies for software architecture, web- and cross-platform development. You can find Gregor often on the road attending or speaking at international conferences. - [Cross-Platform-Blog](http://www.cross-platform-blog.com) - Twitter [@BFreakout](https://www.twitter.com/BFreakout) +* **Robert Muehsig** - Software Developer - from Dresden, Germany, now living & working in Switzerland. Microsoft MVP & Web Geek. - [codeinside Blog](https://blog.codeinside.eu) - Twitter [@robert0muehsig](https://twitter.com/robert0muehsig) + +See also the list of [contributors](https://github.com/ElectronNET/Electron.NET/graphs/contributors) who participated in this project. + +# License +MIT-licensed -Both projects create their own nuget package. The resulting nuget packages are saved under "/artifacts". - -__Currently__ the packages are just build with version 1.0.0 on your machine. NuGet might pick the wrong version from its own cache, so please read the dev notes if you want to develop! - -__ElectronNET.WebApp:__ - -The WebApp now has referenced the API NuGet package and via the .csproj reference the CLI: - - - - - - - -# Dev Notes: Dev Workflow - -(at least for the CLI extension) - -* Change something in the CLI project -* rebuild the project (a nuget package should now appear in the /artifacts directory) -* make sure there is no ElectronNET.CLI package in your %userprofile%\.nuget\packages cache with the same version -* execute dotnet restore in the WebApp -* execute dotnet electronize +**Enjoy!** diff --git a/appveyor.yml b/appveyor.yml index de58500..5cb7009 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,8 @@ version: 1.0.{build} image: Visual Studio 2017 build_script: - cmd: buildAll.cmd +pull_requests: + do_not_increment_build_number: true artifacts: - path: ElectronNET.WebApp\bin\desktop name: Desktop diff --git a/buildAll.cmd b/buildAll.cmd index fed72d4..4161dd7 100755 --- a/buildAll.cmd +++ b/buildAll.cmd @@ -21,5 +21,6 @@ dotnet electronize build win echo "-- linux" dotnet electronize build linux -#echo "-- osx" -#dotnet electronize build osx +REM Not supported on Windows Systems, because of SymLinks... +REM echo "-- osx" +REM dotnet electronize build osx