work on menu and bindings
This commit is contained in:
@@ -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 == "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user