Files
BeWoPlaner/BeWoLauncher/View/Frames/UpdateInfoFrame.xaml.cs
rene 4fbfdbaf2c Unit Tests erstellt
Informationen ausgelagert
Kleines Spy/Test Programm erstellt
Mehr Exceptions/InvalidUpdateFileRequestException.cs
Launcher Host in Download Server geändert
Download Server macht zusätzlich Abfrage an den Hauptserver
Download geht jetzt stückweise von statten
2022-12-28 16:36:59 +01:00

68 lines
2.0 KiB
C#

using BeWoLauncher.Logic.Controller;
using BeWoLauncher.Logic.Utils;
using BS.SharedLauncher.Utils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWoLauncher.View.Frames
{
/// <summary>
/// Interaktionslogik für UpdateInfo2.xaml
/// </summary>
public partial class UpdateInfoFrame : FrameBase
{
public event EventHandler Accept;
public event EventHandler Abort;
public UpdateInfoFrame()
{
InitializeComponent();
LauncherPaths.ActualPlanerLocation = LauncherPaths.GetInstallLocationFromSetting();
var size = NonspecificTools.SizeSuffix((ulong)DownloadController.Manager.UpdatePlanResponse.DownloadSize).Split(' ');
lblErforderlich.Content = size[0];
lblErforderlichSize.Content = size[1];
var size2 = DownloadController.UpdateDiskSpace(LauncherPaths.ActualPlanerLocation).Split(' ');
if(size2.Length > 1)
{
lblVerfuegbar.Content = size2[0];
lblVerfuegbarSize.Content = size2[1];
}
else
{
lblVerfuegbar.Content = size2[0] ?? "error#87";
lblVerfuegbarSize.Content = string.Empty;
}
lblversion.Content = DownloadController.Manager.UpdatePlanResponse.CurrentPackage.Version;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Abort.Invoke(this, new EventArgs());
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
Accept.Invoke(this, new EventArgs());
}
}
}