From 2742457e0eb6730b4c51880741332132208e769d Mon Sep 17 00:00:00 2001 From: Chris Anders Date: Thu, 3 Oct 2024 16:29:44 +0200 Subject: [PATCH] refactor: Cleanup --- src/MimaSim/MimaSim.Browser/Program.cs | 4 +++- src/MimaSim/MimaSim/App.axaml.cs | 1 - src/MimaSim/MimaSim/{Samples => Core}/SampleLoader.cs | 3 +-- src/MimaSim/MimaSim/ViewModels/ExecutionTabViewModel.cs | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) rename src/MimaSim/MimaSim/{Samples => Core}/SampleLoader.cs (97%) diff --git a/src/MimaSim/MimaSim.Browser/Program.cs b/src/MimaSim/MimaSim.Browser/Program.cs index a9142d73..bf15fb52 100644 --- a/src/MimaSim/MimaSim.Browser/Program.cs +++ b/src/MimaSim/MimaSim.Browser/Program.cs @@ -1,8 +1,10 @@ -using System.Runtime.Versioning; +using System.Runtime.InteropServices.JavaScript; +using System.Runtime.Versioning; using System.Threading.Tasks; using Avalonia; using Avalonia.Browser; using Avalonia.ReactiveUI; +using Microsoft.JSInterop; using MimaSim; using MimaSim.Browser.Core; using MimaSim.Core; diff --git a/src/MimaSim/MimaSim/App.axaml.cs b/src/MimaSim/MimaSim/App.axaml.cs index 47964d39..081e0c35 100644 --- a/src/MimaSim/MimaSim/App.axaml.cs +++ b/src/MimaSim/MimaSim/App.axaml.cs @@ -6,7 +6,6 @@ using Avalonia.Platform.Storage; using MimaSim.Core; using MimaSim.MIMA.Components; -using MimaSim.Samples; using MimaSim.Views; using ReactiveUI; using Splat; diff --git a/src/MimaSim/MimaSim/Samples/SampleLoader.cs b/src/MimaSim/MimaSim/Core/SampleLoader.cs similarity index 97% rename from src/MimaSim/MimaSim/Samples/SampleLoader.cs rename to src/MimaSim/MimaSim/Core/SampleLoader.cs index 429c2f26..60bccb92 100644 --- a/src/MimaSim/MimaSim/Samples/SampleLoader.cs +++ b/src/MimaSim/MimaSim/Core/SampleLoader.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Reflection; -using MimaSim.Core; -namespace MimaSim.Samples; +namespace MimaSim.Core; public class SampleLoader { diff --git a/src/MimaSim/MimaSim/ViewModels/ExecutionTabViewModel.cs b/src/MimaSim/MimaSim/ViewModels/ExecutionTabViewModel.cs index bee214db..50a4bb32 100644 --- a/src/MimaSim/MimaSim/ViewModels/ExecutionTabViewModel.cs +++ b/src/MimaSim/MimaSim/ViewModels/ExecutionTabViewModel.cs @@ -12,7 +12,6 @@ using System.Windows.Input; using System.Collections.ObjectModel; using Avalonia.Platform.Storage; -using MimaSim.Samples; using MimaSim.ViewModels.Mima; using Splat; @@ -23,7 +22,7 @@ public class ExecutionTabViewModel : ReactiveObject, IActivatableViewModel private bool _runMode; private LanguageName _selectedLanguage; private string _selectedSample; - private string _source; + private string? _source; private string[] _sampleNames; private bool _isCompiled;