diff --git a/BeWoLauncher/App.config b/BeWoLauncher/App.config
index 7378a93aa..c31e50375 100644
--- a/BeWoLauncher/App.config
+++ b/BeWoLauncher/App.config
@@ -63,6 +63,9 @@
False
+
+ False
+
\ No newline at end of file
diff --git a/BeWoLauncher/BeWoLauncher.csproj b/BeWoLauncher/BeWoLauncher.csproj
index 149fc8910..13415c298 100644
--- a/BeWoLauncher/BeWoLauncher.csproj
+++ b/BeWoLauncher/BeWoLauncher.csproj
@@ -14,7 +14,7 @@
4
true
false
- D:\Test\Launcher\
+ C:\Test\Launcher\
true
Disk
false
@@ -25,7 +25,7 @@
false
true
true
- 1
+ 2
1.0.0.%2a
false
true
diff --git a/BeWoLauncher/LauncherApp.xaml.cs b/BeWoLauncher/LauncherApp.xaml.cs
index a9198e1c7..05fb2afd5 100644
--- a/BeWoLauncher/LauncherApp.xaml.cs
+++ b/BeWoLauncher/LauncherApp.xaml.cs
@@ -81,6 +81,8 @@ namespace BeWoLauncher
}
public static void ShowError(string message, string ex, bool showDetails)
{
+ ViewController.EndWaiting();
+
if (ViewController.CurrentWindow is null)
{
MessageBox.Show(ex, message);
diff --git a/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs b/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs
index 25b0a61f2..8700ae914 100644
--- a/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs
+++ b/BeWoLauncher/Logic/Behavior/LaunchBehavior.cs
@@ -4,6 +4,7 @@ using BeWoLauncher.Logic.Utils;
using BS.SharedLauncher.Extensions;
using BS.SharedLauncher.Information;
using System;
+using System.IO;
using System.Threading.Tasks;
using static BeWoLauncher.Logic.Controller.ViewController;
@@ -18,10 +19,7 @@ namespace BeWoLauncher.Logic.Behavior
}
- ///
- /// Waiting aktiv, Nutzer wurde erfolgreich angemeldet
- ///
- public void LaunchUpdatePhase()
+ public void LoginSuccessful()
{
#region confirm demo
#if DEBUG
@@ -39,60 +37,94 @@ namespace BeWoLauncher.Logic.Behavior
#endif
#endregion
- var path = LauncherPaths.GetInstallLocationFromSetting();
+ DownloadController.Start(LauncherPaths.GetLoggerPath());
- LauncherPaths.ActualPlanerLocation = path;
+ var planer_location_set = LauncherAppdataConfig.GetInstallLocationSetSuccess();
- if (!string.IsNullOrWhiteSpace(path) && !CheckForPermissions(path))
+ var path_to_check = planer_location_set
+ ? LauncherAppdataConfig.GetPlanerLocation()
+ : LauncherPaths.GetPlanerLocationFromSettingOrDefault();
+
+ var check = IsDirectoryWritable(path_to_check);
+
+ if (!check)
{
- ViewBehavior.ShowNoPermissions(path);
+ ViewBehavior.ShowNoPermissions(path_to_check);
+ return;
+ }
+
+ LauncherPaths.PlanerLocation = path_to_check;
+
+ if (planer_location_set)
+ {
+ if (UninstallMode)
+ {
+ // optional: Hier kann man ggf zusatzlich prüfen, ob InstallLocationSetSuccess gesetzt ist
+ // Ziel: Erweiterte Fehler/Rechte Erkennung
+ StartUninstallInfoPhase();
+ }
+ else
+ {
+ StartUpdateInfoPhase();
+ }
}
else
{
- DownloadController.Start();
-
- if (UninstallMode)
- LaunchUninstall();
- else
- LoadUpdates();
+ // Install
+ StartInstallInfoPhase();
}
EndWaiting();
}
- public void LaunchUninstall()
+ public void StartInstallInfoPhase()
{
- DownloadController.GetDeletePlan();
- ViewBehavior.ShowUninstallInfo();
- }
+ var error = DownloadController.TryLoadInstallPlan();
- public void LoadUpdates()
- {
- var handled = DownloadController.GetUpdatePlan();
-
- if (handled)
- return;
-
- if (DownloadController.CanQuickStartLauncher())
+ if(error is null)
{
- if (DownloadController.DoesPlanerExeExists())
- {
- GenericTextLogger.Post("Launcher ist aktuell oder Download Server nicht erreichbar.");
-
- ViewBehavior.ShowLoading();
- }
- else
- {
- GenericTextLogger.Post("BewoPlaner.exe nicht gefunden.");
-
- ViewBehavior.ShowError("BewoPlaner.exe nicht gefunden.");
- }
+ ViewBehavior.ShowInfo(false);
}
else
{
- GenericTextLogger.Post("Launcher hat etwas zu tun.");
+ GenericTextLogger.Post(error);
- ViewBehavior.ShowInfo();
+ ViewBehavior.ShowError(error);
+ }
+ }
+
+ public void StartUpdateInfoPhase()
+ {
+ var error = DownloadController.TryLoadUpdatePlan(out bool can_quick_start);
+
+ if (error is null)
+ {
+ if (can_quick_start)
+ ViewBehavior.ShowLoading();
+ else
+ ViewBehavior.ShowInfo(true);
+ }
+ else
+ {
+ GenericTextLogger.Post(error);
+
+ ViewBehavior.ShowError(error);
+ }
+ }
+
+ public void StartUninstallInfoPhase()
+ {
+ var error = DownloadController.TryLoadUninstallPlan();
+
+ if (error is null)
+ {
+ ViewBehavior.ShowUninstallInfo();
+ }
+ else
+ {
+ GenericTextLogger.Post(error);
+
+ ViewBehavior.ShowError(error);
}
}
diff --git a/BeWoLauncher/Logic/Behavior/ViewSwitchBehavior.cs b/BeWoLauncher/Logic/Behavior/ViewSwitchBehavior.cs
index b8bc530b9..e1f2a2660 100644
--- a/BeWoLauncher/Logic/Behavior/ViewSwitchBehavior.cs
+++ b/BeWoLauncher/Logic/Behavior/ViewSwitchBehavior.cs
@@ -64,12 +64,11 @@ namespace BeWoLauncher.Logic.Behavior
CurrentFrame = ViewController.ViewBuilder.GetNewFrame(ft);
}
- public void ShowInfo()
+ public void ShowInfo(bool is_update)
{
ViewController.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
- if (LauncherAppdataConfig.GetFirstInstallationSuccess() &&
- File.Exists(LauncherPaths.GetPlanerExePath()))
+ if (is_update)
{
ShowFrame(FrameType.UpdateInfo);
}
@@ -134,18 +133,16 @@ namespace BeWoLauncher.Logic.Behavior
}
public void LoginSuccessful(object sender, EventArgs e)
{
- Task.Run(() => ViewController.LaunchBehavior.LaunchUpdatePhase());
+ Task.Run(() => ViewController.LaunchBehavior.LoginSuccessful());
}
public void InstallInfoAccept(object sender, EventArgs e)
{
var install = sender as InstallInfoFrame;
- if (CheckForPermissions(install.InstallLocation))
+ if (IsDirectoryWritable(install.InstallLocation))
{
- DownloadController.InitLogger();
LauncherPaths.SetAndSaveInstallLocation(install.InstallLocation);
- LauncherAppdataConfig.SetFirstInstallationSuccess(true);
ShowFrame(FrameType.InstallProgress);
}
else
diff --git a/BeWoLauncher/Logic/Controller/DownloadController.cs b/BeWoLauncher/Logic/Controller/DownloadController.cs
index a2b24e33d..a4cca168b 100644
--- a/BeWoLauncher/Logic/Controller/DownloadController.cs
+++ b/BeWoLauncher/Logic/Controller/DownloadController.cs
@@ -2,6 +2,7 @@
using BeWoLauncher.Logic.Utils.Download;
using BS.SharedLauncher.Extensions;
using BS.SharedLauncher.Information;
+using BS.SharedLauncher.Logic;
using BS.SharedLauncher.Utils;
using System;
using System.IO;
@@ -18,30 +19,29 @@ namespace BeWoLauncher.Logic.Controller
static DownloadController()
{
-
+
}
- public static void Start()
+ public static void Start(string logger_path = null)
{
Manager = new DownloadManager();
- if (LauncherAppdataConfig.GetFirstInstallationSuccess())
- InitLogger();
+ if (!string.IsNullOrEmpty(logger_path))
+ {
+ GenericTextLogger.Init(logger_path);
+ }
}
- public static void InitLogger()
+ ///
+ ///
+ ///
+ /// Error string - null if successful
+ public static string TryLoadInstallPlan()
{
- GenericTextLogger.Init(LauncherPaths.GetLoggerPath());
- }
+ GenericTextLogger.PostImportantInfo("Starting Install Process");
- public static bool GetUpdatePlan()
- {
- GenericTextLogger.PostImportantInfo("Starting Update Process");
-
- Manager.CheckForConnection();
-
- if (!Manager.IsDownloadServerUp)
- return false;
+ if (!CheckConnection())
+ return "Download server is down";
try
{
@@ -55,24 +55,78 @@ namespace BeWoLauncher.Logic.Controller
GenericTextLogger.Post($"Anfrage wurde erfolgreich verarbeitet. Server gibt Version {client_version} vor.");
- SessionInformation.Session.Version = client_version;
+ return null;
}
else
{
- GenericTextLogger.Post($"Server gibt Fehler zurück. Fehler: {response.Error}");
-
- ViewController.ShowError(response.Error);
-
- return true;
+ return $"Server gibt Fehler zurück. Fehler: {response.Error}";
}
}
- catch(Exception e)
+ catch (Exception e)
{
- ViewController.ShowError(e);
- return true;
+ return e.ToString();
+ }
+ }
+
+ public static string TryLoadUpdatePlan(out bool can_quick_start)
+ {
+ GenericTextLogger.PostImportantInfo($"Starting Update Process");
+
+ can_quick_start = false;
+
+ if (!CheckConnection())
+ {
+ if (DoesPlanerExeExists())
+ {
+ can_quick_start = true;
+
+ return null;
+ }
+ else
+ {
+ return "Download server is down & quickstart not possible";
+ }
}
- return false;
+ try
+ {
+ Manager.GetUpdatePlan();
+
+ var response = Manager.UpdatePlanResponse;
+
+ if (response.Successful)
+ {
+ var client_version = response.CurrentPackage.Version;
+
+ GenericTextLogger.Post($"Anfrage wurde erfolgreich verarbeitet. Server gibt Version {client_version} vor.");
+
+ if (!response.HasToDo())
+ can_quick_start = true;
+
+ return null;
+ }
+ else
+ {
+ return $"Server gibt Fehler zurück. Fehler: {response.Error}";
+ }
+ }
+ catch (Exception e)
+ {
+ return e.ToString();
+ }
+ }
+
+ public static string TryLoadUninstallPlan()
+ {
+ try
+ {
+ Manager.GetDeletePlan();
+ return null;
+ }
+ catch (Exception e)
+ {
+ return e.ToString();
+ }
}
public static bool DoesPlanerExeExists()
@@ -86,28 +140,7 @@ namespace BeWoLauncher.Logic.Controller
}
- return false;
- }
- public static void GetDeletePlan()
- {
- Manager.GetDeletePlan();
- }
-
- public static bool CanQuickStartLauncher()
- {
- try
- {
- if (!Manager.IsDownloadServerUp)
- return true;
-
- if (!Manager.UpdatePlanResponse.HasToDo())
- return true;
- }
- catch
- {
-
- }
return false;
}
@@ -123,5 +156,17 @@ namespace BeWoLauncher.Logic.Controller
else
return "error";
}
+
+ private static bool CheckConnection()
+ {
+ GenericTextLogger.Post("Checking download server connection...");
+ var check = Manager.CheckForConnection();
+ if (check)
+ GenericTextLogger.Post("Download server is up");
+ else
+ GenericTextLogger.Post("Download server is down");
+
+ return check;
+ }
}
}
diff --git a/BeWoLauncher/Logic/Controller/ViewController.cs b/BeWoLauncher/Logic/Controller/ViewController.cs
index 6c540dd9f..af1e21ff9 100644
--- a/BeWoLauncher/Logic/Controller/ViewController.cs
+++ b/BeWoLauncher/Logic/Controller/ViewController.cs
@@ -80,9 +80,9 @@ namespace BeWoLauncher.Logic.Controller
public static void StartWaiting() => CurrentWindow.StartWaiting();
public static void EndWaiting() => CurrentWindow.EndWaiting();
- public static bool CheckForPermissions(string path)
+ public static bool IsDirectoryWritable(string path)
{
- return FileController.IsDirectoryWritable(path, false);
+ return FileController.IsDirectoryWritable(path);
}
public static void CheckForAutoLogin(object sender, EventArgs e)
{
diff --git a/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs b/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs
index d8efc521d..34cef8fb6 100644
--- a/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs
+++ b/BeWoLauncher/Logic/Utils/Download/DownloadManager.cs
@@ -61,7 +61,7 @@ namespace BeWoLauncher.Logic.Utils.Download
{
UpdatePlanResponse = new UpdatePlanResponse();
- if (LauncherPaths.ActualPlanerLocation.Exists())
+ if (LauncherPaths.PlanerLocation.Exists())
{
if (ApplyFolder.Exists())
if (!ApplyFolder.IsFolderEmpty())
@@ -221,7 +221,7 @@ namespace BeWoLauncher.Logic.Utils.Download
{
UpdatePlanRequest = new UpdatePlanRequest();
- if (UpdatePlanRequest.PlanerRootFolderExists = LauncherPaths.ActualPlanerLocation.Exists())
+ if (UpdatePlanRequest.PlanerRootFolderExists = LauncherPaths.PlanerLocation.Exists())
{
if (UpdatePlanRequest.DownloadFolderExists = DownloadFolder.Exists())
if (!(UpdatePlanRequest.DownloadFolderIsEmpty = DownloadFolder.IsFolderEmpty()))
@@ -254,7 +254,7 @@ namespace BeWoLauncher.Logic.Utils.Download
UpdatePlanResponse = LauncherServiceFacade.DoDownloadBeWoServiceSyncWithException(x => x.GetUpdatePlan(UpdatePlanRequest));
}
- public void CheckForConnection()
+ public bool CheckForConnection()
{
bool test_connection = false;
@@ -268,6 +268,8 @@ namespace BeWoLauncher.Logic.Utils.Download
}
IsDownloadServerUp = test_connection;
+
+ return test_connection;
}
}
}
diff --git a/BeWoLauncher/Logic/Utils/LauncherAppdataConfig.cs b/BeWoLauncher/Logic/Utils/LauncherAppdataConfig.cs
index 81d3f4e92..d91363dc5 100644
--- a/BeWoLauncher/Logic/Utils/LauncherAppdataConfig.cs
+++ b/BeWoLauncher/Logic/Utils/LauncherAppdataConfig.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -8,17 +9,39 @@ namespace BeWoLauncher.Logic.Utils
{
public static class LauncherAppdataConfig
{
- public static string GetInstallLocation()
+ private static string _Location;
+
+ public static string Location
{
- return Properties.Settings.Default.InstallLocation;
+ get => _Location ?? (_Location = GetLauncherAppdataConfigLocation());
+ set { _Location = value; }
}
- public static void SetInstallLocation(string path)
+
+ public static string GetPlanerLocation()
+ {
+ var path = Properties.Settings.Default.InstallLocation;
+
+ return string.IsNullOrWhiteSpace(path) ? null : path;
+ }
+
+ public static void SetPlanerLocation(string path)
{
Properties.Settings.Default.InstallLocation = path;
Properties.Settings.Default.Save();
}
+ public static bool GetInstallLocationSetSuccess()
+ {
+ return Properties.Settings.Default.InstallLocationSetSuccess;
+ }
+
+ public static void SetInstallLocationSetSuccess(bool b)
+ {
+ Properties.Settings.Default.InstallLocationSetSuccess = b;
+ Properties.Settings.Default.Save();
+ }
+
public static bool GetFirstInstallationSuccess()
{
return Properties.Settings.Default.FirstInstallationSuccess;
@@ -29,5 +52,18 @@ namespace BeWoLauncher.Logic.Utils
Properties.Settings.Default.FirstInstallationSuccess = b;
Properties.Settings.Default.Save();
}
+
+ private static string GetLauncherAppdataConfigLocation()
+ {
+ try
+ {
+ var UserConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);
+ return UserConfig.FilePath;
+ }
+ catch (ConfigurationException e)
+ {
+ return e.Filename;
+ }
+ }
}
}
diff --git a/BeWoLauncher/Logic/Utils/LauncherPaths.cs b/BeWoLauncher/Logic/Utils/LauncherPaths.cs
index 2bdad947a..d951f3631 100644
--- a/BeWoLauncher/Logic/Utils/LauncherPaths.cs
+++ b/BeWoLauncher/Logic/Utils/LauncherPaths.cs
@@ -19,16 +19,16 @@ namespace BeWoLauncher.Logic.Utils
//private static readonly string versionXml = "bewo.version";
public static string LoginSelectionPlanerLocation { get; set; }
- public static string ActualPlanerLocation { get; set; }
+ public static string PlanerLocation { get; set; }
///
/// Holt den Install Ort aus den Properties Settings.
/// Sollte dieser nicht verfügbar sein, wird als default - "CurrentBaseDir"/BeWoPlaner - verwendet
///
///
- public static string GetInstallLocationFromSettingOrDefault()
+ public static string GetPlanerLocationFromSettingOrDefault()
{
- var installLocation = GetInstallLocationFromSetting();
+ var installLocation = GetPlanerLocationFromSetting();
if (string.IsNullOrWhiteSpace(installLocation))
{
@@ -38,9 +38,9 @@ namespace BeWoLauncher.Logic.Utils
return installLocation;
}
- public static string GetInstallLocationFromSetting()
+ public static string GetPlanerLocationFromSetting()
{
- return LauncherAppdataConfig.GetInstallLocation();
+ return LauncherAppdataConfig.GetPlanerLocation();
}
///
@@ -71,18 +71,19 @@ namespace BeWoLauncher.Logic.Utils
public static void SetAndSaveInstallLocation(string path)
{
- ActualPlanerLocation = path;
+ PlanerLocation = path;
- LauncherAppdataConfig.SetInstallLocation(path);
+ LauncherAppdataConfig.SetPlanerLocation(path);
+ LauncherAppdataConfig.SetInstallLocationSetSuccess(true);
}
public static string GetRootPath()
{
- return ActualPlanerLocation;
+ return PlanerLocation;
}
public static string GetLoggerPath()
{
- return Path.Combine(new string[] { GetRootPath(), "log" });
+ return Path.Combine(new string[] { LauncherAppdataConfig.Location, "log" });
}
public static string GetDownloadPath()
{
diff --git a/BeWoLauncher/Properties/Settings.Designer.cs b/BeWoLauncher/Properties/Settings.Designer.cs
index 3dbb00994..0f2035207 100644
--- a/BeWoLauncher/Properties/Settings.Designer.cs
+++ b/BeWoLauncher/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace BeWoLauncher.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -46,5 +46,17 @@ namespace BeWoLauncher.Properties {
this["FirstInstallationSuccess"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool InstallLocationSetSuccess {
+ get {
+ return ((bool)(this["InstallLocationSetSuccess"]));
+ }
+ set {
+ this["InstallLocationSetSuccess"] = value;
+ }
+ }
}
}
diff --git a/BeWoLauncher/Properties/Settings.settings b/BeWoLauncher/Properties/Settings.settings
index f4fc75103..9d49f8a1d 100644
--- a/BeWoLauncher/Properties/Settings.settings
+++ b/BeWoLauncher/Properties/Settings.settings
@@ -8,5 +8,8 @@
False
+
+ False
+
\ No newline at end of file
diff --git a/BeWoLauncher/View/Components/ProxyLoginView.xaml b/BeWoLauncher/View/Components/ProxyLoginView.xaml
index 766ca6191..ee2e581be 100644
--- a/BeWoLauncher/View/Components/ProxyLoginView.xaml
+++ b/BeWoLauncher/View/Components/ProxyLoginView.xaml
@@ -2,6 +2,7 @@
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:markup="clr-namespace:BeWoLauncher.MultiLanguage.Markup"
Title="Proxy Einstellungen" Height="200" Width="300">
@@ -9,8 +10,8 @@
-
-
+
+
diff --git a/BeWoLauncher/View/Components/PwVergessenView.xaml b/BeWoLauncher/View/Components/PwVergessenView.xaml
index 8dfa7efd2..32a6e750d 100644
--- a/BeWoLauncher/View/Components/PwVergessenView.xaml
+++ b/BeWoLauncher/View/Components/PwVergessenView.xaml
@@ -2,6 +2,7 @@
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:markup="clr-namespace:BeWoLauncher.MultiLanguage.Markup"
Title="PwVergessenView" Height="135" Width="322" WindowStartupLocation="CenterScreen" WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
@@ -18,9 +19,9 @@
-
-
-
+
+
+
diff --git a/BeWoLauncher/View/Components/PwVergessenView.xaml.cs b/BeWoLauncher/View/Components/PwVergessenView.xaml.cs
index 98382b38a..1cc659f96 100644
--- a/BeWoLauncher/View/Components/PwVergessenView.xaml.cs
+++ b/BeWoLauncher/View/Components/PwVergessenView.xaml.cs
@@ -27,7 +27,7 @@ namespace BeWoLauncher.Components
var benutzername = BenutzernamenTextBox.Text;
if (benutzername.Equals(""))
{
- MessageBox.Show("Bitte geben Sie einen Benutzernamen an", "Passwort anfordern fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Information);
+ MessageBox.Show("Bitte geben Sie einen " + BS.SharedLauncher.Translation.Translator.Translate("Benutzernamen") + " an", "Passwort anfordern fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
@@ -38,7 +38,7 @@ namespace BeWoLauncher.Components
{
if(email.Equals("") || !hatEmail)
{
- MessageBox.Show("Es konnte kein Benutzer mit diesem Namen gefunden werden oder der Benutzer hat keine E-Mail Adresse hinterlegt\nBitte wenden Sie sich an Ihren Systemadministrator", "Passwort anfordern fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Information);
+ MessageBox.Show("Es konnte " + BS.SharedLauncher.Translation.Translator.Translate("kein Benutzer") + " mit diesem Namen gefunden werden oder " + BS.SharedLauncher.Translation.Translator.Translate("der Benutzer") + " hat keine E-Mail Adresse hinterlegt\nBitte wenden Sie sich an " + BS.SharedLauncher.Translation.Translator.Translate("Ihren Systemadministrator") + ".", "Passwort anfordern fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
diff --git a/BeWoLauncher/View/Frames/InstallInfoFrame.xaml.cs b/BeWoLauncher/View/Frames/InstallInfoFrame.xaml.cs
index dc84340c5..b616c6406 100644
--- a/BeWoLauncher/View/Frames/InstallInfoFrame.xaml.cs
+++ b/BeWoLauncher/View/Frames/InstallInfoFrame.xaml.cs
@@ -21,7 +21,7 @@ namespace BeWoLauncher.View.Frames
{
InitializeComponent();
- InstallLocation = LauncherPaths.GetInstallLocationFromSettingOrDefault();
+ InstallLocation = LauncherPaths.PlanerLocation;
var size = NonspecificTools.SizeSuffix((ulong)DownloadController.Manager.UpdatePlanResponse.DownloadSize).Split(' ');
diff --git a/BeWoLauncher/View/Frames/UpdateInfoFrame.xaml.cs b/BeWoLauncher/View/Frames/UpdateInfoFrame.xaml.cs
index fc2cb2cd9..ccc507982 100644
--- a/BeWoLauncher/View/Frames/UpdateInfoFrame.xaml.cs
+++ b/BeWoLauncher/View/Frames/UpdateInfoFrame.xaml.cs
@@ -31,14 +31,12 @@ namespace BeWoLauncher.View.Frames
{
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(' ');
+ var size2 = DownloadController.UpdateDiskSpace(LauncherPaths.PlanerLocation).Split(' ');
if(size2.Length > 1)
{
diff --git a/BeWoLauncher/View/LoginView.xaml b/BeWoLauncher/View/LoginView.xaml
index 78edd32b3..37e02f0b3 100644
--- a/BeWoLauncher/View/LoginView.xaml
+++ b/BeWoLauncher/View/LoginView.xaml
@@ -173,10 +173,10 @@
-
+
- www.beyondsoft.de
+ www.ownsoft.de
diff --git a/BeWoLauncher/View/LoginView.xaml.cs b/BeWoLauncher/View/LoginView.xaml.cs
index b605f386b..82bf54a9b 100644
--- a/BeWoLauncher/View/LoginView.xaml.cs
+++ b/BeWoLauncher/View/LoginView.xaml.cs
@@ -6,7 +6,7 @@ using BeWoLauncher.ServiceProxy;
using BeWoLauncher.WindowImp;
using BS.SharedLauncher.Enums;
using BS.SharedLauncher.Information;
-
+using BS.SharedLauncher.Translation;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -335,7 +335,7 @@ namespace BeWoLauncher.View
if (DateTime.Now > dt)
dt = DateTime.Now;
- txtCopyright.Text = String.Format("Copyright {0:yyyy} | beyondSoft GmbH", dt);
+ txtCopyright.Text = String.Format("Copyright {0:yyyy} | ownSoft GmbH", dt);
var checkPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\profiles.txt";
if (File.Exists(checkPath))
@@ -1056,7 +1056,16 @@ namespace BeWoLauncher.View
this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
{
ViewController.EndWaiting();
- MessageBox.Show("Anmeldeinformationen nicht bekannt. Bitte überprüfen Sie den Benutzernamen und das Passwort!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
+ MessageBox.Show("Anmeldeinformationen nicht bekannt. Bitte überprüfen Sie den " + BS.SharedLauncher.Translation.Translator.Translate("Benutzernamen") + " und das Passwort!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
+ });
+ }
+ if (result == UserValidationResult.EmployeeDeleted)
+ {
+ this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
+ {
+ ViewController.EndWaiting();
+ MessageBox.Show("Der zugeordnete Mitarbeiterdatensatz wurde gelöscht oder archiviert! Anmeldung nicht möglich.", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
+ MessageBox.Show("Der zugeordnete " + Translator.Translate("Mitarbeiterdatensatz") + " wurde gelöscht oder archiviert! Anmeldung nicht möglich.", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
});
}
if (result == UserValidationResult.TenantUnknown)
@@ -1214,6 +1223,7 @@ namespace BeWoLauncher.View
});
}
}
+
public void ClickLogin() => button_login_Click(this, new RoutedEventArgs());
}
}
diff --git a/Service/ServiceImplementations/LauncherServiceImp.cs b/Service/ServiceImplementations/LauncherServiceImp.cs
index b06938787..639411814 100644
--- a/Service/ServiceImplementations/LauncherServiceImp.cs
+++ b/Service/ServiceImplementations/LauncherServiceImp.cs
@@ -47,6 +47,7 @@ namespace BeWo.Service.ServiceImplementations
{ BS.Shared.UserValidationResult.UnkownError, BS.SharedLauncher.Enums.UserValidationResult.UnknownError},
{ BS.Shared.UserValidationResult.UserValid, BS.SharedLauncher.Enums.UserValidationResult.UserValid},
{ BS.Shared.UserValidationResult.UserValidTwoFactorAuthenticationNeeded, BS.SharedLauncher.Enums.UserValidationResult.UnknownError},
+ { BS.Shared.UserValidationResult.EmployeeDeleted, BS.SharedLauncher.Enums.UserValidationResult.EmployeeDeleted},
};
public PasswordValidationResult CheckPassword(long userOid, string pOldPassword, string pNewPassword)
diff --git a/SharedLauncher/LauncherEnums.cs b/SharedLauncher/LauncherEnums.cs
index ceba34d1f..06889183a 100644
--- a/SharedLauncher/LauncherEnums.cs
+++ b/SharedLauncher/LauncherEnums.cs
@@ -16,7 +16,9 @@ namespace BS.SharedLauncher.Enums
IncorrectPin = 4,
PinExpired = 5,
PinAlreadyUsed = 6,
- PasswordExpired = 7
+ PasswordExpired = 7,
+ EmployeeDeleted = 8,
+ UserValidTwoFactorAuthenticationNeeded = 9
}
public enum LauncherPasswortSecurityStrength
diff --git a/SharedLauncher/Logic/FileController.cs b/SharedLauncher/Logic/FileController.cs
index 58531b2c4..224d28e95 100644
--- a/SharedLauncher/Logic/FileController.cs
+++ b/SharedLauncher/Logic/FileController.cs
@@ -182,7 +182,7 @@ namespace BS.SharedLauncher.Logic
catch (Exception e)
{
if (throwIfFails)
- throw;
+ throw e;
else
return false;
}