45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
|
|
namespace CMM.Library.ViewModel;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Configuration for a single monitor's ports
|
||
|
|
/// </summary>
|
||
|
|
public class MonitorConfig
|
||
|
|
{
|
||
|
|
public string SerialNumber { get; set; } = string.Empty;
|
||
|
|
public string MonitorName { get; set; } = string.Empty;
|
||
|
|
public List<PortConfig> Ports { get; set; } = new();
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Configuration for a single input port
|
||
|
|
/// </summary>
|
||
|
|
public class PortConfig
|
||
|
|
{
|
||
|
|
public int VcpValue { get; set; }
|
||
|
|
public string DefaultName { get; set; } = string.Empty;
|
||
|
|
public string CustomLabel { get; set; } = string.Empty;
|
||
|
|
public bool IsHidden { get; set; }
|
||
|
|
public bool ShowInQuickSwitch { get; set; }
|
||
|
|
|
||
|
|
public string DisplayName => string.IsNullOrWhiteSpace(CustomLabel) ? DefaultName : CustomLabel;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Quick switch item shown in toolbar
|
||
|
|
/// </summary>
|
||
|
|
public class QuickSwitchItem
|
||
|
|
{
|
||
|
|
public string MonitorSerialNumber { get; set; } = string.Empty;
|
||
|
|
public string MonitorName { get; set; } = string.Empty;
|
||
|
|
public int PortVcpValue { get; set; }
|
||
|
|
public string PortLabel { get; set; } = string.Empty;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Root configuration object
|
||
|
|
/// </summary>
|
||
|
|
public class AppConfig
|
||
|
|
{
|
||
|
|
public List<MonitorConfig> Monitors { get; set; } = new();
|
||
|
|
}
|