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

@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
namespace GameRes.Formats.NScripter
@@ -150,14 +149,14 @@ namespace GameRes.Formats.NScripter
public override ResourceOptions GetDefaultOptions ()
{
return new NsaOptions { Password = Settings.Default.NSAPassword };
return new NsaOptions { Password = Properties.Settings.Default.NSAPassword };
}
public override ResourceOptions GetOptions (object widget)
{
var w = widget as GUI.WidgetNSA;
if (null != w)
Settings.Default.NSAPassword = w.Password.Text;
Properties.Settings.Default.NSAPassword = w.Password.Text;
return GetDefaultOptions();
}

View File

@@ -29,7 +29,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Text;
using GameRes.Formats.Strings;
using GameRes.Formats.Properties;
using GameRes.Utility;
namespace GameRes.Formats.NScripter
@@ -203,8 +202,8 @@ namespace GameRes.Formats.NScripter
public override ResourceOptions GetDefaultOptions ()
{
return new NsaOptions {
CompressionType = Settings.Default.ONSCompression,
Password = Settings.Default.NSAPassword,
CompressionType = Properties.Settings.Default.ONSCompression,
Password = Properties.Settings.Default.NSAPassword,
};
}
@@ -212,7 +211,7 @@ namespace GameRes.Formats.NScripter
{
var w = widget as GUI.WidgetNSA;
if (null != w)
Settings.Default.NSAPassword = w.Password.Text;
Properties.Settings.Default.NSAPassword = w.Password.Text;
return GetDefaultOptions();
}