From 58aaf05673960ea433fd0c0dd2f18e6546a81777 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Tue, 28 May 2024 11:50:30 +0200 Subject: [PATCH] temp commit before merge --- BeWoLauncher/LauncherWindow.xaml | 8 +++++++- BeWoLauncher/LauncherWindow.xaml.cs | 12 +++++++++++- BeWoLauncher/Logic/Behavior/LaunchBehavior.cs | 1 + BeWoLauncher/Logic/Controller/DownloadController.cs | 7 +++++++ BeWoLauncher/Logic/Utils/Download/DownloadManager.cs | 9 +++++++-- BeWoLauncher/Logic/ViewBuilder.cs | 2 +- BeWoLauncher/View/Frames/InfoFrame.xaml | 2 +- BeWoLauncher/View/Frames/InstallInfoFrame.xaml | 2 +- BeWoLauncher/View/Frames/LoadingFrame.xaml | 8 ++++---- BeWoLauncher/View/LoginView.xaml | 12 ++++++------ SharedLauncher/Extensions/PathExtensions.cs | 4 ++-- 11 files changed, 48 insertions(+), 19 deletions(-) diff --git a/BeWoLauncher/LauncherWindow.xaml b/BeWoLauncher/LauncherWindow.xaml index 8f5f7dabf..cd992fcbf 100644 --- a/BeWoLauncher/LauncherWindow.xaml +++ b/BeWoLauncher/LauncherWindow.xaml @@ -7,7 +7,13 @@ xmlns:local="clr-namespace:BeWoLauncher" mc:Ignorable="d" Title="BeWoLauncher" Height="1080" Width="1920" WindowStartupLocation="CenterScreen" WindowState="Maximized" BorderThickness="1" Closing="MainWindow_OnClosing" - Background="{StaticResource LoginBackground}" KeyDown="Window_KeyDown" KeyUp="Window_KeyUp"> + Background="{StaticResource LoginBackground}" KeyDown="Window_KeyDown" KeyUp="Window_KeyUp" PreviewKeyDown="Window_PreviewKeyDown" PreviewKeyUp="Window_PreviewKeyUp"> + + + diff --git a/BeWoLauncher/LauncherWindow.xaml.cs b/BeWoLauncher/LauncherWindow.xaml.cs index 2f9c05b6e..35f30aecd 100644 --- a/BeWoLauncher/LauncherWindow.xaml.cs +++ b/BeWoLauncher/LauncherWindow.xaml.cs @@ -138,6 +138,16 @@ namespace BeWoLauncher } private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) + { + + } + + private void Window_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) + { + + } + + private void Window_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == System.Windows.Input.Key.Delete) { @@ -145,7 +155,7 @@ namespace BeWoLauncher } } - private void Window_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) + private void Window_PreviewKeyUp(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == System.Windows.Input.Key.Delete) { diff --git a/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs b/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs index 9071ad49e..c75cb094c 100644 --- a/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs +++ b/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs @@ -47,6 +47,7 @@ namespace BeWoLauncher.Logic.Behavior { if (UninstallMode) { + DownloadController.GetDeleteplan(); ViewBehavior.ShowUninstallInfo(); EndWaiting(); } diff --git a/BeWoLauncher/Logic/Controller/DownloadController.cs b/BeWoLauncher/Logic/Controller/DownloadController.cs index bddf17f85..0a632007a 100644 --- a/BeWoLauncher/Logic/Controller/DownloadController.cs +++ b/BeWoLauncher/Logic/Controller/DownloadController.cs @@ -26,6 +26,13 @@ namespace BeWoLauncher.Logic.Controller GenericTextLogger.Init(LauncherPaths.GetLoggerPath()); } + public static void GetDeleteplan() + { + Manager = new DownloadManager(); + + Manager.GetDeletePlan(); + } + public static void GetCurrentUpdateplan(Action endWaiting = null) { bool not_called = true; diff --git a/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs b/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs index b72c7af82..6b7c3f082 100644 --- a/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs +++ b/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs @@ -44,6 +44,11 @@ namespace BeWoLauncher.Logic.Utils.Download } + public void GetDeletePlan() + { + + } + public void GetUpdatePlan() { GenericTextLogger.Post("Lokale Dateien werden berechnet. Request wird erstellt."); @@ -140,7 +145,7 @@ namespace BeWoLauncher.Logic.Utils.Download Feedback((int)LauncherProgress.DownloadUpdate, new DownloadProgressEventArgs(size, file2request)); } - DownloadFolder.Unlock(); + DownloadFolder.Unlock(SkipLock); } public void Apply() { @@ -183,7 +188,7 @@ namespace BeWoLauncher.Logic.Utils.Download DownloadFolder.ClearFolder(); - ApplyFolder.Unlock(); + ApplyFolder.Unlock(SkipLock); } private void CreateUpdatePlanRequest() diff --git a/BeWoLauncher/Logic/ViewBuilder.cs b/BeWoLauncher/Logic/ViewBuilder.cs index 71db5abba..f9077cd8e 100644 --- a/BeWoLauncher/Logic/ViewBuilder.cs +++ b/BeWoLauncher/Logic/ViewBuilder.cs @@ -121,7 +121,7 @@ namespace BeWoLauncher.Logic private FrameBase getUninstallProgressFrame() { - var progress = new ProgressFrame(LauncherMode.Update); + var progress = new ProgressFrame(LauncherMode.Uninstall); progress.Successful += ViewBehavior.UninstallSuccess; progress.Exception += ViewBehavior.UninstallFailed; diff --git a/BeWoLauncher/View/Frames/InfoFrame.xaml b/BeWoLauncher/View/Frames/InfoFrame.xaml index e82888b24..e876cb9a2 100644 --- a/BeWoLauncher/View/Frames/InfoFrame.xaml +++ b/BeWoLauncher/View/Frames/InfoFrame.xaml @@ -13,7 +13,7 @@ - + Hier könnte ihre Fehlermeldung stehen! diff --git a/BeWoLauncher/View/Frames/InstallInfoFrame.xaml b/BeWoLauncher/View/Frames/InstallInfoFrame.xaml index affab4ba5..6ef9622f0 100644 --- a/BeWoLauncher/View/Frames/InstallInfoFrame.xaml +++ b/BeWoLauncher/View/Frames/InstallInfoFrame.xaml @@ -10,7 +10,7 @@ - +