mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 12:12:41 +01:00
Work on settings
This commit is contained in:
parent
4206978b0b
commit
d06f1ea37c
@ -42,6 +42,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nuendo/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ollama/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Purfview/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Spectrograms/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stbl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tahoma/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tesseract/@EntryIndexedValue">True</s:Boolean>
|
||||
|
@ -13,7 +13,7 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
{
|
||||
private static readonly Lazy<Configuration> Instance = new Lazy<Configuration>(() => new Configuration());
|
||||
|
||||
private readonly Lazy<Settings.Settings> _settings;
|
||||
private Lazy<Settings.Settings> _settings;
|
||||
private readonly IEnumerable<Encoding> _encodings;
|
||||
|
||||
public static readonly string BaseDirectory = GetBaseDirectory();
|
||||
@ -62,6 +62,11 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
_settings = new Lazy<Settings.Settings>(Core.Settings.Settings.GetSettings);
|
||||
}
|
||||
|
||||
public void SetSettings(Settings.Settings settings)
|
||||
{
|
||||
_settings = new Lazy<Settings.Settings>(() => settings);
|
||||
}
|
||||
|
||||
private const int PlatformWindows = 1;
|
||||
private const int PlatformLinux = 2;
|
||||
private const int PlatformMac = 3;
|
||||
@ -294,6 +299,5 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
|
||||
return encodings.AsEnumerable();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ namespace Nikse.SubtitleEdit.Core.Settings
|
||||
/// </summary>
|
||||
/// <param name="fileName">File name of xml settings file to load</param>
|
||||
/// <returns>Newly loaded settings</returns>
|
||||
private static Settings CustomDeserialize(string fileName)
|
||||
public static Settings CustomDeserialize(string fileName)
|
||||
{
|
||||
var doc = new XmlDocument { PreserveWhitespace = true };
|
||||
using (var stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
|
Loading…
Reference in New Issue
Block a user