diff --git a/DesktopEdge/App.xaml b/DesktopEdge/App.xaml
index 876e1d58..09471510 100644
--- a/DesktopEdge/App.xaml
+++ b/DesktopEdge/App.xaml
@@ -20,6 +20,26 @@
+
+
+
+
+
+
diff --git a/DesktopEdge/IdentityDetails.xaml.cs b/DesktopEdge/IdentityDetails.xaml.cs
index 403fb727..b12083c9 100644
--- a/DesktopEdge/IdentityDetails.xaml.cs
+++ b/DesktopEdge/IdentityDetails.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -57,8 +58,13 @@ namespace ZitiDesktopEdge {
}
set {
_isAttached = value;
- if (_isAttached) Arrow.Visibility = Visibility.Visible;
- else Arrow.Visibility = Visibility.Collapsed;
+ if (_isAttached) {
+ Arrow.Visibility = Visibility.Visible;
+ ConfirmArrow.Visibility = Visibility.Visible;
+ } else {
+ Arrow.Visibility = Visibility.Collapsed;
+ ConfirmArrow.Visibility = Visibility.Collapsed;
+ }
}
}
@@ -70,13 +76,25 @@ namespace ZitiDesktopEdge {
IdentityEnrollment.Value = _identity.Status;
IdentityStatus.Value = _identity.IsEnabled ? "active" : "disabled";
ServiceList.Children.Clear();
- for (int i=0; i<_identity.Services.Count; i++) {
- ServiceInfo editor = new ServiceInfo();
- editor.Label = _identity.Services[i].Name;
- editor.Value = _identity.Services[i].Url;
- editor.Warning = _identity.Services[i].Warning;
- editor.IsLocked = true;
- ServiceList.Children.Add(editor);
+ if (_identity.Services.Count>0) {
+ for (int i = 0; i < _identity.Services.Count; i++) {
+ ServiceInfo editor = new ServiceInfo();
+ editor.Label = _identity.Services[i].Name;
+ editor.Value = _identity.Services[i].Url;
+ editor.Warning = _identity.Services[i].Warning;
+ editor.IsLocked = true;
+ ServiceList.Children.Add(editor);
+ }
+ int sHeight = 36 * _identity.Services.Count;
+ if (sHeight > 200) sHeight = 200;
+ Debug.WriteLine("Height: " + ServiceRow.Height.Value.ToString());
+ ServiceRow.Height = new GridLength((double)sHeight);
+ MainDetailScroll.Visibility = Visibility.Visible;
+ ServiceTitle.Content = _identity.Services.Count + " SERVICES";
+ } else {
+ ServiceRow.Height = new GridLength((double)0.0);
+ MainDetailScroll.Visibility = Visibility.Collapsed;
+ ServiceTitle.Content = "NO SERVICES AVAILABLE";
}
}
@@ -99,11 +117,15 @@ namespace ZitiDesktopEdge {
MainDetailScroll.Height = height;
}
- private void CancelConfirm(object sender, MouseButtonEventArgs e) {
+ private void ForgetIdentity(object sender, MouseButtonEventArgs e) {
+ ConfirmView.Visibility = Visibility.Visible;
+ }
+
+ private void CancelConfirmButton_Click(object sender, RoutedEventArgs e) {
ConfirmView.Visibility = Visibility.Collapsed;
}
- private void ConfirmForget(object sender, MouseButtonEventArgs e) {
+ private void ConfirmButton_Click(object sender, RoutedEventArgs e) {
this.Visibility = Visibility.Collapsed;
ServiceClient.Client client = (ServiceClient.Client)Application.Current.Properties["ServiceClient"];
try {
@@ -127,9 +149,5 @@ namespace ZitiDesktopEdge {
OnError(ex.Message);
}
}
-
- private void ForgetIdentity(object sender, MouseButtonEventArgs e) {
- ConfirmView.Visibility = Visibility.Visible;
- }
}
}
diff --git a/DesktopEdge/MainMenu.xaml b/DesktopEdge/MainMenu.xaml
index 59a1ed8f..e6fc069e 100644
--- a/DesktopEdge/MainMenu.xaml
+++ b/DesktopEdge/MainMenu.xaml
@@ -68,8 +68,8 @@
-
-
+
+
diff --git a/DesktopEdge/MainMenu.xaml.cs b/DesktopEdge/MainMenu.xaml.cs
index f35ae09b..ed405bdf 100644
--- a/DesktopEdge/MainMenu.xaml.cs
+++ b/DesktopEdge/MainMenu.xaml.cs
@@ -69,7 +69,7 @@ namespace ZitiDesktopEdge
MainItems.Visibility = Visibility.Collapsed;
AboutItems.Visibility = Visibility.Collapsed;
MainItemsButton.Visibility = Visibility.Collapsed;
- AboutItemsButton.Visibility = Visibility.Collapsed;
+ AboutItemsArea.Visibility = Visibility.Collapsed;
BackArrow.Visibility = Visibility.Collapsed;
AdvancedItems.Visibility = Visibility.Collapsed;
LicensesItems.Visibility = Visibility.Collapsed;
@@ -78,9 +78,17 @@ namespace ZitiDesktopEdge
if (menuState=="About") {
MenuTitle.Content = "About";
- AboutItemsButton.Visibility = Visibility.Visible;
+ AboutItemsArea.Visibility = Visibility.Visible;
AboutItems.Visibility = Visibility.Visible;
BackArrow.Visibility = Visibility.Visible;
+
+ // Service Version - Lose the snapshot
+ string version = File.ReadAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "OpenZiti", "Service", "Version.txt"));
+ if (version.IndexOf("-") > 0) version = version.Split('-')[0];
+
+ // Interface Version
+ VersionInfo.Content = "App: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()+" Service: "+ version;
+
} else if (menuState=="Advanced") {
MenuTitle.Content = "Advanced Settings";
AdvancedItems.Visibility = Visibility.Visible;
@@ -190,6 +198,13 @@ namespace ZitiDesktopEdge
}
MainMenuArea.Visibility = Visibility.Collapsed;
}
+
+ public void Detach() {
+ Application.Current.MainWindow.ShowInTaskbar = true;
+ DetachButton.Visibility = Visibility.Collapsed;
+ AttachButton.Visibility = Visibility.Visible;
+ Arrow.Visibility = Visibility.Collapsed;
+ }
private void RetachWindow(object sender, MouseButtonEventArgs e) {
Application.Current.MainWindow.ShowInTaskbar = false;
DetachButton.Visibility = Visibility.Visible;
diff --git a/DesktopEdge/MainWindow.xaml b/DesktopEdge/MainWindow.xaml
index cbb2895b..58284dd2 100644
--- a/DesktopEdge/MainWindow.xaml
+++ b/DesktopEdge/MainWindow.xaml
@@ -85,7 +85,6 @@
-
@@ -93,7 +92,7 @@
-
+
@@ -112,9 +111,9 @@
-
+
-
+
@@ -194,7 +193,7 @@
-
+
diff --git a/DesktopEdge/MainWindow.xaml.cs b/DesktopEdge/MainWindow.xaml.cs
index db3c9d48..a69a9ae5 100644
--- a/DesktopEdge/MainWindow.xaml.cs
+++ b/DesktopEdge/MainWindow.xaml.cs
@@ -35,7 +35,6 @@ namespace ZitiDesktopEdge {
private int _right = 75;
private int _bottom = 0;
private double _maxHeight = 800d;
- private string _serviceVersion = "0.0.8";
private string[] suffixes = { "bps", "kbps", "mbps", "gbps", "tbps", "pbps" };
private List identities {
@@ -75,7 +74,6 @@ namespace ZitiDesktopEdge {
LaunchOrInstall();
- MainMenu.ServiceVersion.Content = _serviceVersion;
SetNotifyIcon("white");
InitializeComponent();
}
@@ -111,7 +109,13 @@ namespace ZitiDesktopEdge {
}
private void Window_MouseDown(object sender, MouseButtonEventArgs e) {
- if (!_isAttached&&e.ChangedButton == MouseButton.Left) this.DragMove();
+ if (e.ChangedButton == MouseButton.Left) {
+ _isAttached = false;
+ IdentityMenu.Arrow.Visibility = Visibility.Collapsed;
+ Arrow.Visibility = Visibility.Collapsed;
+ MainMenu.Detach();
+ this.DragMove();
+ }
}
private void TargetNotifyIcon_Click(object sender, EventArgs e) {
@@ -345,7 +349,6 @@ namespace ZitiDesktopEdge {
ZitiIdentity[] ids = identities.ToArray();
double height = 460 + (ids.Length * 60);
if (height > _maxHeight) height = _maxHeight;
- Debug.WriteLine("Set Height: " + height);
this.Height = height;
IdentityMenu.SetHeight(this.Height-160);
for (int i=0; i
- {
- ShowLoad();
+ private void Connect(object sender, RoutedEventArgs e) {
+ ShowLoad();
+ this.Dispatcher.Invoke(() => {
//Dispatcher.Invoke(new Action(() => { }), System.Windows.Threading.DispatcherPriority.ContextIdle);
DoConnect();
HideLoad();
@@ -494,6 +496,7 @@ namespace ZitiDesktopEdge {
private void ShowLoad() {
LoadProgress.IsIndeterminate = true;
LoadingScreen.Visibility = Visibility.Visible;
+ ((MainWindow)System.Windows.Application.Current.MainWindow).UpdateLayout();
}
private void HideLoad() {
diff --git a/DesktopEdge/Models/UILog.cs b/DesktopEdge/Models/UILog.cs
index af73adbb..f7c50d56 100644
--- a/DesktopEdge/Models/UILog.cs
+++ b/DesktopEdge/Models/UILog.cs
@@ -14,7 +14,11 @@ namespace ZitiDesktopEdge.Models {
}
public static string GetLogs() {
- return File.ReadAllText(_logDirectory);
+ string logs = "";
+ if (File.Exists(_logDirectory)) {
+ logs = File.ReadAllText(_logDirectory);
+ }
+ return logs;
}
}
}
diff --git a/DesktopEdge/Themes/Generic.xaml b/DesktopEdge/Themes/Generic.xaml
index cd5d962e..d77f7b6c 100644
--- a/DesktopEdge/Themes/Generic.xaml
+++ b/DesktopEdge/Themes/Generic.xaml
@@ -2,5 +2,4 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ZitiDesktopEdge">
-
diff --git a/DesktopEdge/Views/ItemRenderers/IdentityItem.xaml b/DesktopEdge/Views/ItemRenderers/IdentityItem.xaml
index 3fc3f4aa..611562ba 100644
--- a/DesktopEdge/Views/ItemRenderers/IdentityItem.xaml
+++ b/DesktopEdge/Views/ItemRenderers/IdentityItem.xaml
@@ -5,10 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ZitiDesktopEdge"
mc:Ignorable="d"
- d:DesignHeight="60" d:DesignWidth="375" Height="60">
+ d:DesignHeight="64" d:DesignWidth="375" Height="64">
diff --git a/DesktopEdge/Views/ItemRenderers/MenuEditItem.xaml b/DesktopEdge/Views/ItemRenderers/MenuEditItem.xaml
index 10c04ec3..1ab71b9c 100644
--- a/DesktopEdge/Views/ItemRenderers/MenuEditItem.xaml
+++ b/DesktopEdge/Views/ItemRenderers/MenuEditItem.xaml
@@ -5,16 +5,16 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ZitiDesktopEdge"
mc:Ignorable="d"
- d:DesignHeight="50" HorizontalAlignment="Stretch" d:DesignWidth="350" Cursor="Hand">
+ d:DesignHeight="40" Height="40" HorizontalAlignment="Stretch" d:DesignWidth="350" Cursor="Hand">
-
-
+
+
-
-
+
+
diff --git a/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml b/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml
index c6a7806c..25f6a06f 100644
--- a/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml
+++ b/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/DesktopEdge/ZitiDesktopEdge.csproj b/DesktopEdge/ZitiDesktopEdge.csproj
index f7ef1ccf..973e5da5 100644
--- a/DesktopEdge/ZitiDesktopEdge.csproj
+++ b/DesktopEdge/ZitiDesktopEdge.csproj
@@ -16,6 +16,7 @@
true
false
+ 1.0.0.0
publish\
true
Disk
@@ -32,7 +33,7 @@
NetFoundry
Ziti
true
- 0
+ 5
1.0.0.%2a
false
true
@@ -349,5 +350,8 @@
+
+
+
\ No newline at end of file
diff --git a/ZitiUpdateService/App.config b/ZitiUpdateService/App.config
index ee900ec4..2c394ec6 100644
--- a/ZitiUpdateService/App.config
+++ b/ZitiUpdateService/App.config
@@ -14,7 +14,7 @@
-->
-
+