diff --git a/Patcher/PatchClient/ViewModels/PatcherViewModel.cs b/Patcher/PatchClient/ViewModels/PatcherViewModel.cs index b54ac4a..8e5faef 100644 --- a/Patcher/PatchClient/ViewModels/PatcherViewModel.cs +++ b/Patcher/PatchClient/ViewModels/PatcherViewModel.cs @@ -1,5 +1,4 @@ -using Avalonia; -using Avalonia.Threading; +using Avalonia.Threading; using PatchClient.Models; using PatcherUtils; using ReactiveUI; @@ -45,44 +44,16 @@ namespace PatchClient.ViewModels { this.WhenActivated((CompositeDisposable disposables) => { - //Test(); + if(!Directory.Exists(LazyOperations.PatchFolder)) + { + NavigateTo(new MessageViewModel(HostScreen, $"{LazyOperations.PatchFolder} folder is missing. Please copy it to\n'{Environment.CurrentDirectory}'\nand try patching again.")); + return; + } + RunPatcher(); }); } - /// - /// A dumb testing method to see if things look right. Obsolete is used more like a warning here. - /// - [Obsolete] - private void Test() - { - Task.Run(async () => - { - LineItem x = new LineItem("test 1", 30); - LineItem xx = new LineItem("test 2", 100); - LineItem xxx = new LineItem("test 3", 70); - - LineItems.Add(new LineItemProgress(x)); - LineItems.Add(new LineItemProgress(xx)); - LineItems.Add(new LineItemProgress(xxx)); - - for (int i = 0; i <= 100; i++) - { - System.Threading.Thread.Sleep(20); - PatchPercent = i; - ProgressMessage = $"Patching @ {i}%"; - - foreach (var item in LineItems) - { - item.UpdateProgress(item.Total - i); - } - } - - await NavigateToWithDelay(new MessageViewModel(HostScreen, "Test Complete"), 400); - }); - } - - private void RunPatcher() { Task.Run(async() => diff --git a/Patcher/PatchGenerator/Resources/PatchClient.exe b/Patcher/PatchGenerator/Resources/PatchClient.exe index febfa9a..f74bfa8 100644 --- a/Patcher/PatchGenerator/Resources/PatchClient.exe +++ b/Patcher/PatchGenerator/Resources/PatchClient.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f9d18f470b8256cc0e1a5f524103a4137f229f2d346ea48fbfffb8ef156f1f2 -size 25319596 +oid sha256:0d8fd2f0c7b74f0db0fb10ce5b8a12778d519d769bf752496949d3ae51addae6 +size 25318060