write code documentation for App-API and IpcMain-API

This commit is contained in:
Gregor Biswanger
2017-10-14 14:41:11 +02:00
parent aa526c4bcb
commit 9848a38b0d
7 changed files with 564 additions and 42 deletions

View File

@@ -4,8 +4,19 @@ namespace ElectronNET.API
{
public class JumpListCategory
{
/// <summary>
/// Must be set if type is custom, otherwise it should be omitted.
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// Array of objects if type is tasks or custom, otherwise it should be omitted.
/// </summary>
public JumpListItem[] Items { get; set; } = new JumpListItem[0];
/// <summary>
/// One of the following: "tasks" | "frequent" | "recent" | "custom"
/// </summary>
public string Type { get; set; } = "tasks";
}
}

View File

@@ -2,13 +2,50 @@
{
public class JumpListItem
{
/// <summary>
/// The command line arguments when program is executed. Should only be set if type is task.
/// </summary>
public string Args { get; set; } = string.Empty;
/// <summary>
/// Description of the task (displayed in a tooltip). Should only be set if type is task.
/// </summary>
public string Description { get; set; } = string.Empty;
/// <summary>
/// The index of the icon in the resource file. If a resource file contains multiple
/// icons this value can be used to specify the zero-based index of the icon that
/// should be displayed for this task.If a resource file contains only one icon,
/// this property should be set to zero.
/// </summary>
public int IconIndex { get; set; } = 0;
/// <summary>
/// The absolute path to an icon to be displayed in a Jump List, which can be an
/// arbitrary resource file that contains an icon(e.g. .ico, .exe, .dll). You can
/// usually specify process.execPath to show the program icon.
/// </summary>
public string IconPath { get; set; } = string.Empty;
/// <summary>
/// Path of the file to open, should only be set if type is file.
/// </summary>
public string Path { get; set; } = string.Empty;
/// <summary>
/// Path of the program to execute, usually you should specify process.execPath
/// which opens the current program.Should only be set if type is task.
/// </summary>
public string Program { get; set; } = string.Empty;
/// <summary>
/// The text to be displayed for the item in the Jump List. Should only be set if type is task.
/// </summary>
public string Title { get; set; } = string.Empty;
/// <summary>
/// One of the following: "task" | "separator" | "file"
/// </summary>
public string Type {get; set; } = string.Empty;
}
}

View File

@@ -2,8 +2,14 @@
{
public class JumpListSettings
{
/// <summary>
/// The minimum number of items that will be shown in the Jump List (for a more detailed description of this value see the MSDN docs).
/// </summary>
public int MinItems { get; set; } = 0;
/// <summary>
/// Array of JumpListItem objects that correspond to items that the user has explicitly removed from custom categories in the Jump List. These items must not be re-added to the Jump List in the next call to app.setJumpList(), Windows will not display any custom category that contains any of the removed items.
/// </summary>
public JumpListItem[] RemovedItems { get; set; } = new JumpListItem[0];
}
}

View File

@@ -1,24 +1,76 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ElectronNET.API.Entities
namespace ElectronNET.API.Entities
{
public enum PathName
{
/// <summary>
/// Users home directory.
/// </summary>
home,
/// <summary>
/// Per-user application data directory.
/// </summary>
appData,
/// <summary>
/// The directory for storing your apps configuration files,
/// which by default it is the appData directory appended with your apps name.
/// </summary>
userData,
/// <summary>
/// Temporary directory.
/// </summary>
temp,
/// <summary>
/// The current executable file.
/// </summary>
exe,
/// <summary>
/// The libchromiumcontent library.
/// </summary>
module,
/// <summary>
/// The current users Desktop directory.
/// </summary>
desktop,
/// <summary>
/// Directory for a users “My Documents”.
/// </summary>
documents,
/// <summary>
/// Directory for a users downloads.
/// </summary>
downloads,
/// <summary>
/// Directory for a users music.
/// </summary>
music,
/// <summary>
/// Directory for a users pictures.
/// </summary>
pictures,
/// <summary>
/// Directory for a users videos.
/// </summary>
videos,
/// <summary>
///
/// </summary>
logs,
/// <summary>
/// Full path to the system version of the Pepper Flash plugin.
/// </summary>
pepperFlashSystemPlugin
}
}