From 4e39b1e2414aba108e0545d9a67d80dcef49b3de Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Tue, 17 Nov 2020 07:32:32 -0500 Subject: [PATCH] target dotnet 4.7.2 vs 4.8 due to many users not havin 4.8 yet --- DesktopEdge/MainMenu.xaml.cs | 1 - DesktopEdge/Models/ZitiService.cs | 109 +++++++++++++++--------------- 2 files changed, 54 insertions(+), 56 deletions(-) diff --git a/DesktopEdge/MainMenu.xaml.cs b/DesktopEdge/MainMenu.xaml.cs index 678c29e0..09770e78 100644 --- a/DesktopEdge/MainMenu.xaml.cs +++ b/DesktopEdge/MainMenu.xaml.cs @@ -4,7 +4,6 @@ using System.Windows.Input; using System.Diagnostics; using System; using System.Threading; -using System.Management.Automation; using ZitiDesktopEdge.Models; using System.Reflection; using System.Web; diff --git a/DesktopEdge/Models/ZitiService.cs b/DesktopEdge/Models/ZitiService.cs index 9b8f75eb..97daf0a2 100644 --- a/DesktopEdge/Models/ZitiService.cs +++ b/DesktopEdge/Models/ZitiService.cs @@ -1,55 +1,54 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation.Language; -using System.Text; -using System.Threading.Tasks; - -namespace ZitiDesktopEdge.Models { - public class ZitiService { - public string Name { get; set; } - public string AssignedIP { get; set; } - public string Host { get; set; } - public string Port { get; set; } - public bool OwnsIntercept { get; set; } - public string Url - { - get - { - if (this.OwnsIntercept) - { - return Host + ":" + Port; - } else - { - return AssignedIP + ":" + Port; - } - } - } - public string Warning - { - get - { - if (this.OwnsIntercept) - { - return ""; - } - else - { - return $"Another identity already mapped the specified hostname: {Host}.\nThis service is only available via IP"; - } - } - } - - public ZitiService() { - } - - public ZitiService(ZitiDesktopEdge.ServiceClient.Service svc) - { - this.Name = svc.Name; - this.AssignedIP = svc.AssignedIP; - this.Host = svc.InterceptHost; - this.Port = svc.InterceptPort.ToString(); - this.OwnsIntercept = svc.OwnsIntercept; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZitiDesktopEdge.Models { + public class ZitiService { + public string Name { get; set; } + public string AssignedIP { get; set; } + public string Host { get; set; } + public string Port { get; set; } + public bool OwnsIntercept { get; set; } + public string Url + { + get + { + if (this.OwnsIntercept) + { + return Host + ":" + Port; + } else + { + return AssignedIP + ":" + Port; + } + } + } + public string Warning + { + get + { + if (this.OwnsIntercept) + { + return ""; + } + else + { + return $"Another identity already mapped the specified hostname: {Host}.\nThis service is only available via IP"; + } + } + } + + public ZitiService() { + } + + public ZitiService(ZitiDesktopEdge.ServiceClient.Service svc) + { + this.Name = svc.Name; + this.AssignedIP = svc.AssignedIP; + this.Host = svc.InterceptHost; + this.Port = svc.InterceptPort.ToString(); + this.OwnsIntercept = svc.OwnsIntercept; + } + } +}