implement enum for types, implement OpenDialog from Dialog-API

This commit is contained in:
Gregor Biswanger
2017-10-17 05:12:35 +02:00
parent 2bace2d215
commit b28fa9465a
31 changed files with 527 additions and 38 deletions

View File

@@ -1,4 +1,6 @@
using ElectronNET.API.Entities;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace ElectronNET.API
{
@@ -7,16 +9,17 @@ namespace ElectronNET.API
/// <summary>
/// Must be set if type is custom, otherwise it should be omitted.
/// </summary>
public string Name { get; set; } = string.Empty;
public string Name { get; set; }
/// <summary>
/// Array of objects if type is tasks or custom, otherwise it should be omitted.
/// </summary>
public JumpListItem[] Items { get; set; } = new JumpListItem[0];
public JumpListItem[] Items { get; set; }
/// <summary>
/// One of the following: "tasks" | "frequent" | "recent" | "custom"
/// </summary>
public string Type { get; set; } = "tasks";
[JsonConverter(typeof(StringEnumConverter))]
public JumpListCategoryType Type { get; set; }
}
}