From 7cede8244914eb4eabe9d51e4d698f1eff9dfac0 Mon Sep 17 00:00:00 2001 From: Jeremy Tellier - ROG Date: Thu, 29 Oct 2020 22:07:02 +0100 Subject: [PATCH] Fix Id Heights and off switch bug --- DesktopEdge/IdentityDetails.xaml | 10 ++--- DesktopEdge/IdentityDetails.xaml.cs | 4 +- DesktopEdge/MainWindow.xaml | 24 +++++++++++- DesktopEdge/MainWindow.xaml.cs | 37 ++++++++++++++++--- .../Views/ItemRenderers/IdentityItem.xaml.cs | 6 +++ 5 files changed, 67 insertions(+), 14 deletions(-) diff --git a/DesktopEdge/IdentityDetails.xaml b/DesktopEdge/IdentityDetails.xaml index 73b643b6..35525821 100644 --- a/DesktopEdge/IdentityDetails.xaml +++ b/DesktopEdge/IdentityDetails.xaml @@ -63,14 +63,14 @@ - + - + @@ -91,11 +91,11 @@ diff --git a/DesktopEdge/MainWindow.xaml.cs b/DesktopEdge/MainWindow.xaml.cs index beb9de01..974a7f85 100644 --- a/DesktopEdge/MainWindow.xaml.cs +++ b/DesktopEdge/MainWindow.xaml.cs @@ -377,21 +377,48 @@ namespace ZitiDesktopEdge { if (height > _maxHeight) height = _maxHeight; this.Height = height; IdentityMenu.SetHeight(this.Height-160); + bool isActive = false; for (int i=0; i public partial class IdentityItem:UserControl { + public delegate void StatusChanged(bool attached); + public event StatusChanged OnStatusChanged; + public ZitiIdentity _identity; public ZitiIdentity Identity { get { @@ -50,6 +53,9 @@ namespace ZitiDesktopEdge { private void ToggleIdentity(bool on) { try { + if (OnStatusChanged != null) { + OnStatusChanged(on); + } ServiceClient.Client client = (ServiceClient.Client)Application.Current.Properties["ServiceClient"]; ServiceClient.Identity id = client.IdentityOnOff(_identity.Fingerprint, on); this.Identity.IsEnabled = on;