From af58a804f834f1f2b6f78cfa2a3fb7434f2f4df4 Mon Sep 17 00:00:00 2001 From: haven1433 Date: Thu, 22 Sep 2022 13:18:59 -0500 Subject: [PATCH] update method for testing new features --- src/HexManiac.Core/ViewModels/EditorViewModel.cs | 5 ++--- src/HexManiac.Core/ViewModels/GotoControlViewModel.cs | 7 +++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/HexManiac.Core/ViewModels/EditorViewModel.cs b/src/HexManiac.Core/ViewModels/EditorViewModel.cs index 25799d00..c33952ec 100644 --- a/src/HexManiac.Core/ViewModels/EditorViewModel.cs +++ b/src/HexManiac.Core/ViewModels/EditorViewModel.cs @@ -380,7 +380,6 @@ namespace HavenSoft.HexManiac.Core.ViewModels { public Theme Theme { get; } public IFileSystem FileSystem => fileSystem; - private IFileSystem FileSystemInDevMode => ShowDeveloperMenu ? FileSystem : null; private string infoMessage; public string InformationMessage { @@ -598,7 +597,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels { newCommand.CanExecute = CanAlwaysExecute; newCommand.Execute = arg => { var model = new PokemonModel(new byte[0], singletons: Singletons); - Add(new ViewPort(string.Empty, model, workDispatcher, Singletons, FileSystemInDevMode, PythonTool)); + Add(new ViewPort(string.Empty, model, workDispatcher, Singletons, FileSystem, PythonTool)); }; open.CanExecute = CanAlwaysExecute; @@ -702,7 +701,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels { IDataModel model = file.Name.ToLower().EndsWith(".gba") ? new HardcodeTablesModel(Singletons, file.Contents, metadata) : new PokemonModel(file.Contents, metadata, Singletons); - var viewPort = new ViewPort(file.Name, model, workDispatcher, Singletons, FileSystemInDevMode, PythonTool); + var viewPort = new ViewPort(file.Name, model, workDispatcher, Singletons, FileSystem, PythonTool); if (metadata.IsEmpty || StoredMetadata.NeedVersionUpdate(metadata.Version, Singletons.MetadataInfo.VersionNumber)) { _ = viewPort.Model.InitializationWorkload.ContinueWith(task => { if (!Singletons.GameReferenceTables.TryGetValue(model.GetGameCode(), out var refTable)) refTable = null; diff --git a/src/HexManiac.Core/ViewModels/GotoControlViewModel.cs b/src/HexManiac.Core/ViewModels/GotoControlViewModel.cs index 9d725b90..19f4b3b6 100644 --- a/src/HexManiac.Core/ViewModels/GotoControlViewModel.cs +++ b/src/HexManiac.Core/ViewModels/GotoControlViewModel.cs @@ -314,10 +314,13 @@ namespace HavenSoft.HexManiac.Core.ViewModels { return options; } - public static IList GetMatchingMaps(this IDataModel model, string text) { + public static List GetMatchingMaps(this IDataModel model, string text) { var allMaps = model.CurrentCacheScope.GetAllMaps(); var results = allMaps.Where(map => map.Name.MatchesPartial(text)).ToList(); - return new List(); + + return //* + new() /*/ results //*/ + ; } }