2025-11-09 12:05:07 +01:00
using System.Text.Json.Serialization ;
2025-11-22 02:16:10 +01:00
using System.Runtime.Versioning ;
2017-10-17 05:12:35 +02:00
namespace ElectronNET.API.Entities
2017-10-14 00:06:58 +02:00
{
2017-10-24 21:43:27 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Jump List item used in app.setJumpList(categories) on Windows.
/// Matches Electron's JumpListItem structure.
2017-10-24 21:43:27 +02:00
/// </summary>
2025-11-22 02:16:10 +01:00
/// <remarks>Up-to-date with Electron API 39.2</remarks>
[SupportedOSPlatform("windows")]
2017-10-14 00:06:58 +02:00
public class JumpListItem
{
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the command line arguments when <c>program</c> is executed. Should only be set if <c>type</c> is <c>task</c>.
2017-10-14 14:41:11 +02:00
/// </summary>
2017-10-17 05:12:35 +02:00
public string Args { get ; set ; }
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the description of the task (displayed in a tooltip). Should only be set if <c>type</c> is <c>task</c>. Maximum length 260 characters.
2017-10-14 14:41:11 +02:00
/// </summary>
2017-10-17 05:12:35 +02:00
public string Description { get ; set ; }
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the index of the icon in the resource file. If a resource file contains multiple
2017-10-14 14:41:11 +02:00
/// icons this value can be used to specify the zero-based index of the icon that
2025-11-22 02:16:10 +01:00
/// should be displayed for this task. If a resource file contains only one icon,
2017-10-14 14:41:11 +02:00
/// this property should be set to zero.
/// </summary>
2017-10-17 05:12:35 +02:00
public int IconIndex { get ; set ; }
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the absolute path to an icon to be displayed in a Jump List, which can be an
2017-10-14 14:41:11 +02:00
/// arbitrary resource file that contains an icon(e.g. .ico, .exe, .dll). You can
/// usually specify process.execPath to show the program icon.
/// </summary>
2017-10-17 05:12:35 +02:00
public string IconPath { get ; set ; }
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the path of the file to open; should only be set if <c>type</c> is <c>file</c>.
2017-10-14 14:41:11 +02:00
/// </summary>
2017-10-17 05:12:35 +02:00
public string Path { get ; set ; }
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the path of the program to execute, usually specify process.execPath
/// which opens the current program. Should only be set if <c>type</c> is <c>task</c>.
2017-10-14 14:41:11 +02:00
/// </summary>
2017-10-17 05:12:35 +02:00
public string Program { get ; set ; }
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the text to be displayed for the item in the Jump List. Should only be set if <c>type</c> is <c>task</c>.
2017-10-14 14:41:11 +02:00
/// </summary>
2017-10-17 05:12:35 +02:00
public string Title { get ; set ; }
2017-10-14 14:41:11 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the item type. One of: <c>task</c> | <c>separator</c> | <c>file</c>.
2017-10-14 14:41:11 +02:00
/// </summary>
2017-10-17 05:12:35 +02:00
public JumpListItemType Type { get ; set ; }
2025-11-22 02:16:10 +01:00
/// <summary>
/// Gets or sets the working directory. Default is empty.
/// </summary>
public string WorkingDirectory { get ; set ; }
2017-10-14 00:06:58 +02:00
}
2025-11-15 08:05:31 +01:00
}