50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using BarRaider.SdTools;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using BarRaider.SdTools.Wrappers;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace ClipTrimDotNet
|
|
{
|
|
public class GlobalSettings
|
|
{
|
|
public static GlobalSettings? _inst;
|
|
public static GlobalSettings Instance
|
|
{
|
|
get
|
|
{
|
|
_inst ??= CreateDefaultSettings();
|
|
return _inst;
|
|
}
|
|
set
|
|
{
|
|
_inst = value;
|
|
}
|
|
}
|
|
public static GlobalSettings CreateDefaultSettings()
|
|
{
|
|
GlobalSettings instance = new GlobalSettings();
|
|
instance.ProfileName = null;
|
|
instance.PortNumber = 5010;
|
|
return instance;
|
|
}
|
|
|
|
|
|
[JsonProperty(PropertyName = "profileName")]
|
|
public string? ProfileName { get; set; }
|
|
|
|
[JsonProperty(PropertyName = "portNumber")]
|
|
public int? PortNumber { get; set; }
|
|
|
|
|
|
public void SetCurrentProfile(string profile)
|
|
{
|
|
ProfileName = profile;
|
|
}
|
|
}
|
|
}
|