From b06964169ed9389c312d09c1ac67ddb76b8dff98 Mon Sep 17 00:00:00 2001 From: "Wainaina George (Swagfin)" Date: Thu, 9 Mar 2023 22:55:17 +0300 Subject: [PATCH 1/4] chore: added ping bground service --- PortProxyGUI/Data/Rule.cs | 1 + PortProxyGUI/PortProxyGUI.Designer.cs | 15 +++++++ PortProxyGUI/PortProxyGUI.cs | 30 +++++++++++++- PortProxyGUI/PortProxyGUI.resx | 58 +++++++++++++++++++-------- PortProxyGUI/~DS/PingCheckerUtil.cs | 31 ++++++++++++++ 5 files changed, 116 insertions(+), 19 deletions(-) create mode 100644 PortProxyGUI/~DS/PingCheckerUtil.cs diff --git a/PortProxyGUI/Data/Rule.cs b/PortProxyGUI/Data/Rule.cs index a777399..a9816ff 100644 --- a/PortProxyGUI/Data/Rule.cs +++ b/PortProxyGUI/Data/Rule.cs @@ -13,6 +13,7 @@ namespace PortProxyGUI.Data public int ConnectPort { get; set; } public string Comment { get; set; } public string Group { get; set; } + public string PingStatus { get; set; } public bool Valid => ListenPort > 0 && ConnectPort > 0; diff --git a/PortProxyGUI/PortProxyGUI.Designer.cs b/PortProxyGUI/PortProxyGUI.Designer.cs index 7c0962c..55c580e 100644 --- a/PortProxyGUI/PortProxyGUI.Designer.cs +++ b/PortProxyGUI/PortProxyGUI.Designer.cs @@ -37,6 +37,7 @@ this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); + this.columnPingStatus = new System.Windows.Forms.ColumnHeader(); this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItem_Enable = new System.Windows.Forms.ToolStripMenuItem(); @@ -51,6 +52,7 @@ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem_About = new System.Windows.Forms.ToolStripMenuItem(); this.imageListProxies = new System.Windows.Forms.ImageList(this.components); + this.TimerPingTargets = new System.Windows.Forms.Timer(this.components); this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); // @@ -64,6 +66,7 @@ this.columnHeader4, this.columnHeader5, this.columnHeader6, + this.columnPingStatus, this.columnHeader7}); this.listViewProxies.ContextMenuStrip = this.contextMenuStrip1; resources.ApplyResources(this.listViewProxies, "listViewProxies"); @@ -104,6 +107,10 @@ this.columnHeader6.Tag = ""; resources.ApplyResources(this.columnHeader6, "columnHeader6"); // + // columnPingStatus + // + resources.ApplyResources(this.columnPingStatus, "columnPingStatus"); + // // columnHeader7 // resources.ApplyResources(this.columnHeader7, "columnHeader7"); @@ -189,6 +196,12 @@ this.imageListProxies.Images.SetKeyName(0, "disable.png"); this.imageListProxies.Images.SetKeyName(1, "enable.png"); // + // TimerPingTargets + // + this.TimerPingTargets.Enabled = true; + this.TimerPingTargets.Interval = 5000; + this.TimerPingTargets.Tick += new System.EventHandler(this.TimerPingTargets_Tick); + // // PortProxyGUI // resources.ApplyResources(this, "$this"); @@ -224,6 +237,8 @@ private System.Windows.Forms.ColumnHeader columnHeader7; internal System.Windows.Forms.ListView listViewProxies; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_FlushDnsCache; + private System.Windows.Forms.ColumnHeader columnPingStatus; + private System.Windows.Forms.Timer TimerPingTargets; } } diff --git a/PortProxyGUI/PortProxyGUI.cs b/PortProxyGUI/PortProxyGUI.cs index af4aa82..01a3962 100644 --- a/PortProxyGUI/PortProxyGUI.cs +++ b/PortProxyGUI/PortProxyGUI.cs @@ -2,6 +2,7 @@ using System; using System.Data; using System.Linq; +using System.Net.NetworkInformation; using System.Windows.Forms; using static System.Windows.Forms.ListViewItem; @@ -46,7 +47,8 @@ namespace PortProxyGUI ListenPort = listenPort, ConnectTo = subItems[4].Text.Trim(), ConnectPort = connectPort, - Comment = subItems[6].Text.Trim(), + PingStatus = subItems[6].Text.Trim(), + Comment = subItems[7].Text.Trim(), Group = item.Group?.Header.Trim(), }; return rule; @@ -154,7 +156,8 @@ namespace PortProxyGUI new ListViewSubItem(item, rule.ListenPort.ToString()) { Tag = "Number" }, new ListViewSubItem(item, rule.ConnectTo), new ListViewSubItem(item, rule.ConnectPort.ToString ()) { Tag = "Number" }, - new ListViewSubItem(item, rule.Comment ?? ""), + new ListViewSubItem(item, rule.PingStatus ?? string.Empty), + new ListViewSubItem(item, rule.Comment ?? string.Empty) }); if (rule.Group.IsNullOrWhiteSpace()) item.Group = null; @@ -314,5 +317,28 @@ namespace PortProxyGUI if (e.KeyCode == Keys.Delete) DeleteSelectedProxies(); } } + + private void TimerPingTargets_Tick(object sender, EventArgs e) + { + TimerPingTargets.Stop(); + try + { + var items = listViewProxies.Items.OfType(); + foreach (var item in items) + { + try + { + var rule = ParseRule(item); + //Ping Host + PingCheckerUtil.GetPingResult(rule.ConnectTo, 2, out IPStatus ipStatus, out _, out _); + rule.PingStatus = ipStatus.ToString(); + UpdateListViewItem(item, rule, item.ImageIndex); + } + catch { } + } + } + catch { } + TimerPingTargets.Start(); + } } } diff --git a/PortProxyGUI/PortProxyGUI.resx b/PortProxyGUI/PortProxyGUI.resx index 55babf0..4e3163a 100644 --- a/PortProxyGUI/PortProxyGUI.resx +++ b/PortProxyGUI/PortProxyGUI.resx @@ -94,6 +94,12 @@ 100 + + Ping Status + + + 104 + Comment @@ -105,28 +111,28 @@ - 180, 22 + 164, 22 Enable (&E) - 180, 22 + 164, 22 Disable (&I) - 177, 6 + 161, 6 - 180, 22 + 164, 22 Refresh (&F) - 180, 22 + 164, 22 Flush DNS Cache @@ -135,37 +141,37 @@ Will perform ipconfig/flushDNS - 177, 6 + 161, 6 - 180, 22 + 164, 22 New (&N) ... - 180, 22 + 164, 22 Modify (&M) ... - 180, 22 + 164, 22 Delete (&D) - 177, 6 + 161, 6 - 180, 22 + 164, 22 About - 181, 220 + 165, 198 contextMenuStrip1 @@ -184,10 +190,10 @@ 0, 0 - 4, 3, 4, 3 + 5, 3, 5, 3 - 704, 456 + 797, 456 182, 17 @@ -197,7 +203,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA3AgAAAJNU0Z0AUkBTAIBAQIB - AAEwAQEBMAEBARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEQAwABAQEAAQgG + AAFYAQEBWAEBARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEQAwABAQEAAQgG AAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEAAfABygGmAQABMwUAATMB AAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEAAYABfAH/AQACUAH/AQAB kwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFmAwABmQMAAcwCAAEzAwAC @@ -252,14 +258,20 @@ 1 + + 324, 17 + True - 6, 13 + 7, 15 - 704, 456 + 797, 456 + + + Segoe UI, 9pt @@ -2464,6 +2476,12 @@ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + columnPingStatus + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + columnHeader7 @@ -2542,6 +2560,12 @@ System.Windows.Forms.ImageList, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + TimerPingTargets + + + System.Windows.Forms.Timer, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + PortProxyGUI diff --git a/PortProxyGUI/~DS/PingCheckerUtil.cs b/PortProxyGUI/~DS/PingCheckerUtil.cs new file mode 100644 index 0000000..c986cbf --- /dev/null +++ b/PortProxyGUI/~DS/PingCheckerUtil.cs @@ -0,0 +1,31 @@ +using System.Net; +using System.Net.NetworkInformation; +using System.Text; + +namespace PortProxyGUI +{ + public static class PingCheckerUtil + { + // Adapted from https://docs.microsoft.com/en-us/dotnet/api/system.net.networkinformation.ping.send + public static bool GetPingResult(string ipAddress, int timeout, out IPStatus responseStatus, out IPAddress responseIpAddress, out long responseTime) + { + //Defaults + responseIpAddress = null; + responseTime = 0; + responseStatus = IPStatus.Unknown; + try + { + //Sending 32bytes + byte[] buffer = Encoding.ASCII.GetBytes("12345678901234567890123456789012"); + Ping pingSender = new Ping(); + PingOptions options = new PingOptions(64, true); + PingReply reply = pingSender.Send(ipAddress, timeout, buffer, options); + responseIpAddress = reply.Address; + responseTime = reply.RoundtripTime; + responseStatus = reply.Status; + return (reply.Status == IPStatus.Success) ? true : false; + } + catch { return false; } + } + } +} From ee038ca7cfce6b5c1e0edb7b66e4ca30323b6cda Mon Sep 17 00:00:00 2001 From: "Wainaina George (Swagfin)" Date: Fri, 10 Mar 2023 00:03:09 +0300 Subject: [PATCH 2/4] chore: minor refactoring --- PortProxyGUI/Data/Rule.cs | 2 +- PortProxyGUI/PortProxyGUI.cs | 38 +++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/PortProxyGUI/Data/Rule.cs b/PortProxyGUI/Data/Rule.cs index a9816ff..1d3bb9b 100644 --- a/PortProxyGUI/Data/Rule.cs +++ b/PortProxyGUI/Data/Rule.cs @@ -13,7 +13,7 @@ namespace PortProxyGUI.Data public int ConnectPort { get; set; } public string Comment { get; set; } public string Group { get; set; } - public string PingStatus { get; set; } + public string PingStatus { get; set; } = "Checking..."; public bool Valid => ListenPort > 0 && ConnectPort > 0; diff --git a/PortProxyGUI/PortProxyGUI.cs b/PortProxyGUI/PortProxyGUI.cs index 01a3962..f84dfcc 100644 --- a/PortProxyGUI/PortProxyGUI.cs +++ b/PortProxyGUI/PortProxyGUI.cs @@ -1,6 +1,8 @@ using NStandard; using System; +using System.Collections.Generic; using System.Data; +using System.Drawing; using System.Linq; using System.Net.NetworkInformation; using System.Windows.Forms; @@ -13,7 +15,7 @@ namespace PortProxyGUI public SetProxy SetProxyForm; public About AboutForm; private ListViewColumnSorter lvwColumnSorter; - + private List> hostStatus { get; set; } = new List>(); public PortProxyGUI() { InitializeComponent(); @@ -156,7 +158,13 @@ namespace PortProxyGUI new ListViewSubItem(item, rule.ListenPort.ToString()) { Tag = "Number" }, new ListViewSubItem(item, rule.ConnectTo), new ListViewSubItem(item, rule.ConnectPort.ToString ()) { Tag = "Number" }, - new ListViewSubItem(item, rule.PingStatus ?? string.Empty), + new ListViewSubItem(item, rule.PingStatus ?? string.Empty) + { + Tag ="Connect To Ping Status", + ForeColor = rule.PingStatus.Equals("Success") ? Color.Green + : rule.PingStatus.Equals("Checking...") ? Color.DarkGray + : Color.MediumVioletRed + }, new ListViewSubItem(item, rule.Comment ?? string.Empty) }); @@ -324,15 +332,31 @@ namespace PortProxyGUI try { var items = listViewProxies.Items.OfType(); + hostStatus = new List>(); foreach (var item in items) { try { - var rule = ParseRule(item); - //Ping Host - PingCheckerUtil.GetPingResult(rule.ConnectTo, 2, out IPStatus ipStatus, out _, out _); - rule.PingStatus = ipStatus.ToString(); - UpdateListViewItem(item, rule, item.ImageIndex); + //Custom Color for cells + item.UseItemStyleForSubItems = false; + //Proceed + Data.Rule rule = ParseRule(item); + //Check if host already pinged host + var alreadyChkdHost = hostStatus.FirstOrDefault(x => x.Key.Equals(rule.ConnectTo, StringComparison.OrdinalIgnoreCase)); + if (!string.IsNullOrEmpty(alreadyChkdHost.Key)) + { + //Skip Checking Status since already checked + rule.PingStatus = alreadyChkdHost.Value.ToString(); + UpdateListViewItem(item, rule, item.ImageIndex); + } + else + { + //If not yet checked + PingCheckerUtil.GetPingResult(rule.ConnectTo, 2, out IPStatus ipStatus, out _, out _); + hostStatus.Add(new KeyValuePair(rule.ConnectTo, ipStatus)); + rule.PingStatus = ipStatus.ToString(); + UpdateListViewItem(item, rule, item.ImageIndex); + } } catch { } } From b882ddac6adfea9f966d3cb0721084847fea5a74 Mon Sep 17 00:00:00 2001 From: "Wainaina George (Swagfin)" Date: Fri, 10 Mar 2023 00:22:48 +0300 Subject: [PATCH 3/4] chore: added refresh ping statuses --- PortProxyGUI/Data/Rule.cs | 2 +- PortProxyGUI/PortProxyGUI.Designer.cs | 16 +++---- PortProxyGUI/PortProxyGUI.cs | 57 ++++++++++++++----------- PortProxyGUI/PortProxyGUI.resx | 61 +++++++++++++++++---------- 4 files changed, 80 insertions(+), 56 deletions(-) diff --git a/PortProxyGUI/Data/Rule.cs b/PortProxyGUI/Data/Rule.cs index 1d3bb9b..8d75ea6 100644 --- a/PortProxyGUI/Data/Rule.cs +++ b/PortProxyGUI/Data/Rule.cs @@ -13,7 +13,7 @@ namespace PortProxyGUI.Data public int ConnectPort { get; set; } public string Comment { get; set; } public string Group { get; set; } - public string PingStatus { get; set; } = "Checking..."; + public string PingStatus { get; set; } = "Not checked"; public bool Valid => ListenPort > 0 && ConnectPort > 0; diff --git a/PortProxyGUI/PortProxyGUI.Designer.cs b/PortProxyGUI/PortProxyGUI.Designer.cs index 55c580e..276fff1 100644 --- a/PortProxyGUI/PortProxyGUI.Designer.cs +++ b/PortProxyGUI/PortProxyGUI.Designer.cs @@ -44,6 +44,7 @@ this.toolStripMenuItem_Disable = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem_Refresh = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem_RefreshPingStatus = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem_FlushDnsCache = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem_New = new System.Windows.Forms.ToolStripMenuItem(); @@ -52,7 +53,6 @@ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem_About = new System.Windows.Forms.ToolStripMenuItem(); this.imageListProxies = new System.Windows.Forms.ImageList(this.components); - this.TimerPingTargets = new System.Windows.Forms.Timer(this.components); this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); // @@ -122,6 +122,7 @@ this.toolStripMenuItem_Disable, this.toolStripSeparator3, this.toolStripMenuItem_Refresh, + this.toolStripMenuItem_RefreshPingStatus, this.toolStripMenuItem_FlushDnsCache, this.toolStripSeparator2, this.toolStripMenuItem_New, @@ -153,6 +154,11 @@ this.toolStripMenuItem_Refresh.Name = "toolStripMenuItem_Refresh"; resources.ApplyResources(this.toolStripMenuItem_Refresh, "toolStripMenuItem_Refresh"); // + // toolStripMenuItem_RefreshPingStatus + // + this.toolStripMenuItem_RefreshPingStatus.Name = "toolStripMenuItem_RefreshPingStatus"; + resources.ApplyResources(this.toolStripMenuItem_RefreshPingStatus, "toolStripMenuItem_RefreshPingStatus"); + // // toolStripMenuItem_FlushDnsCache // this.toolStripMenuItem_FlushDnsCache.Name = "toolStripMenuItem_FlushDnsCache"; @@ -196,12 +202,6 @@ this.imageListProxies.Images.SetKeyName(0, "disable.png"); this.imageListProxies.Images.SetKeyName(1, "enable.png"); // - // TimerPingTargets - // - this.TimerPingTargets.Enabled = true; - this.TimerPingTargets.Interval = 5000; - this.TimerPingTargets.Tick += new System.EventHandler(this.TimerPingTargets_Tick); - // // PortProxyGUI // resources.ApplyResources(this, "$this"); @@ -238,7 +238,7 @@ internal System.Windows.Forms.ListView listViewProxies; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_FlushDnsCache; private System.Windows.Forms.ColumnHeader columnPingStatus; - private System.Windows.Forms.Timer TimerPingTargets; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_RefreshPingStatus; } } diff --git a/PortProxyGUI/PortProxyGUI.cs b/PortProxyGUI/PortProxyGUI.cs index f84dfcc..5db85ba 100644 --- a/PortProxyGUI/PortProxyGUI.cs +++ b/PortProxyGUI/PortProxyGUI.cs @@ -162,7 +162,7 @@ namespace PortProxyGUI { Tag ="Connect To Ping Status", ForeColor = rule.PingStatus.Equals("Success") ? Color.Green - : rule.PingStatus.Equals("Checking...") ? Color.DarkGray + : rule.PingStatus.Equals("Pending") ? Color.DarkGray : Color.MediumVioletRed }, new ListViewSubItem(item, rule.Comment ?? string.Empty) @@ -183,28 +183,36 @@ namespace PortProxyGUI public void RefreshProxyList() { - var proxies = CmdUtil.GetProxies(); - var rules = Program.SqliteDbScope.Rules.ToArray(); - foreach (var proxy in proxies) + try { - var matchedRule = rules.FirstOrDefault(r => r.EqualsWithKeys(proxy)); - proxy.Id = matchedRule?.Id; + + var proxies = CmdUtil.GetProxies(); + var rules = Program.SqliteDbScope.Rules.ToArray(); + foreach (var proxy in proxies) + { + var matchedRule = rules.FirstOrDefault(r => r.EqualsWithKeys(proxy)); + proxy.Id = matchedRule?.Id; + } + + var pendingAdds = proxies.Where(x => x.Valid && x.Id == null); + var pendingUpdates = + from proxy in proxies + let exsist = rules.FirstOrDefault(r => r.Id == proxy.Id) + where exsist is not null + where proxy.Valid && proxy.Id is not null + select proxy; + + Program.SqliteDbScope.AddRange(pendingAdds); + Program.SqliteDbScope.UpdateRange(pendingUpdates); + + rules = Program.SqliteDbScope.Rules.ToArray(); + InitProxyGroups(rules); + InitProxyItems(rules, proxies); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Error Refreshing"); } - - var pendingAdds = proxies.Where(x => x.Valid && x.Id == null); - var pendingUpdates = - from proxy in proxies - let exsist = rules.FirstOrDefault(r => r.Id == proxy.Id) - where exsist is not null - where proxy.Valid && proxy.Id is not null - select proxy; - - Program.SqliteDbScope.AddRange(pendingAdds); - Program.SqliteDbScope.UpdateRange(pendingUpdates); - - rules = Program.SqliteDbScope.Rules.ToArray(); - InitProxyGroups(rules); - InitProxyItems(rules, proxies); } public void FlushDnsCache() @@ -248,6 +256,9 @@ namespace PortProxyGUI case ToolStripMenuItem item when item == toolStripMenuItem_Refresh: RefreshProxyList(); break; + case ToolStripMenuItem item when item == toolStripMenuItem_RefreshPingStatus: + RefreshConnectHostPingStatus(); + break; case ToolStripMenuItem item when item == toolStripMenuItem_FlushDnsCache: FlushDnsCache(); break; @@ -326,9 +337,8 @@ namespace PortProxyGUI } } - private void TimerPingTargets_Tick(object sender, EventArgs e) + private void RefreshConnectHostPingStatus() { - TimerPingTargets.Stop(); try { var items = listViewProxies.Items.OfType(); @@ -362,7 +372,6 @@ namespace PortProxyGUI } } catch { } - TimerPingTargets.Start(); } } } diff --git a/PortProxyGUI/PortProxyGUI.resx b/PortProxyGUI/PortProxyGUI.resx index 4e3163a..2a36ddc 100644 --- a/PortProxyGUI/PortProxyGUI.resx +++ b/PortProxyGUI/PortProxyGUI.resx @@ -111,67 +111,85 @@ - 164, 22 + 180, 22 Enable (&E) + + Enable current Proxy + - 164, 22 + 180, 22 Disable (&I) + + Disable Current Proxy + - 161, 6 + 177, 6 - 164, 22 + 180, 22 Refresh (&F) + + Refresh Port Proxies + + + 180, 22 + + + Refresh Ping Status + + + Refresh Host Ping Statuses + - 164, 22 + 180, 22 Flush DNS Cache - Will perform ipconfig/flushDNS + Click to perform ipconfig/flushDNS - 161, 6 + 177, 6 - 164, 22 + 180, 22 New (&N) ... - 164, 22 + 180, 22 Modify (&M) ... - 164, 22 + 180, 22 Delete (&D) - 161, 6 + 177, 6 - 164, 22 + 180, 22 About - 165, 198 + 181, 242 contextMenuStrip1 @@ -203,7 +221,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA3AgAAAJNU0Z0AUkBTAIBAQIB - AAFYAQEBWAEBARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEQAwABAQEAAQgG + AAFwAQEBcAEBARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEQAwABAQEAAQgG AAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEAAfABygGmAQABMwUAATMB AAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEAAYABfAH/AQACUAH/AQAB kwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFmAwABmQMAAcwCAAEzAwAC @@ -258,9 +276,6 @@ 1 - - 324, 17 - True @@ -2512,6 +2527,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + toolStripMenuItem_RefreshPingStatus + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + toolStripMenuItem_FlushDnsCache @@ -2560,12 +2581,6 @@ System.Windows.Forms.ImageList, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - TimerPingTargets - - - System.Windows.Forms.Timer, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - PortProxyGUI From 4c67209fe426990e36f1ca96b34ef95bf7bd133e Mon Sep 17 00:00:00 2001 From: "Wainaina George (Swagfin)" Date: Fri, 10 Mar 2023 00:23:51 +0300 Subject: [PATCH 4/4] refactor: minor changes and refactoring --- PortProxyGUI/PortProxyGUI.resx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/PortProxyGUI/PortProxyGUI.resx b/PortProxyGUI/PortProxyGUI.resx index 2a36ddc..b7f58c4 100644 --- a/PortProxyGUI/PortProxyGUI.resx +++ b/PortProxyGUI/PortProxyGUI.resx @@ -116,18 +116,12 @@ Enable (&E) - - Enable current Proxy - 180, 22 Disable (&I) - - Disable Current Proxy - 177, 6 @@ -156,7 +150,7 @@ Flush DNS Cache - Click to perform ipconfig/flushDNS + Perform ipconfig/flushDNS 177, 6 @@ -221,7 +215,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA3AgAAAJNU0Z0AUkBTAIBAQIB - AAFwAQEBcAEBARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEQAwABAQEAAQgG + AAF4AQEBeAEBARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEQAwABAQEAAQgG AAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEAAfABygGmAQABMwUAATMB AAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEAAYABfAH/AQACUAH/AQAB kwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFmAwABmQMAAcwCAAEzAwAC