2025-11-09 12:05:07 +01:00
using System.ComponentModel ;
2025-11-22 02:16:10 +01:00
using System.Runtime.Versioning ;
2017-10-21 04:37:01 +02:00
namespace ElectronNET.API.Entities
{
2017-10-24 21:43:27 +02:00
/// <summary>
2020-05-27 00:51:48 +02:00
/// Controls the behavior of OpenExternal.
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>
2017-10-21 04:37:01 +02:00
public class OpenExternalOptions
{
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets whether to bring the opened application to the foreground. The default is <see langword="true"/>.
2017-10-21 04:37:01 +02:00
/// </summary>
2025-11-22 02:16:10 +01:00
[SupportedOSPlatform("macos")]
2017-10-21 04:37:01 +02:00
[DefaultValue(true)]
public bool Activate { get ; set ; } = true ;
2020-05-27 00:51:48 +02:00
/// <summary>
2025-11-22 02:16:10 +01:00
/// Gets or sets the working directory.
2020-05-27 00:51:48 +02:00
/// </summary>
2025-11-22 02:16:10 +01:00
[SupportedOSPlatform("windows")]
2020-05-27 00:51:48 +02:00
public string WorkingDirectory { get ; set ; }
2025-11-22 02:16:10 +01:00
/// <summary>
/// Gets or sets a value indicating a user-initiated launch that enables tracking of frequently used programs and other behaviors. The default is <see langword="false"/>.
/// </summary>
[SupportedOSPlatform("windows")]
[DefaultValue(false)]
public bool LogUsage { get ; set ; } = false ;
2017-10-21 04:37:01 +02:00
}
}