Version in Connection String hinzugefügt
- Version wird aktuell im Client angezeigt LoadingScreen statt StartPlanerProcess UI verschönert Fehler im Host/web.config behoben
This commit is contained in:
@@ -17,13 +17,15 @@ namespace BeWo
|
||||
Loaded = false;
|
||||
}
|
||||
|
||||
public static void Load(string username, string password, string servername, string tenant, string coreserveraddress)
|
||||
public static void Load(string username, string password, string servername, string tenant, string coreserveraddress, string version)
|
||||
{
|
||||
BeWoApp.UserName = username;
|
||||
BeWoApp.UserPassword = password;
|
||||
BeWoApp.ServerName = servername;
|
||||
BeWoApp.Tenant = tenant;
|
||||
BeWoApp.ServerAddress = coreserveraddress;
|
||||
BeWoApp.ShortVersion = version;
|
||||
BeWoApp.Version = "Version " + version;
|
||||
|
||||
BeWoApp.LoggedOnUser = ServiceFacade.DoUserServiceSync(s => s.LoadUserByNameAndPassword(BeWoApp.UserName, BeWoApp.UserPassword));
|
||||
BeWoApp.Mandator = ServiceFacade.DoOperationsServiceSync(s => s.GetMandator());
|
||||
@@ -32,7 +34,7 @@ namespace BeWo
|
||||
}
|
||||
|
||||
public static void Load(Connection connection)
|
||||
=> Load(connection.Username, connection.Password, connection.Servername, connection.Tenant, connection.CoreServerAddress);
|
||||
=> Load(connection.Username, connection.Password, connection.Servername, connection.Tenant, connection.CoreServerAddress, connection.Version);
|
||||
|
||||
public static void Load(string rawInput)
|
||||
=> Load(Connection.Parse(rawInput));
|
||||
|
||||
@@ -67,6 +67,9 @@
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Mvvm.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
|
||||
@@ -172,6 +172,7 @@ namespace BeWoLauncher.Logic.Controller
|
||||
if (BeWoPaths.ActualPlanerLocation is object && !CheckForPermissions(BeWoPaths.ActualPlanerLocation))
|
||||
{
|
||||
ShowPage(LauncherPageType.NoPermissionInfo);
|
||||
EndWaiting();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -217,7 +218,7 @@ namespace BeWoLauncher.Logic.Controller
|
||||
installprogress.InstallSuccessful += (s, e) =>
|
||||
{
|
||||
BeWoLocalConfig.SetFirstInstallationSuccess(true);
|
||||
ProcessController.StartPlanerProcess();
|
||||
ShowPage(LauncherPageType.LoadingScreen);
|
||||
};
|
||||
|
||||
return GetControlInFrameView(installprogress);
|
||||
@@ -348,14 +349,22 @@ namespace BeWoLauncher.Logic.Controller
|
||||
{
|
||||
var page = GetNewPage(type);
|
||||
|
||||
if (type == LauncherPageType.Login)
|
||||
if (page is LoginView login)
|
||||
{
|
||||
CurrentView = page;
|
||||
CurrentView = login;
|
||||
}
|
||||
else if (page is FrameView frameview)
|
||||
{
|
||||
CurrentView = frameview;
|
||||
}
|
||||
else if(page is FrameBase frame)
|
||||
{
|
||||
CurrentFrame = frame;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotImplementedException("Page Error 1063");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,13 +74,18 @@ namespace BeWoLauncher.Utils
|
||||
BeWoLocalConfig.SetInstallLocation(path);
|
||||
}
|
||||
|
||||
public static string GetRootPath()
|
||||
{
|
||||
return ActualPlanerLocation;
|
||||
}
|
||||
|
||||
public static string GetDownloadPath()
|
||||
{
|
||||
return Path.Combine(new string[] { ActualPlanerLocation, "download" });
|
||||
return Path.Combine(new string[] { GetRootPath(), "download" });
|
||||
}
|
||||
public static string GetApplyPath()
|
||||
{
|
||||
return Path.Combine(new string[] { ActualPlanerLocation, "apply" });
|
||||
return Path.Combine(new string[] { GetRootPath(), "apply" });
|
||||
}
|
||||
public static string GetPlanerExeName() => planerExeName;
|
||||
public static string GetPlanerExePath()
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace BeWoLauncher.Utils.Download
|
||||
CreateDownloadRequest();
|
||||
|
||||
GetDownloadResponseInfo();
|
||||
|
||||
ConnectionInformation.Version = ResponseInfo.Version;
|
||||
}
|
||||
|
||||
private void CreateDownloadRequest()
|
||||
@@ -105,7 +107,7 @@ namespace BeWoLauncher.Utils.Download
|
||||
|
||||
FileController.SaveDZip(DownloadZipPath, Response.NewZipData);
|
||||
FileController.SaveInfo(DownloadZipPath, Response.NewZipInfo);
|
||||
FileController.SaveInfo(BeWoPaths.GetDownloadPath(), Response.LatestApplicationInfo);
|
||||
FileController.SaveInfo(BeWoPaths.GetRootPath().Combine("latest"), Response.LatestApplicationInfo);
|
||||
|
||||
Response.NewZipData = null;
|
||||
|
||||
@@ -141,6 +143,10 @@ namespace BeWoLauncher.Utils.Download
|
||||
DownloadFolder.ClearFolder();
|
||||
|
||||
ApplyFolder.Unlock();
|
||||
|
||||
apply(5, null);
|
||||
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
public void StartUninstall(Action<int, object> apply)
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace BeWoLauncher.View
|
||||
|
||||
public void SetFrame(FrameBase uc)
|
||||
{
|
||||
ClearFrame();
|
||||
contentGrid.Children.Add(uc);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
@@ -36,6 +37,8 @@ namespace BeWoLauncher.View.Frames
|
||||
/// </summary>
|
||||
public abstract partial class GenericProgressInfo : FrameBase
|
||||
{
|
||||
private static TimeSpan duration = TimeSpan.FromSeconds(1);
|
||||
|
||||
public readonly BackgroundWorker Worker = new BackgroundWorker();
|
||||
|
||||
private int lastStep = -1;
|
||||
@@ -48,7 +51,7 @@ namespace BeWoLauncher.View.Frames
|
||||
proBar1.Minimum = 0;
|
||||
proBar1.Maximum = 100;
|
||||
|
||||
proBar2.IsIndeterminate = true;
|
||||
proBar2.IsIndeterminate = false;
|
||||
proBar2.Minimum = 0;
|
||||
|
||||
Loaded += (s, e) => Start();
|
||||
@@ -85,7 +88,14 @@ namespace BeWoLauncher.View.Frames
|
||||
proBar2.Value++;
|
||||
}
|
||||
}
|
||||
public void Bar2Fill() => proBar2.Value = proBar2.Maximum;
|
||||
public void Bar2Hide() => proBar2.Visibility = Visibility.Collapsed;
|
||||
public void Bar2Show() => proBar2.Visibility = Visibility.Visible;
|
||||
|
||||
public void Bar2SetPercent(double percentage)
|
||||
{
|
||||
DoubleAnimation animation = new DoubleAnimation(percentage, duration);
|
||||
proBar2.BeginAnimation(ProgressBar.ValueProperty, animation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,25 +17,41 @@
|
||||
<CheckBox>Startmenüverknüpfung erstellen</CheckBox>
|
||||
</StackPanel>-->
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,0,0,0">
|
||||
<Label>Version:</Label>
|
||||
<Label x:Name="lblversion">1.0.0.0 t</Label>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,5,0,-2">
|
||||
<Label>Erforderlicher Festplattenspeicher:</Label>
|
||||
<Label x:Name="lblErforderlich">10.9 GB - t</Label>
|
||||
</StackPanel>
|
||||
<Grid DockPanel.Dock="Top" Margin="10,5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="3"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="3"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,-2,0,5">
|
||||
<Label>Verfügbarer Festplattenspeicher: </Label>
|
||||
<Label x:Name="lblVerfuegbar">20.0 GB - t</Label>
|
||||
</StackPanel>
|
||||
<Label Grid.Column="0" Grid.Row="0">Version:</Label>
|
||||
<Label Grid.Column="2" Grid.Row="0" x:Name="lblversion" Margin="10,0,0,0">1.0.0.0 t</Label>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="0,0,0,0" >Erforderlicher Festplattenspeicher:</Label>
|
||||
<Label Grid.Column="2" Grid.Row="2" x:Name="lblErforderlich" HorizontalAlignment="Right">10.9t</Label>
|
||||
<Label Grid.Column="3" Grid.Row="2" x:Name="lblErforderlichSize" HorizontalAlignment="Left">GB</Label>
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,-2,0,5">
|
||||
<Label>File Count: </Label>
|
||||
<Label x:Name="lblcount">80</Label>
|
||||
</StackPanel>
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="0,-5,0,0">Verfügbarer Festplattenspeicher:</Label>
|
||||
<Label Grid.Column="2" Grid.Row="3" Margin="0,-5,0,0" x:Name="lblVerfuegbar" HorizontalAlignment="Right">20.0t</Label>
|
||||
<Label Grid.Column="3" Grid.Row="3" Margin="0,-5,0,0" x:Name="lblVerfuegbarSize" HorizontalAlignment="Left">GB</Label>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="5">Nicht vorhandene Datei(en):</Label>
|
||||
<Label Grid.Column="2" Grid.Row="5" x:Name="lblcountnew" HorizontalAlignment="Right">80</Label>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="6" Margin="0,-5,0,0">Bereits vorhandene Datei(en):</Label>
|
||||
<Label Grid.Column="2" Grid.Row="6" Margin="0,-5,0,0" x:Name="lblcountalready" HorizontalAlignment="Right">80</Label>
|
||||
</Grid>
|
||||
|
||||
<StackPanel DockPanel.Dock="Bottom" VerticalAlignment="Bottom" HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Button Width="70" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0" Click="Button_Click">Abbrechen</Button>
|
||||
|
||||
@@ -37,8 +37,14 @@ namespace BeWoLauncher.View.Frames
|
||||
|
||||
InstallLocation = BeWoPaths.GetInstallLocationFromSettingOrDefault();
|
||||
|
||||
lblErforderlich.Content = NonspecificTools.SizeSuffix((ulong)DownloadController.Manager.ResponseInfo.DownloadSize);
|
||||
lblcount.Content = $"{DownloadController.Manager.ResponseInfo.NewFileCount} (T:{DownloadController.Manager.ResponseInfo.FileCount})";
|
||||
var size = NonspecificTools.SizeSuffix((ulong)DownloadController.Manager.ResponseInfo.DownloadSize).Split(' ');
|
||||
|
||||
lblErforderlich.Content = size[0];
|
||||
lblErforderlichSize.Content = size[1];
|
||||
|
||||
lblcountnew.Content = $"{DownloadController.Manager.ResponseInfo.NewFileCount}";
|
||||
lblcountalready.Content = $"{DownloadController.Manager.ResponseInfo.FileCount - DownloadController.Manager.ResponseInfo.NewFileCount}";
|
||||
|
||||
lblversion.Content = DownloadController.Manager.ResponseInfo.Version;
|
||||
}
|
||||
|
||||
@@ -50,13 +56,25 @@ namespace BeWoLauncher.View.Frames
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!endPathWithSubDir(value))
|
||||
value = Path.Combine(value, BeWoPathFileConfig.SubDirectory);
|
||||
|
||||
if (BeWoPaths.ChangePath(value))
|
||||
{
|
||||
if (!endPathWithSubDir(value))
|
||||
value = Path.Combine(value, BeWoPathFileConfig.SubDirectory);
|
||||
|
||||
txtLoc.Text = value;
|
||||
lblVerfuegbar.Content = DownloadController.UpdateDiskSpace(value);
|
||||
|
||||
var size2 = DownloadController.UpdateDiskSpace(BeWoPaths.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace BeWoLauncher.View.Frames
|
||||
public class InstallProgressInfoFrame : GenericProgressInfo
|
||||
{
|
||||
public event EventHandler InstallSuccessful;
|
||||
public event EventHandler InstallFailed;
|
||||
|
||||
|
||||
public DownloadManager Manager => DownloadController.Manager;
|
||||
|
||||
public InstallProgressInfoFrame() : base()
|
||||
@@ -52,10 +51,15 @@ namespace BeWoLauncher.View.Frames
|
||||
Thread.Sleep(1000);
|
||||
|
||||
DownloadController.Manager.StartDownload(skipLock);
|
||||
worker.ReportProgress(1);
|
||||
|
||||
worker.ReportProgress(10);
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
worker.ReportProgress(1);
|
||||
|
||||
Thread.Sleep(500);
|
||||
|
||||
DownloadController.Manager.StartApply(skipLock, worker.ReportProgress);
|
||||
}
|
||||
|
||||
@@ -67,59 +71,70 @@ namespace BeWoLauncher.View.Frames
|
||||
}
|
||||
else
|
||||
{
|
||||
Message = "BeWoPlaner wurde erfolgreich installiert!";
|
||||
SubMessage = "Starte BeWo...";
|
||||
|
||||
Thread.Sleep(500);
|
||||
|
||||
InstallSuccessful.Invoke(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
private void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
Bar2SetLimit(5);
|
||||
Bar2SetLimit(100);
|
||||
|
||||
if (e.ProgressPercentage == 0)
|
||||
{
|
||||
// Download begonnen
|
||||
|
||||
Message = "Installation wird vorbereitet...";
|
||||
SubMessage = "Lade benötigte Pakete herunter...";
|
||||
}
|
||||
else if (e.ProgressPercentage == 10)
|
||||
{
|
||||
// Download fertig
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
Message = "Download abgeschlossen!";
|
||||
SubMessage = "";
|
||||
|
||||
Bar2SetPercent(30);
|
||||
}
|
||||
else if (e.ProgressPercentage == 1)
|
||||
{
|
||||
// Installation beginnen
|
||||
|
||||
Message = "Installiere Pakete...";
|
||||
SubMessage = "";
|
||||
|
||||
Bar1Activate();
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
}
|
||||
else if (e.ProgressPercentage == 2)
|
||||
{
|
||||
// Installation Fortschritt
|
||||
|
||||
var args = e.UserState as FileEventArgs;
|
||||
SubMessage = $"{args.Name} wurde erfolgreich von {args.AbsolutePath} installiert!";
|
||||
|
||||
Bar1MakeStep();
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
}
|
||||
else if (e.ProgressPercentage == 3)
|
||||
{
|
||||
// Löschen begonnen
|
||||
|
||||
Bar1Deactivate();
|
||||
|
||||
Message = "Alte Dateien werden entfernt.";
|
||||
SubMessage = "";
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
Bar2SetPercent(75);
|
||||
}
|
||||
else if (e.ProgressPercentage == 4)
|
||||
{
|
||||
// Löschen Fortschrittt
|
||||
|
||||
var args = e.UserState as string;
|
||||
SubMessage = $"{args} wurde entfernt!";
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
}
|
||||
else if (e.ProgressPercentage == 5)
|
||||
{
|
||||
// Fertig mitm Löschen
|
||||
Bar2Fill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,25 +16,41 @@
|
||||
<CheckBox>Startmenüverknüpfung erstellen</CheckBox>
|
||||
</StackPanel>-->
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,0,0,0">
|
||||
<Label>Version:</Label>
|
||||
<Label x:Name="lblversion">1.0.0.0 t</Label>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,5,0,-2">
|
||||
<Label>Erforderlicher Festplattenspeicher:</Label>
|
||||
<Label x:Name="lblErforderlich">10.9t GB</Label>
|
||||
</StackPanel>
|
||||
<Grid DockPanel.Dock="Top" Margin="10,5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="3"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="3"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,-2,0,5">
|
||||
<Label>Verfügbarer Festplattenspeicher:</Label>
|
||||
<Label x:Name="lblVerfuegbar">20.0t GB</Label>
|
||||
</StackPanel>
|
||||
<Label Grid.Column="0" Grid.Row="0">Version:</Label>
|
||||
<Label Grid.Column="2" Grid.Row="0" x:Name="lblversion" Margin="10,0,0,0">1.0.0.0 t</Label>
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="10,0,0,0">
|
||||
<Label>File Count:</Label>
|
||||
<Label x:Name="lblcount">80</Label>
|
||||
</StackPanel>
|
||||
<Label Grid.Column="0" Grid.Row="2">Erforderlicher Festplattenspeicher:</Label>
|
||||
<Label Grid.Column="2" Grid.Row="2" x:Name="lblErforderlich" HorizontalAlignment="Right">10.9t</Label>
|
||||
<Label Grid.Column="3" Grid.Row="2" x:Name="lblErforderlichSize" HorizontalAlignment="Left">GB</Label>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="0,-5,0,0">Verfügbarer Festplattenspeicher:</Label>
|
||||
<Label Grid.Column="2" Grid.Row="3" Margin="0,-5,0,0" x:Name="lblVerfuegbar" HorizontalAlignment="Right">20.0t</Label>
|
||||
<Label Grid.Column="3" Grid.Row="3" Margin="0,-5,0,0" x:Name="lblVerfuegbarSize" HorizontalAlignment="Left">GB</Label>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="5">Nicht vorhandene Datei(en):</Label>
|
||||
<Label Grid.Column="2" Grid.Row="5" x:Name="lblcountnew" HorizontalAlignment="Right">80</Label>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="6" Margin="0,-5,0,0">Bereits vorhandene Datei(en):</Label>
|
||||
<Label Grid.Column="2" Grid.Row="6" Margin="0,-5,0,0" x:Name="lblcountalready" HorizontalAlignment="Right">80</Label>
|
||||
</Grid>
|
||||
|
||||
<StackPanel DockPanel.Dock="Bottom" VerticalAlignment="Bottom" HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Button Width="70" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0" Click="Button_Click">Abbrechen</Button>
|
||||
|
||||
@@ -33,9 +33,27 @@ namespace BeWoLauncher.View.Frames
|
||||
|
||||
BeWoPaths.ActualPlanerLocation = BeWoPaths.GetInstallLocationFromSetting();
|
||||
|
||||
lblErforderlich.Content = NonspecificTools.SizeSuffix((ulong)DownloadController.Manager.ResponseInfo.DownloadSize);
|
||||
lblcount.Content = $"{DownloadController.Manager.ResponseInfo.NewFileCount} (T:{DownloadController.Manager.ResponseInfo.FileCount})";
|
||||
lblVerfuegbar.Content = DownloadController.UpdateDiskSpace(BeWoPaths.ActualPlanerLocation);
|
||||
var size = NonspecificTools.SizeSuffix((ulong)DownloadController.Manager.ResponseInfo.DownloadSize).Split(' ');
|
||||
|
||||
lblErforderlich.Content = size[0];
|
||||
lblErforderlichSize.Content = size[1];
|
||||
|
||||
var size2 = DownloadController.UpdateDiskSpace(BeWoPaths.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;
|
||||
}
|
||||
|
||||
lblcountnew.Content = $"{DownloadController.Manager.ResponseInfo.NewFileCount}";
|
||||
lblcountalready.Content = $"{DownloadController.Manager.ResponseInfo.FileCount - DownloadController.Manager.ResponseInfo.NewFileCount}";
|
||||
|
||||
lblversion.Content = DownloadController.Manager.ResponseInfo.Version;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,10 +51,15 @@ namespace BeWoLauncher.View.Frames
|
||||
Thread.Sleep(1000);
|
||||
|
||||
DownloadController.Manager.StartDownload(skipLock);
|
||||
worker.ReportProgress(1);
|
||||
|
||||
worker.ReportProgress(10);
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
worker.ReportProgress(1);
|
||||
|
||||
Thread.Sleep(500);
|
||||
|
||||
DownloadController.Manager.StartApply(skipLock, worker.ReportProgress);
|
||||
}
|
||||
|
||||
@@ -66,57 +71,71 @@ namespace BeWoLauncher.View.Frames
|
||||
}
|
||||
else
|
||||
{
|
||||
Message = "BeWoPlaner wurde erfolgreich aktualisiert!";
|
||||
SubMessage = "Starte BeWo...";
|
||||
|
||||
Thread.Sleep(500);
|
||||
|
||||
UpdateSuccessful.Invoke(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
private void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
Bar2SetLimit(5);
|
||||
Bar2SetLimit(100);
|
||||
|
||||
if (e.ProgressPercentage == 0)
|
||||
{
|
||||
// Download begonnen
|
||||
|
||||
Message = "Update wird vorbereitet...";
|
||||
SubMessage = "Lade benötigte Pakete herunter...";
|
||||
}
|
||||
else if (e.ProgressPercentage == 10)
|
||||
{
|
||||
// Download fertig
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
Message = "Download abgeschlossen!";
|
||||
SubMessage = "";
|
||||
|
||||
Bar2SetPercent(30);
|
||||
}
|
||||
else if (e.ProgressPercentage == 1)
|
||||
{
|
||||
// Installation beginnen
|
||||
|
||||
Message = "Aktualisiere Pakete...";
|
||||
SubMessage = "";
|
||||
|
||||
Bar1Activate();
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
}
|
||||
else if (e.ProgressPercentage == 2)
|
||||
{
|
||||
// Installation Fortschritt
|
||||
|
||||
var args = e.UserState as FileEventArgs;
|
||||
SubMessage = $"{args.Name} wurde erfolgreich von {args.AbsolutePath} installiert!";
|
||||
|
||||
Bar1MakeStep();
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
}
|
||||
else if (e.ProgressPercentage == 3)
|
||||
{
|
||||
Bar2Deactivate();
|
||||
// Löschen begonnen
|
||||
|
||||
Bar1Deactivate();
|
||||
|
||||
Message = "Alte Dateien werden entfernt.";
|
||||
SubMessage = "";
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
Bar2SetPercent(75);
|
||||
}
|
||||
else if (e.ProgressPercentage == 4)
|
||||
{
|
||||
// Löschen Fortschrittt
|
||||
|
||||
var args = e.UserState as string;
|
||||
SubMessage = $"{args} wurde entfernt!";
|
||||
}
|
||||
else if (e.ProgressPercentage == 5)
|
||||
{
|
||||
// Fertig mitm Löschen
|
||||
|
||||
Bar2MakeStep(e.ProgressPercentage);
|
||||
Bar2Fill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
</security>
|
||||
<readerQuotas maxStringContentLength="2147483647" />
|
||||
</binding>
|
||||
<binding name="TransportSecurityStreaming" maxBufferSize="65536" maxReceivedMessageSize="2147483647" messageEncoding="Mtom" transferMode="StreamedResponse">
|
||||
<binding name="TransportSecurityStreaming" maxBufferSize="65536" maxReceivedMessageSize="2147483647" messageEncoding="Text" transferMode="StreamedRequest">
|
||||
<security mode="None">
|
||||
<transport clientCredentialType="None" />
|
||||
</security>
|
||||
|
||||
@@ -24,9 +24,15 @@ namespace BS.SharedLauncher.DataContract
|
||||
[DataMember]
|
||||
public byte[] NewZipData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Nur neue Dateien
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public PlanerPackageInfoDC NewZipInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Alle Dateien aus der letzten Version
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public PlanerPackageInfoDC LatestApplicationInfo { get; set; }
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace BS.SharedLauncher.Information
|
||||
public string Servername { get; set; }
|
||||
public string CoreServerAddress { get; set; }
|
||||
public string ChatServerAddress { get; set; }
|
||||
public string Version { get; set; }
|
||||
|
||||
public static Connection Parse(string input)
|
||||
{
|
||||
@@ -30,6 +31,7 @@ namespace BS.SharedLauncher.Information
|
||||
connection.IpAddress = data[3];
|
||||
connection.Servername = data[4];
|
||||
connection.ChatServerAddress = data[5];
|
||||
connection.Version = data[6];
|
||||
|
||||
return connection;
|
||||
}
|
||||
@@ -53,7 +55,7 @@ namespace BS.SharedLauncher.Information
|
||||
public override string ToString()
|
||||
{
|
||||
return
|
||||
$"te{Tenant}?un{Username}?pw{Password}?ip{IpAddress}?sn{Servername}?cs{ChatServerAddress}";
|
||||
$"te{Tenant}?un{Username}?pw{Password}?ip{IpAddress}?sn{Servername}?cs{ChatServerAddress}?vr{Version}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,6 +116,12 @@ namespace BS.SharedLauncher.Information
|
||||
set { Connection.Username = value; }
|
||||
}
|
||||
|
||||
public static string Version
|
||||
{
|
||||
get { return Connection.Version; }
|
||||
set { Connection.Version = value; }
|
||||
}
|
||||
|
||||
public static string LauncherServerAddress
|
||||
{
|
||||
get { return Connection.LauncherServerAddress; }
|
||||
|
||||
@@ -106,6 +106,10 @@ namespace BS.SharedLauncher.Logic
|
||||
{
|
||||
File.WriteAllText(path.WithInfoExtension(), XmlConverter.Serialize<T>(t));
|
||||
}
|
||||
public static void DeleteInfo(string path)
|
||||
{
|
||||
File.Delete(path.WithInfoExtension());
|
||||
}
|
||||
public static PlanerPackageInfoDC LoadInfo(string filepath)
|
||||
{
|
||||
filepath = filepath.WithInfoExtension();
|
||||
@@ -210,6 +214,7 @@ namespace BS.SharedLauncher.Logic
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(dirPath);
|
||||
using (FileStream fs = File.Create(
|
||||
Path.Combine(
|
||||
dirPath,
|
||||
|
||||
Reference in New Issue
Block a user