using System; using Microsoft.Xna.Framework; using Sentry; namespace Sledgemapper { public class Settings { public Color BackgroundColor { get; set; } public Color OverlayTintColor { get; set; } public Color GridColor { get; set; } public Color NoteColor { get; set; } public string MachineName { get; set; } public int TileDeleteDivider { get; set; } public int PingDuration {get;set;} private static readonly Settings instance = new Settings(); // Explicit static constructor to tell C# compiler // not to mark type as beforefieldinit static Settings() { } private Settings() { BackgroundColor = Color.LightGray; GridColor = Color.Black; NoteColor = Color.DarkRed; OverlayTintColor = new Color(24, 118, 157); TileDeleteDivider = 14; PingDuration = 4000; try { MachineName = Environment.MachineName; } catch (Exception ex) { SentrySdk.CaptureException(ex); MachineName = "n/a"; } } public static Settings Instance { get { return instance; } } } }