Do not hide windows when not attached.

This commit is contained in:
Jeremy Tellier - ROG
2020-10-08 14:11:57 +01:00
parent 701a5c134d
commit e111763462
2 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -142,8 +142,7 @@ namespace ZitiDesktopEdge
}
private void ShowFeedback(object sender, MouseButtonEventArgs e) {
ServiceClient.Client client = (ServiceClient.Client)Application.Current.Properties["ServiceClient"];
var mailMessage = new MailMessage();
mailMessage.From = new MailAddress("ziti-support@netfoundry.io");
var mailMessage = new MailMessage("", "ziti-support@netfoundry.io");
mailMessage.Subject = "Ziti Support";
mailMessage.IsBodyHtml = true;
mailMessage.Body = "";
@@ -193,6 +192,7 @@ namespace ZitiDesktopEdge
DetachButton.Visibility = Visibility.Collapsed;
AttachButton.Visibility = Visibility.Visible;
Arrow.Visibility = Visibility.Collapsed;
UIModel.HideOnLostFocus = false;
if (OnAttachmentChange != null) {
OnAttachmentChange(false);
}
@@ -210,6 +210,7 @@ namespace ZitiDesktopEdge
DetachButton.Visibility = Visibility.Visible;
AttachButton.Visibility = Visibility.Collapsed;
Arrow.Visibility = Visibility.Visible;
UIModel.HideOnLostFocus = true;
if (OnAttachmentChange != null) {
OnAttachmentChange(true);
}
+3
View File
@@ -85,11 +85,13 @@ namespace ZitiDesktopEdge {
}
private void MainWindow_Deactivated(object sender, EventArgs e) {
if (UIModel.HideOnLostFocus) {
#if DEBUG
Debug.WriteLine("debug is enabled - windows pinned");
#else
this.Visibility = Visibility.Collapsed;
#endif
}
}
private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) {
@@ -113,6 +115,7 @@ namespace ZitiDesktopEdge {
_isAttached = false;
IdentityMenu.Arrow.Visibility = Visibility.Collapsed;
Arrow.Visibility = Visibility.Collapsed;
UIModel.HideOnLostFocus = false;
MainMenu.Detach();
this.DragMove();
}