forked from Flow-Launcher/Flow.Launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomBrowserViewModel.cs
More file actions
39 lines (36 loc) · 1.2 KB
/
CustomBrowserViewModel.cs
File metadata and controls
39 lines (36 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Text.Json.Serialization;
using Flow.Launcher.Plugin;
namespace Flow.Launcher.Infrastructure.UserSettings
{
public class CustomBrowserViewModel : BaseModel
{
public string Name { get; set; }
[JsonIgnore]
public string DisplayName => Name == "Default" ? Localize.defaultBrowser_default() : Name;
public string Path { get; set; }
public string PrivateArg { get; set; }
public string ExtraArgs { get; set; }
public bool EnablePrivate { get; set; }
public bool OpenInTab { get; set; } = true;
[JsonIgnore]
public bool OpenInNewWindow => !OpenInTab;
public bool Editable { get; set; } = true;
public CustomBrowserViewModel Copy()
{
return new CustomBrowserViewModel
{
Name = Name,
Path = Path,
OpenInTab = OpenInTab,
PrivateArg = PrivateArg,
ExtraArgs = ExtraArgs,
EnablePrivate = EnablePrivate,
Editable = Editable
};
}
public void OnDisplayNameChanged()
{
OnPropertyChanged(nameof(DisplayName));
}
}
}