Files
mpv.net/src/MpvNet/Binding.cs
2023-10-24 11:17:45 +02:00

45 lines
960 B
C#

using CommunityToolkit.Mvvm.ComponentModel;
namespace MpvNet;
public class Binding : ObservableObject
{
public string Path { get; set; }
public string Command { get; set; }
public string Comment { get; set; }
public bool IsMenu { get; set; }
public Binding()
{
Path = ""; Command = ""; Comment = "";
}
public Binding(string folder = "",
string name = "",
string command = "",
string input = "",
string comment = "")
{
if (folder != "" && name != "")
Path = folder + " > " + name;
else if (name != "")
Path = name;
else
Path = "";
Command = command;
Input = input;
Comment = comment == "" ? Path : comment;
}
string _input = "";
public string Input
{
get => _input;
set => SetProperty(ref _input, value);
}
}