using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime.Versioning;
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; }
///
/// Custom label for the confirmation button, when left empty the default label will be used.
///
public string ButtonLabel { get; set; }
///
/// Contains which features the dialog should use. The following values are supported:
/// 'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory'
///
[JsonProperty("properties", ItemConverterType = typeof(StringEnumConverter))]
public OpenDialogProperty[] Properties { get; set; }
///
/// Message to display above input boxes.
///
[SupportedOSPlatform("macos")]
public string Message { get; set; }
///
/// The filters specifies an array of file types that can be displayed or
/// selected when you want to limit the user to a specific type. For example:
///
///
///
/// 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[] { "*" } }
/// }
///
///
public FileFilter[] Filters { get; set; }
}
}