0
0
mirror of https://github.com/sp-tarkov/assembly-tool.git synced 2025-02-13 04:50:45 -05:00
assembly-tool/RecodeItLib/Models/AppSettingsModel.cs

114 lines
2.0 KiB
C#
Raw Normal View History

2024-12-31 13:46:44 -05:00
using ReCodeItLib.Utils;
2024-12-31 13:46:44 -05:00
namespace ReCodeItLib.Models;
2024-06-11 19:18:48 -04:00
/// <summary>
2024-06-17 18:19:17 -04:00
/// All settings container
2024-06-11 19:18:48 -04:00
/// </summary>
2024-06-13 18:15:52 -04:00
public class Settings
2024-06-13 17:55:06 -04:00
{
2024-12-31 03:13:29 -05:00
private AppSettings? _appSettings;
2024-12-31 03:13:29 -05:00
public AppSettings? AppSettings
{
get { return _appSettings; }
set
{
_appSettings = value;
Save();
}
}
2024-12-31 03:13:29 -05:00
private RemapperSettings? _remapper;
2024-12-31 03:13:29 -05:00
public RemapperSettings? Remapper
{
get { return _remapper; }
set
{
_remapper = value;
Save();
}
}
2024-08-09 23:31:30 -04:00
private void Save()
{
DataProvider.SaveAppSettings();
}
2024-06-13 17:55:06 -04:00
}
2024-06-17 18:19:17 -04:00
/// <summary>
/// These are settings for the application
/// </summary>
2024-06-13 18:15:52 -04:00
public class AppSettings
2024-06-11 19:18:48 -04:00
{
private bool _debug;
public bool Debug
{
get { return _debug; }
set
{
_debug = value;
Save();
}
}
private bool _silentMode;
public bool SilentMode
{
get { return _silentMode; }
set
{
_silentMode = value;
Save();
}
}
private void Save()
{
DataProvider.SaveAppSettings();
}
2024-06-17 17:29:26 -04:00
}
2024-06-17 18:19:17 -04:00
/// <summary>
/// These are settings for the manual remapper
/// </summary>
2024-06-17 17:29:26 -04:00
public class RemapperSettings
{
2024-12-31 03:13:29 -05:00
private string _mappingPath = string.Empty;
2024-06-17 19:14:47 -04:00
/// <summary>
/// Path to the mapping file
/// </summary>
public string MappingPath
{
get { return _mappingPath; }
set
{
_mappingPath = value;
Save();
}
}
2024-12-31 03:13:29 -05:00
private List<string> _tokensToMatch = [];
2024-06-15 16:21:12 -04:00
2024-06-17 19:14:47 -04:00
/// <summary>
/// The re-mapper will look for these tokens in class names, otherwise they will be skipped
2024-06-17 19:14:47 -04:00
/// </summary>
public List<string> TokensToMatch
{
get { return _tokensToMatch; }
set
{
_tokensToMatch = value;
Save();
}
}
private void Save()
{
DataProvider.SaveAppSettings();
}
2024-06-11 19:18:48 -04:00
}