Flow.Launcher/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs

34 lines
1,023 B
C#
Raw Permalink Normal View History

using System.Text.Json.Serialization;
using Flow.Launcher.Plugin;
2021-11-02 20:07:11 +00:00
2025-09-18 04:36:40 +00:00
namespace Flow.Launcher.Infrastructure.UserSettings
2021-11-02 20:07:11 +00:00
{
2021-11-05 19:16:20 +00:00
public class CustomExplorerViewModel : BaseModel
2021-11-02 20:07:11 +00:00
{
public string Name { get; set; }
[JsonIgnore]
2025-09-23 10:07:15 +00:00
public string DisplayName => Name == "Explorer" ? Localize.fileManagerExplorer() : Name;
2021-11-02 20:07:11 +00:00
public string Path { get; set; }
public string FileArgument { get; set; } = "\"%d\"";
public string DirectoryArgument { get; set; } = "\"%d\"";
public bool Editable { get; init; } = true;
2021-11-05 19:16:20 +00:00
public CustomExplorerViewModel Copy()
{
return new CustomExplorerViewModel
{
Name = Name,
Path = Path,
FileArgument = FileArgument,
DirectoryArgument = DirectoryArgument,
Editable = Editable
};
}
public void OnDisplayNameChanged()
{
OnPropertyChanged(nameof(DisplayName));
}
2021-11-02 20:07:11 +00:00
}
}