work on menu and bindings

This commit is contained in:
stax76
2023-11-04 20:24:10 +01:00
parent b41ca3cd89
commit 1d3fe0a924
11 changed files with 195 additions and 82 deletions

View File

@@ -5,17 +5,17 @@ namespace MpvNet;
public class Binding : ObservableObject
{
public string Path { get; set; }
public string Command { get; set; }
public string Comment { get; set; }
public bool IsCustomMenu { get; set; }
public bool IsMenu { get; set; }
string _input = "";
public Binding()
{
Path = Command = Comment = Input = "";
Command = Comment = Input = "";
}
public Binding(string folder = "",
@@ -26,20 +26,19 @@ public class Binding : ObservableObject
{
if (folder != "" && name != "")
{
Path = folder + " > " + name;
Comment = folder + " > " + name;
IsMenu = true;
}
else if (name != "")
{
Path = name;
Comment = name;
IsMenu = true;
}
else
Path = "";
Comment = comment;
Command = command;
Input = input;
Comment = comment == "" ? Path : comment;
}
public string Input
@@ -48,5 +47,5 @@ public class Binding : ObservableObject
set => SetProperty(ref _input, value);
}
public bool IsEmpty() => Path == "" && Command == "" && Comment == "" && Input == "";
public bool IsEmpty() => Command == "" && Comment == "" && Input == "";
}