using System; public class SettingsViewModel { public float Brightness { get => ServiceLocator.Get()?.Brightness ?? 50f; set { var s = ServiceLocator.Get(); if (s != null) s.Brightness = value; } } public int Volume { get => ServiceLocator.Get()?.Volume ?? 50; set { var s = ServiceLocator.Get(); if (s != null) s.Volume = value; } } public int MuteDurationMinutes { get => ServiceLocator.Get()?.MuteDurationMinutes ?? 3; set { var s = ServiceLocator.Get(); if (s != null) s.MuteDurationMinutes = value; } } public DateTime SystemTime { get => ServiceLocator.Get()?.SystemTime ?? DateTime.Now; set { var s = ServiceLocator.Get(); if (s != null) s.SystemTime = value; } } public NetworkConfig Network { get => ServiceLocator.Get()?.Network ?? default; set { var s = ServiceLocator.Get(); if (s != null) s.Network = value; } } public string VersionShort => ServiceLocator.Get()?.VersionShort; public string VersionFull => ServiceLocator.Get()?.VersionFull; }