using ElectronNET.API.Entities; using System.Runtime.Versioning; namespace ElectronNET.API { /// /// Options for dialog.showSaveDialog / dialog.showSaveDialogSync. /// /// Up-to-date with Electron API 39.2 public class SaveDialogOptions { /// /// Gets or sets the title. /// /// /// The title. /// public string Title { get; set; } /// /// Absolute directory path, absolute file path, or file name to use by default. /// public string DefaultPath { get; set; } /// /// Gets or sets the custom label for the confirmation button; when left empty the default label will be used. /// public string ButtonLabel { get; set; } /// /// Properties for the save dialog. Supported values: /// showHiddenFiles | createDirectory (macOS) | treatPackageAsDirectory (macOS) | showOverwriteConfirmation (Linux) | dontAddToRecent (Windows) /// public SaveDialogProperty[] Properties { get; set; } /// /// Gets or sets the filters specifying 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; } /// /// Gets or sets the message to display above text fields. /// [SupportedOSPlatform("macos")] public string Message { get; set; } /// /// Gets or sets the custom label for the text displayed in front of the filename text field. /// [SupportedOSPlatform("macos")] public string NameFieldLabel { get; set; } /// /// Gets or sets a value indicating whether to show the tags input box. Defaults to true. /// [SupportedOSPlatform("macos")] public bool ShowsTagField { get; set; } /// /// Gets or sets a value indicating whether to create a security scoped bookmark when packaged for the Mac App Store. If enabled and the file doesn't already exist a blank file will be created at the chosen path. /// [SupportedOSPlatform("macos")] public bool SecurityScopedBookmarks { get; set; } } }