From 1c0c9e62c73b89fc85ba587dc0a18d82ee31559a Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 6 Jan 2019 23:23:40 +0400 Subject: [PATCH] (INT): reworked widget backend. --- ArcFormats/CatSystem/ArcINT.cs | 8 +- ArcFormats/CatSystem/WidgetINT.xaml | 10 +- ArcFormats/CatSystem/WidgetINT.xaml.cs | 132 +++++++++++++++++-------- 3 files changed, 100 insertions(+), 50 deletions(-) diff --git a/ArcFormats/CatSystem/ArcINT.cs b/ArcFormats/CatSystem/ArcINT.cs index d20197e2..2e416727 100644 --- a/ArcFormats/CatSystem/ArcINT.cs +++ b/ArcFormats/CatSystem/ArcINT.cs @@ -237,12 +237,14 @@ namespace GameRes.Formats.CatSystem return Encodings.cp932.GetString (name, 0, i); } - public static Dictionary KnownSchemes = new Dictionary(); + public static Dictionary KnownSchemes { get { return DefaultScheme.KnownKeys; } } + + static IntScheme DefaultScheme = new IntScheme { KnownKeys = new Dictionary() }; public override ResourceScheme Scheme { - get { return new IntScheme { KnownKeys = KnownSchemes }; } - set { KnownSchemes = ((IntScheme)value).KnownKeys; } + get { return DefaultScheme; } + set { DefaultScheme = (IntScheme)value; } } public override ResourceOptions GetDefaultOptions () diff --git a/ArcFormats/CatSystem/WidgetINT.xaml b/ArcFormats/CatSystem/WidgetINT.xaml index b80a0b6b..b6f56bd3 100644 --- a/ArcFormats/CatSystem/WidgetINT.xaml +++ b/ArcFormats/CatSystem/WidgetINT.xaml @@ -10,7 +10,7 @@ - +