2025-11-09 12:05:07 +01:00
|
|
|
using System.Text.Json.Serialization;
|
2017-10-17 05:12:35 +02:00
|
|
|
|
|
|
|
|
namespace ElectronNET.API.Entities
|
|
|
|
|
{
|
2025-11-22 02:16:10 +01:00
|
|
|
using System.Runtime.Versioning;
|
|
|
|
|
|
2017-10-24 21:43:27 +02:00
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
/// <remarks>Up-to-date with Electron API 39.2</remarks>
|
2017-10-17 05:12:35 +02:00
|
|
|
public class OpenDialogOptions
|
|
|
|
|
{
|
2017-10-24 21:43:27 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the title.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The title.
|
|
|
|
|
/// </value>
|
2017-10-17 05:12:35 +02:00
|
|
|
public string Title { get; set; }
|
2017-10-24 21:43:27 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the default path.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The default path.
|
|
|
|
|
/// </value>
|
2017-10-17 05:12:35 +02:00
|
|
|
public string DefaultPath { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Custom label for the confirmation button, when left empty the default label will be used.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string ButtonLabel { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
/// Gets or sets which features the dialog should use. The following values are supported:
|
2017-10-17 05:12:35 +02:00
|
|
|
/// 'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory'
|
|
|
|
|
/// </summary>
|
|
|
|
|
public OpenDialogProperty[] Properties { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
/// Gets or sets the message to display above input boxes.
|
2017-10-17 05:12:35 +02:00
|
|
|
/// </summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
[SupportedOSPlatform("macos")]
|
2017-10-17 05:12:35 +02:00
|
|
|
public string Message { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
/// Gets or sets the filters specifying an array of file types that can be displayed or
|
2017-10-17 05:12:35 +02:00
|
|
|
/// selected when you want to limit the user to a specific type. For example:
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <example>
|
|
|
|
|
/// <code>
|
|
|
|
|
/// new FileFilter[]
|
|
|
|
|
/// {
|
|
|
|
|
/// new FileFiler { Name = "Images", Extensions = new string[] { "jpg", "png", "gif" } },
|
|
|
|
|
/// new FileFiler { Name = "Movies", Extensions = new string[] { "mkv", "avi", "mp4" } },
|
|
|
|
|
/// new FileFiler { Name = "Custom File Type", Extensions= new string[] {"as" } },
|
|
|
|
|
/// new FileFiler { Name = "All Files", Extensions= new string[] { "*" } }
|
|
|
|
|
/// }
|
|
|
|
|
/// </code>
|
|
|
|
|
/// </example>
|
|
|
|
|
public FileFilter[] Filters { get; set; }
|
2025-11-22 02:16:10 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Create security scoped bookmarks when packaged for the Mac App Store.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SupportedOSPlatform("macos")]
|
|
|
|
|
public bool SecurityScopedBookmarks { get; set; }
|
2017-10-17 05:12:35 +02:00
|
|
|
}
|
2025-11-15 08:05:31 +01:00
|
|
|
}
|