fixed code to work with new resource settings interface.

This commit is contained in:
morkt
2018-01-08 20:04:23 +04:00
parent 2e2e447c42
commit cd4e1174af
56 changed files with 179 additions and 158 deletions

View File

@@ -28,7 +28,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Globalization;
using System.IO;
using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -193,8 +192,8 @@ namespace GameRes.Formats.Dac
public override ResourceOptions GetDefaultOptions ()
{
return new DpkOptions {
Key1 = Settings.Default.DPKKey1,
Key2 = Settings.Default.DPKKey2,
Key1 = Properties.Settings.Default.DPKKey1,
Key2 = Properties.Settings.Default.DPKKey2,
};
}
@@ -205,9 +204,9 @@ namespace GameRes.Formats.Dac
{
uint result_key;
if (uint.TryParse (widget.Key1.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out result_key))
Settings.Default.DPKKey1 = result_key;
Properties.Settings.Default.DPKKey1 = result_key;
if (uint.TryParse (widget.Key2.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out result_key))
Settings.Default.DPKKey2 = result_key;
Properties.Settings.Default.DPKKey2 = result_key;
}
return this.GetDefaultOptions();
}