mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-13 08:11:16 +00:00
coming soon - when api version doesn't match show error
This commit is contained in:
@@ -220,8 +220,8 @@
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Foreground="White" Content="Service Not Started" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans"/>
|
||||
<Label Foreground="LightGray" Content="Start the Ziti Tunnel Service to get started" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans"/>
|
||||
<Label x:Name="ErrorMsg" Foreground="White" Content="Service Not Started" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans"/>
|
||||
<Label x:Name="ErrorMsgDetail" Foreground="LightGray" Content="Start the Ziti Tunnel Service to get started" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans"/>
|
||||
<Label Name="QuitButton" Grid.Row="3" Foreground="#F4044D" FontWeight="SemiBold" Content="Quit Ziti Desktop Edge" Cursor="Hand" MouseDown="CloseApp" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" HorizontalAlignment="Center"></Label>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -18,6 +18,7 @@ using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace ZitiDesktopEdge {
|
||||
|
||||
@@ -94,11 +95,16 @@ namespace ZitiDesktopEdge {
|
||||
notifyIcon.Icon.Dispose();
|
||||
notifyIcon.Dispose();
|
||||
}
|
||||
|
||||
private void SetCantDisplay() {
|
||||
|
||||
private void SetCantDisplay(string msg, string detailMessage) {
|
||||
NoServiceView.Visibility = Visibility.Visible;
|
||||
ErrorMsg.Content = msg;
|
||||
ErrorMsgDetail.Content = detailMessage;
|
||||
SetNotifyIcon("red");
|
||||
}
|
||||
private void SetCantDisplay() {
|
||||
SetCantDisplay("Service Not Started", "Start the Ziti Tunnel Service to get started");
|
||||
}
|
||||
|
||||
private void SetCanDisplay() {
|
||||
NoServiceView.Visibility = Visibility.Collapsed;
|
||||
@@ -246,6 +252,12 @@ namespace ZitiDesktopEdge {
|
||||
if (e == null) return; //just skip it for now...
|
||||
Debug.WriteLine($"==== TunnelStatusEvent: ");
|
||||
this.Dispatcher.Invoke(() => {
|
||||
/* coming soon
|
||||
if(e.ApiVersion != Client.EXPECTED_API_VERSION) {
|
||||
SetCantDisplay("Version mismatch!", "The version of the Service is not compatible");
|
||||
return;
|
||||
}
|
||||
*/
|
||||
InitializeTimer((int)e.Status.Duration);
|
||||
LoadStatusFromService(e.Status);
|
||||
LoadIdentities();
|
||||
|
||||
Reference in New Issue
Block a user