Refined Offline detection even more
This commit is contained in:
parent
f846790764
commit
12ce5a114d
@ -964,12 +964,16 @@ namespace ZKuP
|
||||
|
||||
return true;
|
||||
}
|
||||
else if(!SQL.isOnline && SQL.isOnline != lastConn)
|
||||
else if (!SQL.isOnline && SQL.isOnline != lastConn)
|
||||
{
|
||||
|
||||
//await Log.WriteLog(conn.Message);
|
||||
|
||||
if (!Helper.IsVPNConnected())
|
||||
if(Helper.IsVPNConnected())
|
||||
{
|
||||
MessageBox.Show($"Verbindung zum Server konnte nicht hergestellt werden", "Fehler", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error);
|
||||
}
|
||||
else if (!Helper.IsVPNConnected())
|
||||
{
|
||||
if (connMsg)
|
||||
{
|
||||
@ -977,11 +981,8 @@ namespace ZKuP
|
||||
|
||||
MessageBox.Show("Sie haben keine Verbindung zur Datenbank und das DB VPN 'Ivanti Secure Access (ehem. Pulse Secure)' ist nicht verbunden\n\n" +
|
||||
"Befinden Sie sich außerhalb des BKU Netzes, bitte die Verbindung zum VPN sicherstellen\n\n" +
|
||||
"Nach Herstellen der Verbindung erneut starten\n", "VPN verbunden?", MessageBoxButton.OK, MessageBoxImage.Information);/*"Die Anwendung wird jetzt geschlossen"*/
|
||||
"Nach Herstellen der Verbindung wird die Anwendung wieder freigegeben\n", "VPN verbunden?", MessageBoxButton.OK, MessageBoxImage.Information);/*"Die Anwendung wird jetzt geschlossen"*/
|
||||
}
|
||||
|
||||
//Application.Current.Shutdown();
|
||||
//Environment.Exit(0);
|
||||
}
|
||||
|
||||
imgConnection.Source = (ImageSource)this.FindResource("NotConnectedIcon");
|
||||
|
||||
@ -261,8 +261,8 @@ namespace ZKuP
|
||||
{
|
||||
isOnline = false;
|
||||
|
||||
System.Windows.MessageBox.Show($"Verbindung zum Server konnte nicht hergestellt werden\n\nInterne Meldung: {ex.Message}", "Fehler", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error);
|
||||
throw new InvalidOperationException("MySQL Server ist nicht erreichbar");
|
||||
//System.Windows.MessageBox.Show($"Verbindung zum Server konnte nicht hergestellt werden\n\nInterne Meldung: {ex.Message}", "Fehler", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error);
|
||||
//throw new InvalidOperationException("MySQL Server ist nicht erreichbar");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user