From 74e155629170036a69654f4eeb16cf8da987dce5 Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 11 Mar 2018 20:59:40 +0400 Subject: [PATCH] (AzSys): fixed scheme selection. --- ArcFormats/AZSys/ArcAZSys.cs | 8 +++++--- ArcFormats/AZSys/WidgetAZ.xaml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ArcFormats/AZSys/ArcAZSys.cs b/ArcFormats/AZSys/ArcAZSys.cs index 963c8239..75a9e804 100644 --- a/ArcFormats/AZSys/ArcAZSys.cs +++ b/ArcFormats/AZSys/ArcAZSys.cs @@ -69,12 +69,14 @@ namespace GameRes.Formats.AZSys Extensions = new string[] { "arc" }; } - public static Dictionary KnownKeys = new Dictionary(); + static AsbScheme DefaultScheme = new AsbScheme { KnownKeys = new Dictionary() }; + + public static Dictionary KnownKeys { get { return DefaultScheme.KnownKeys; } } public override ResourceScheme Scheme { - get { return new AsbScheme { KnownKeys = KnownKeys }; } - set { KnownKeys = ((AsbScheme)value).KnownKeys; } + get { return DefaultScheme; } + set { DefaultScheme = (AsbScheme)value; } } public override ArcFile TryOpen (ArcView file) diff --git a/ArcFormats/AZSys/WidgetAZ.xaml b/ArcFormats/AZSys/WidgetAZ.xaml index 0d10c1d4..427cab2c 100644 --- a/ArcFormats/AZSys/WidgetAZ.xaml +++ b/ArcFormats/AZSys/WidgetAZ.xaml @@ -3,5 +3,5 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:p="clr-namespace:GameRes.Formats.Properties"> + SelectedValue="{Binding Source={x:Static p:Settings.Default}, Path=AZScriptScheme, Mode=TwoWay}"/>