From b91845d4115073f1c49e5614bd512272d6899a23 Mon Sep 17 00:00:00 2001 From: MDevoldere Date: Sat, 15 Sep 2018 12:39:24 +0200 Subject: [PATCH] Legacy Update --- .gitignore | 1 - NetSpeedTray/NetInterface.cs | 4 +- NetSpeedTray/NetInterfaceList.cs | 22 +- NetSpeedTray/NetInterfaceManager.cs | 72 ---- NetSpeedTray/NetListener.cs | 123 ++++++ NetSpeedTray/NetSpeedTray.csproj | 76 ++-- NetSpeedTray/NetTraffice.cs | 68 ++-- NetSpeedTray/Program.cs | 1 + NetSpeedTray/Properties/AssemblyInfo.cs | 8 +- NetSpeedTray/Views/FrmLayout.Designer.cs | 79 ++-- NetSpeedTray/Views/FrmLayout.cs | 162 ++------ NetSpeedTray/Views/FrmLayout.resx | 12 +- .../FrmLegacy.Designer.cs} | 6 +- .../{Old/MainWindow.cs => Views/FrmLegacy.cs} | 57 +-- .../MainWindow.resx => Views/FrmLegacy.resx} | 0 NetSpeedTray/Views/MenuEvents.cs | 154 ++++++++ NetSpeedTray/Views/UCNetInterface.cs | 80 ---- NetSpeedTray/Views/UCNetInterfaceList.cs | 43 -- ...ist.Designer.cs => UCViewList.Designer.cs} | 2 +- NetSpeedTray/Views/UCViewList.cs | 53 +++ ...CNetInterfaceList.resx => UCViewList.resx} | 14 +- ...e.Designer.cs => UCViewSingle.Designer.cs} | 2 +- NetSpeedTray/Views/UCViewSingle.cs | 86 ++++ ...{UCNetInterface.resx => UCViewSingle.resx} | 0 .../Views/UCViewSingleGraph.Designer.cs | 77 ++++ NetSpeedTray/Views/UCViewSingleGraph.cs | 18 + NetSpeedTray/Views/UCViewSingleGraph.resx | 120 ++++++ NetSpeedTray/app.config | 12 +- NetSpeedTray/scroll.ico | Bin 0 -> 5430 bytes NetSpeedTrayLegacy/App.config | 6 + NetSpeedTrayLegacy/FrmLegacy.Designer.cs | 371 ++++++++++++++++++ NetSpeedTrayLegacy/FrmLegacy.cs | 314 +++++++++++++++ NetSpeedTrayLegacy/FrmLegacy.resx | 228 +++++++++++ NetSpeedTrayLegacy/NetSpeedTrayLegacy.csproj | 118 ++++++ NetSpeedTrayLegacy/Program.cs | 22 ++ NetSpeedTrayLegacy/Properties/AssemblyInfo.cs | 36 ++ .../Properties/Resources.Designer.cs | 143 +++++++ NetSpeedTrayLegacy/Properties/Resources.resx | 145 +++++++ .../Properties/Settings.Designer.cs | 26 ++ .../Properties/Settings.settings | 7 + NetSpeedTrayLegacy/Resources/2bs.png | Bin 0 -> 5963 bytes NetSpeedTrayLegacy/Resources/Close.png | Bin 0 -> 667 bytes NetSpeedTrayLegacy/Resources/Refresh.png | Bin 0 -> 679 bytes NetSpeedTrayLegacy/Resources/scroll-down.ico | Bin 0 -> 5430 bytes NetSpeedTrayLegacy/Resources/scroll-down.png | Bin 0 -> 1072 bytes NetSpeedTrayLegacy/Resources/scroll-up.ico | Bin 0 -> 5430 bytes NetSpeedTrayLegacy/Resources/scroll-up.png | Bin 0 -> 1103 bytes NetSpeedTrayLegacy/Resources/scroll.ico | Bin 0 -> 5430 bytes NetSpeedTrayLegacy/scroll.ico | Bin 0 -> 5430 bytes NetworkSpeed.sln | 24 ++ 50 files changed, 2275 insertions(+), 517 deletions(-) delete mode 100644 NetSpeedTray/NetInterfaceManager.cs create mode 100644 NetSpeedTray/NetListener.cs rename NetSpeedTray/{Old/MainWindow.Designer.cs => Views/FrmLegacy.Designer.cs} (99%) rename NetSpeedTray/{Old/MainWindow.cs => Views/FrmLegacy.cs} (83%) rename NetSpeedTray/{Old/MainWindow.resx => Views/FrmLegacy.resx} (100%) create mode 100644 NetSpeedTray/Views/MenuEvents.cs delete mode 100644 NetSpeedTray/Views/UCNetInterface.cs delete mode 100644 NetSpeedTray/Views/UCNetInterfaceList.cs rename NetSpeedTray/Views/{UCNetInterfaceList.Designer.cs => UCViewList.Designer.cs} (99%) create mode 100644 NetSpeedTray/Views/UCViewList.cs rename NetSpeedTray/Views/{UCNetInterfaceList.resx => UCViewList.resx} (93%) rename NetSpeedTray/Views/{UCNetInterface.Designer.cs => UCViewSingle.Designer.cs} (99%) create mode 100644 NetSpeedTray/Views/UCViewSingle.cs rename NetSpeedTray/Views/{UCNetInterface.resx => UCViewSingle.resx} (100%) create mode 100644 NetSpeedTray/Views/UCViewSingleGraph.Designer.cs create mode 100644 NetSpeedTray/Views/UCViewSingleGraph.cs create mode 100644 NetSpeedTray/Views/UCViewSingleGraph.resx create mode 100644 NetSpeedTray/scroll.ico create mode 100644 NetSpeedTrayLegacy/App.config create mode 100644 NetSpeedTrayLegacy/FrmLegacy.Designer.cs create mode 100644 NetSpeedTrayLegacy/FrmLegacy.cs create mode 100644 NetSpeedTrayLegacy/FrmLegacy.resx create mode 100644 NetSpeedTrayLegacy/NetSpeedTrayLegacy.csproj create mode 100644 NetSpeedTrayLegacy/Program.cs create mode 100644 NetSpeedTrayLegacy/Properties/AssemblyInfo.cs create mode 100644 NetSpeedTrayLegacy/Properties/Resources.Designer.cs create mode 100644 NetSpeedTrayLegacy/Properties/Resources.resx create mode 100644 NetSpeedTrayLegacy/Properties/Settings.Designer.cs create mode 100644 NetSpeedTrayLegacy/Properties/Settings.settings create mode 100644 NetSpeedTrayLegacy/Resources/2bs.png create mode 100644 NetSpeedTrayLegacy/Resources/Close.png create mode 100644 NetSpeedTrayLegacy/Resources/Refresh.png create mode 100644 NetSpeedTrayLegacy/Resources/scroll-down.ico create mode 100644 NetSpeedTrayLegacy/Resources/scroll-down.png create mode 100644 NetSpeedTrayLegacy/Resources/scroll-up.ico create mode 100644 NetSpeedTrayLegacy/Resources/scroll-up.png create mode 100644 NetSpeedTrayLegacy/Resources/scroll.ico create mode 100644 NetSpeedTrayLegacy/scroll.ico diff --git a/.gitignore b/.gitignore index 348453e..940794e 100644 --- a/.gitignore +++ b/.gitignore @@ -286,4 +286,3 @@ __pycache__/ *.btm.cs *.odx.cs *.xsd.cs -*.ivan diff --git a/NetSpeedTray/NetInterface.cs b/NetSpeedTray/NetInterface.cs index 15b9117..7c1ec6e 100644 --- a/NetSpeedTray/NetInterface.cs +++ b/NetSpeedTray/NetInterface.cs @@ -29,9 +29,9 @@ public class NetInterface public string StateText { get { return State.Text; } } - public string TrafficeDown { get { return Traffice.BytesReceivedSpeedText; } } + public string TrafficeDown { get { return Traffice.SpeedDownText; } } - public string TrafficeUp { get { return Traffice.BytesSentSpeedText; } } + public string TrafficeUp { get { return Traffice.SpeedUpText; } } IPInterfaceProperties ipProperties; diff --git a/NetSpeedTray/NetInterfaceList.cs b/NetSpeedTray/NetInterfaceList.cs index d184c88..636391a 100644 --- a/NetSpeedTray/NetInterfaceList.cs +++ b/NetSpeedTray/NetInterfaceList.cs @@ -13,8 +13,20 @@ public class NetInterfaceList : List public NetInterface SelectedInterface { get; private set; } + protected NetworkInterface nic; + protected StringBuilder sb; + /*public event PropertyChangedEventHandler PropertyChanged; + + private void NotifyPropertyChanged([CallerMemberName] String propertyName = "") + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + }*/ + public NetInterfaceList() : base() { @@ -39,12 +51,13 @@ public NetInterface GetFirstUpInterface() public override string ToString() { sb = new StringBuilder(); - sb.Append("Interfaces (").Append(CountUp.ToString()).Append("/").Append(Count.ToString()).Append(")"); + sb.Append("Networks (").Append(CountUp.ToString()).Append("/").Append(Count.ToString()).Append(")"); return sb.ToString(); } public void UpdateList() { + nic = null; CountUp = 0; FirstUp = -1; Clear(); @@ -54,12 +67,14 @@ public void UpdateList() return; } - foreach(NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) + for(int i = 0; i < NetworkInterface.GetAllNetworkInterfaces().Length; i++) { + nic = NetworkInterface.GetAllNetworkInterfaces()[i]; + if (nic.NetworkInterfaceType != NetworkInterfaceType.Tunnel && nic.NetworkInterfaceType != NetworkInterfaceType.Loopback) { - NetInterface ni = new NetInterface(nic, Count); + NetInterface ni = new NetInterface(nic, i); if (ni.State.Up) { @@ -74,6 +89,7 @@ public void UpdateList() ni.Update(); Add(ni); } + } if (FirstUp == -1) diff --git a/NetSpeedTray/NetInterfaceManager.cs b/NetSpeedTray/NetInterfaceManager.cs deleted file mode 100644 index bde8c88..0000000 --- a/NetSpeedTray/NetInterfaceManager.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; -using System.Net.NetworkInformation; - -namespace Devoldere.NetSpeedTray -{ - public class NetInterfaceManager - { - static protected readonly Timer TimerMain = new Timer { Interval = 10000 }; - - static protected readonly Timer TimerTraffice = new Timer { Interval = 1000 }; - - static public readonly Timer TimerApp = new Timer { Interval = 1200 }; - - static public NetInterfaceList InterfaceList { get; private set; } - - static public NetInterfaceList Init() - { - if(InterfaceList == null) - { - InterfaceList = new NetInterfaceList(); - TimerMain.Tick += Timer_Tick; - TimerTraffice.Tick += TimerTraffice_Tick; - } - - return InterfaceList; - } - - static public void Start() - { - TimerMain.Start(); - TimerTraffice.Start(); - TimerApp.Start(); - } - - static public void Stop() - { - TimerMain.Stop(); - TimerTraffice.Stop(); - TimerApp.Stop(); - } - - /// - /// Event timer Tick - /// - /// - /// - static public void Timer_Tick(object sender, EventArgs e) - { - foreach (NetInterface ni in InterfaceList) - { - ni.Update(); - } - } - - /// - /// Event timerTraffice Tick - /// - /// - /// - static public void TimerTraffice_Tick(object sender, EventArgs e) - { - foreach (NetInterface ni in InterfaceList) - { - ni.UpdateTraffice(); - } - } - - } -} diff --git a/NetSpeedTray/NetListener.cs b/NetSpeedTray/NetListener.cs new file mode 100644 index 0000000..9af6da3 --- /dev/null +++ b/NetSpeedTray/NetListener.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using System.Net.NetworkInformation; + +namespace Devoldere.NetSpeedTray +{ + public interface INetObserver + { + void NetUpdate(); + } + + public class NetListener + { + static protected readonly Timer AppTimer = new Timer { Interval = 10000, Enabled = false }; + + static protected readonly Timer NetTimer = new Timer { Interval = 1000, Enabled = false }; + + static public NetInterfaceList InterfaceList { get; private set; } = new NetInterfaceList(); + + static protected List appObs = new List(); + + static protected List netObs = new List(); + + #region Timers + + static public void Start() + { + AppTimer.Tick += AppTimer_Tick; + NetTimer.Tick += NetTimer_Tick; + AppTimer.Start(); + NetTimer.Start(); + } + + static public void Stop() + { + AppTimer.Tick -= AppTimer_Tick; + NetTimer.Tick -= NetTimer_Tick; + AppTimer.Stop(); + NetTimer.Stop(); + } + + /// + /// Event timer Tick + /// + /// + /// + static public void AppTimer_Tick(object sender, EventArgs e) + { + foreach (NetInterface ni in InterfaceList) + { + if(ni != null) + ni.Update(); + } + + Notify(appObs); + } + + /// + /// Event timerTraffice Tick + /// + /// + /// + static public void NetTimer_Tick(object sender, EventArgs e) + { + foreach (NetInterface ni in InterfaceList) + { + if (ni != null) + ni.UpdateTraffice(); + } + + Notify(netObs); + } + + #endregion + + #region Observers + + static public void AppRegister(INetObserver obs) + { + if (!appObs.Contains(obs)) + { + appObs.Add(obs); + } + } + + static public void NetRegister(INetObserver obs) + { + if (!netObs.Contains(obs)) + { + netObs.Add(obs); + } + } + + static public void Notify(List observers) + { + foreach (INetObserver obs in observers) + { + if (obs != null) + { + obs.NetUpdate(); + } + } + } + + static public void Release(INetObserver obs) + { + if (netObs.Contains(obs)) + { + netObs.Remove(obs); + } + + if (appObs.Contains(obs)) + { + appObs.Remove(obs); + } + } + + #endregion + + } +} diff --git a/NetSpeedTray/NetSpeedTray.csproj b/NetSpeedTray/NetSpeedTray.csproj index e4851db..7cd424d 100644 --- a/NetSpeedTray/NetSpeedTray.csproj +++ b/NetSpeedTray/NetSpeedTray.csproj @@ -10,7 +10,7 @@ Properties Devoldere.NetSpeedTray NetSpeedTray - v2.0 + v4.5 @@ -36,6 +36,7 @@ false true true + true @@ -48,6 +49,7 @@ AnyCPU + false pdbonly @@ -57,9 +59,10 @@ prompt 4 AnyCPU + false - Resources\scroll.ico + scroll.ico Devoldere.NetSpeedTray.Program @@ -74,6 +77,7 @@ ManagedMinimumRules.ruleset + false ..\bin\Release\ @@ -83,6 +87,7 @@ x86 prompt ManagedMinimumRules.ruleset + false true @@ -94,6 +99,7 @@ ManagedMinimumRules.ruleset + false ..\bin\Release\ @@ -102,6 +108,7 @@ x64 prompt ManagedMinimumRules.ruleset + false 027F613DFCFB16DECCFC76D684ABB61AD9D8ED1F @@ -127,52 +134,48 @@ + - - - - Form - - - MainWindow.cs - - + - - Form - - - FrmNetInterface.cs - Form FrmLayout.cs - + + Form + + + FrmLegacy.cs + + + UserControl - - UCNetInterface.cs + + UCViewSingle.cs - + UserControl - - UCNetInterfaceList.cs + + UCViewSingleGraph.cs + + + UserControl + + + UCViewList.cs - - Designer - MainWindow.cs - ResXFileCodeGenerator Resources.Designer.cs @@ -183,18 +186,22 @@ Resources.resx True - - FrmNetInterface.cs - FrmLayout.cs Designer - - UCNetInterface.cs + + FrmLegacy.cs + Designer + + + UCViewSingle.cs + + + UCViewSingleGraph.cs - - UCNetInterfaceList.cs + + UCViewList.cs @@ -235,6 +242,7 @@ + diff --git a/NetSpeedTray/NetTraffice.cs b/NetSpeedTray/NetTraffice.cs index 52b1f19..260079b 100644 --- a/NetSpeedTray/NetTraffice.cs +++ b/NetSpeedTray/NetTraffice.cs @@ -7,67 +7,65 @@ namespace Devoldere.NetSpeedTray { public class NetTraffice { + private const int BYTES_DIVIDER = 1024; + private static StringBuilder _bytesUnit; // bytsunit used by BytesFormat method - long lngBytesSend = 0; // bytes sent storage - long lngBytesReceived = 0; // bytes received storage - - private StringBuilder _bytesUnit; // bytsunit used by BytesFormat method - - public long BytesSentSpeed { get; private set; } - public long BytesReceivedSpeed { get; private set; } - - public string UnicastPacketsSent { get { return interfaceStatistic?.UnicastPacketsSent.ToString() ?? "0"; } } - - public string UnicastPacketsReceived { get { return interfaceStatistic?.UnicastPacketsReceived.ToString() ?? "0"; } } + private long _lngBytesSend = 0; // bytes sent storage + private long _lngBytesReceived = 0; // bytes received storage public string BytesSentText { get; private set; } - public string BytesReceivedText { get; private set; } - public string BytesSentSpeedText { get; private set; } + public long SpeedUp { get; private set; } + public long SpeedDown { get; private set; } - public string BytesReceivedSpeedText { get; private set; } + public string SpeedUpText { get; private set; } + public string SpeedDownText { get; private set; } + public string UnicastPacketsSent { get { return interfaceStatistic?.UnicastPacketsSent.ToString() ?? "0"; } } + public string UnicastPacketsReceived { get { return interfaceStatistic?.UnicastPacketsReceived.ToString() ?? "0"; } } + NetworkInterface oInterface; IPv4InterfaceStatistics interfaceStatistic; public NetTraffice() { - BytesSentSpeed = 0; - BytesReceivedSpeed = 0; + _lngBytesSend = 0; + _lngBytesReceived = 0; + SpeedUp = 0; + SpeedDown = 0; } - public NetTraffice(NetworkInterface _oInterface) + public NetTraffice(NetworkInterface _oInterface) : this() { SetInterface(_oInterface); } public void SetInterface(NetworkInterface _oInterface) { - BytesSentSpeed = 0; - BytesReceivedSpeed = 0; - lngBytesSend = 0; - lngBytesReceived = 0; oInterface = _oInterface; } public void Update() { - interfaceStatistic = oInterface.GetIPv4Statistics(); - - BytesSentSpeed = (interfaceStatistic.BytesSent - lngBytesSend); - BytesReceivedSpeed = (interfaceStatistic.BytesReceived - lngBytesReceived); - - BytesSentText = BytesFormat(interfaceStatistic.BytesSent, "B", 1024); - BytesReceivedText = BytesFormat(interfaceStatistic.BytesReceived, "B", 1024); - - BytesSentSpeedText = BytesFormat(BytesSentSpeed, "B/s", 1024); - BytesReceivedSpeedText = BytesFormat(BytesReceivedSpeed, "B/s", 1024); - - lngBytesSend = interfaceStatistic.BytesSent; - lngBytesReceived = interfaceStatistic.BytesReceived; + interfaceStatistic = oInterface?.GetIPv4Statistics(); + + if(interfaceStatistic != null) + { + BytesSentText = BytesFormat(interfaceStatistic.BytesSent, "B", 1024); + BytesReceivedText = BytesFormat(interfaceStatistic.BytesReceived, "B", 1024); + + SpeedUp = (interfaceStatistic.BytesSent - _lngBytesSend); + SpeedDown = (interfaceStatistic.BytesReceived - _lngBytesReceived); + + SpeedUpText = BytesFormat(SpeedUp, "B/s", 1024); + SpeedDownText = BytesFormat(SpeedDown, "B/s", 1024); + + _lngBytesSend = interfaceStatistic?.BytesSent ?? 0; + _lngBytesReceived = interfaceStatistic?.BytesReceived ?? 0; + } } /// @@ -77,7 +75,7 @@ public void Update() /// /// 1000 or 1024 /// - public string BytesFormat(double iValue, string sFormat, int iDivider) + public static string BytesFormat(double iValue, string sFormat, int iDivider) { if (iValue == 0) return "0"; diff --git a/NetSpeedTray/Program.cs b/NetSpeedTray/Program.cs index c25439d..d3608be 100644 --- a/NetSpeedTray/Program.cs +++ b/NetSpeedTray/Program.cs @@ -15,6 +15,7 @@ static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Views.FrmLayout()); + //Application.Run(new Views.FrmLegacy()); } } } \ No newline at end of file diff --git a/NetSpeedTray/Properties/AssemblyInfo.cs b/NetSpeedTray/Properties/AssemblyInfo.cs index 47c0bdc..975b3f4 100644 --- a/NetSpeedTray/Properties/AssemblyInfo.cs +++ b/NetSpeedTray/Properties/AssemblyInfo.cs @@ -9,9 +9,9 @@ [assembly: AssemblyTitle("NetSpeedTray")] [assembly: AssemblyDescription("NetworkInfo")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("DEVOLDERE")] +[assembly: AssemblyCompany("DEVOLDERE.NET")] [assembly: AssemblyProduct("NetSpeedTray")] -[assembly: AssemblyCopyright("Copyright © Devoldere 2018")] +[assembly: AssemblyCopyright("Copyright © Mickael Devoldere 2018")] [assembly: AssemblyTrademark("MDEVOLDERE")] [assembly: AssemblyCulture("")] @@ -30,6 +30,6 @@ // Build Number // Revision // -[assembly: AssemblyVersion("1.2.0.1")] -[assembly: AssemblyFileVersion("1.2.0.1")] +[assembly: AssemblyVersion("2.0.0.1")] +[assembly: AssemblyFileVersion("2.0.0.1")] [assembly: NeutralResourcesLanguageAttribute("")] diff --git a/NetSpeedTray/Views/FrmLayout.Designer.cs b/NetSpeedTray/Views/FrmLayout.Designer.cs index d989ab3..dbdd5cb 100644 --- a/NetSpeedTray/Views/FrmLayout.Designer.cs +++ b/NetSpeedTray/Views/FrmLayout.Designer.cs @@ -32,18 +32,18 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLayout)); this.oNotify = new System.Windows.Forms.NotifyIcon(this.components); this.oContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); - this.Exit = new System.Windows.Forms.ToolStripMenuItem(); + this.oContextMenuExit = new System.Windows.Forms.ToolStripMenuItem(); + this.contextMenuNetworks = new System.Windows.Forms.ToolStripMenuItem(); this.menuFile = new System.Windows.Forms.ToolStripMenuItem(); this.menuReload = new System.Windows.Forms.ToolStripMenuItem(); this.menuReloadNetwork = new System.Windows.Forms.ToolStripMenuItem(); this.menuAbout = new System.Windows.Forms.ToolStripMenuItem(); this.menuExit = new System.Windows.Forms.ToolStripMenuItem(); - this.menuInterfaces = new System.Windows.Forms.ToolStripMenuItem(); this.oMenu = new System.Windows.Forms.MenuStrip(); this.menuView = new System.Windows.Forms.ToolStripMenuItem(); - this.menuViewInterface = new System.Windows.Forms.ToolStripMenuItem(); + this.menuViewSingle = new System.Windows.Forms.ToolStripMenuItem(); this.menuViewList = new System.Windows.Forms.ToolStripMenuItem(); - this.netView = new Devoldere.NetSpeedTray.Views.UCNetInterface(); + this.menuNetworks = new System.Windows.Forms.ToolStripMenuItem(); this.oContextMenu.SuspendLayout(); this.oMenu.SuspendLayout(); this.SuspendLayout(); @@ -55,20 +55,27 @@ private void InitializeComponent() this.oNotify.Icon = ((System.Drawing.Icon)(resources.GetObject("oNotify.Icon"))); this.oNotify.Text = "NetSpeedTray"; this.oNotify.Visible = true; - this.oNotify.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseClick); + this.oNotify.MouseClick += new System.Windows.Forms.MouseEventHandler(this.NotifyIcon_MouseClick); // // oContextMenu // this.oContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.Exit}); + this.oContextMenuExit, + this.contextMenuNetworks}); this.oContextMenu.Name = "contextMenuStrip1"; - this.oContextMenu.Size = new System.Drawing.Size(163, 26); + this.oContextMenu.Size = new System.Drawing.Size(125, 48); // - // Exit + // oContextMenuExit // - this.Exit.Name = "Exit"; - this.Exit.Size = new System.Drawing.Size(162, 22); - this.Exit.Text = "contextMenuExit"; + this.oContextMenuExit.Name = "oContextMenuExit"; + this.oContextMenuExit.Size = new System.Drawing.Size(124, 22); + this.oContextMenuExit.Text = "Exit"; + // + // contextMenuNetworks + // + this.contextMenuNetworks.Name = "contextMenuNetworks"; + this.contextMenuNetworks.Size = new System.Drawing.Size(124, 22); + this.contextMenuNetworks.Text = "Networks"; // // menuFile // @@ -87,7 +94,6 @@ private void InitializeComponent() this.menuReload.Name = "menuReload"; this.menuReload.Size = new System.Drawing.Size(164, 22); this.menuReload.Text = "Reload"; - this.menuReload.Click += new System.EventHandler(this.ReloadApp); // // menuReloadNetwork // @@ -95,7 +101,6 @@ private void InitializeComponent() this.menuReloadNetwork.Name = "menuReloadNetwork"; this.menuReloadNetwork.Size = new System.Drawing.Size(164, 22); this.menuReloadNetwork.Text = "Reload Interfaces"; - this.menuReloadNetwork.Click += new System.EventHandler(this.ReloadNetwork); // // menuAbout // @@ -103,7 +108,6 @@ private void InitializeComponent() this.menuAbout.Name = "menuAbout"; this.menuAbout.Size = new System.Drawing.Size(164, 22); this.menuAbout.Text = "About"; - this.menuAbout.Click += new System.EventHandler(this.AboutApp); // // menuExit // @@ -111,42 +115,35 @@ private void InitializeComponent() this.menuExit.Name = "menuExit"; this.menuExit.Size = new System.Drawing.Size(164, 22); this.menuExit.Text = "Exit"; - this.menuExit.Click += new System.EventHandler(this.CloseApp); - // - // menuInterfaces - // - this.menuInterfaces.Name = "menuInterfaces"; - this.menuInterfaces.Size = new System.Drawing.Size(70, 20); - this.menuInterfaces.Text = "Interfaces"; // // oMenu // this.oMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuFile, this.menuView, - this.menuInterfaces}); + this.menuNetworks}); this.oMenu.Location = new System.Drawing.Point(0, 0); this.oMenu.Name = "oMenu"; this.oMenu.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2); this.oMenu.Size = new System.Drawing.Size(234, 24); - this.oMenu.TabIndex = 12; + this.oMenu.TabIndex = 1; // // menuView // this.menuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuViewInterface, + this.menuViewSingle, this.menuViewList}); this.menuView.Name = "menuView"; this.menuView.Size = new System.Drawing.Size(44, 20); this.menuView.Text = "View"; // - // menuViewInterface + // menuViewSingle // - this.menuViewInterface.Image = global::Devoldere.NetSpeedTray.Properties.Resources.single; - this.menuViewInterface.Name = "menuViewInterface"; - this.menuViewInterface.Size = new System.Drawing.Size(180, 22); - this.menuViewInterface.Text = "Single"; - this.menuViewInterface.Click += new System.EventHandler(this.menuViewInterface_Click); + this.menuViewSingle.Image = global::Devoldere.NetSpeedTray.Properties.Resources.single; + this.menuViewSingle.Name = "menuViewSingle"; + this.menuViewSingle.Size = new System.Drawing.Size(180, 22); + this.menuViewSingle.Text = "Single"; + this.menuViewSingle.Click += new System.EventHandler(this.MenuViewSingle_Click); // // menuViewList // @@ -154,22 +151,19 @@ private void InitializeComponent() this.menuViewList.Name = "menuViewList"; this.menuViewList.Size = new System.Drawing.Size(180, 22); this.menuViewList.Text = "Multi"; - this.menuViewList.Click += new System.EventHandler(this.menuViewList_Click); + this.menuViewList.Click += new System.EventHandler(this.MenuViewList_Click); // - // netView + // menuNetworks // - this.netView.Location = new System.Drawing.Point(11, 27); - this.netView.Name = "netView"; - this.netView.Notify = false; - this.netView.Size = new System.Drawing.Size(211, 150); - this.netView.TabIndex = 13; + this.menuNetworks.Name = "menuNetworks"; + this.menuNetworks.Size = new System.Drawing.Size(69, 20); + this.menuNetworks.Text = "Networks"; // // FrmLayout // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(234, 182); - this.Controls.Add(this.netView); this.Controls.Add(this.oMenu); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = global::Devoldere.NetSpeedTray.Properties.Resources.scroll; @@ -181,6 +175,7 @@ private void InitializeComponent() this.Text = "NetSpeed"; this.TopMost = true; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmLayout_FormClosing); + this.Load += new System.EventHandler(this.FrmLayout_Load); this.oContextMenu.ResumeLayout(false); this.oMenu.ResumeLayout(false); this.oMenu.PerformLayout(); @@ -192,18 +187,18 @@ private void InitializeComponent() #endregion private System.Windows.Forms.NotifyIcon oNotify; private System.Windows.Forms.ContextMenuStrip oContextMenu; - private System.Windows.Forms.ToolStripMenuItem Exit; + private System.Windows.Forms.ToolStripMenuItem oContextMenuExit; private System.Windows.Forms.ToolStripMenuItem menuFile; private System.Windows.Forms.ToolStripMenuItem menuReload; private System.Windows.Forms.ToolStripMenuItem menuReloadNetwork; private System.Windows.Forms.ToolStripMenuItem menuAbout; private System.Windows.Forms.ToolStripMenuItem menuExit; - private System.Windows.Forms.ToolStripMenuItem menuInterfaces; internal System.Windows.Forms.MenuStrip oMenu; private System.Windows.Forms.ToolStripMenuItem menuView; - private System.Windows.Forms.ToolStripMenuItem menuViewInterface; - private UCNetInterface netView; + private System.Windows.Forms.ToolStripMenuItem menuViewSingle; private System.Windows.Forms.ToolStripMenuItem menuViewList; + private System.Windows.Forms.ToolStripMenuItem contextMenuNetworks; + private System.Windows.Forms.ToolStripMenuItem menuNetworks; } } diff --git a/NetSpeedTray/Views/FrmLayout.cs b/NetSpeedTray/Views/FrmLayout.cs index f7bdfc7..5aa4227 100644 --- a/NetSpeedTray/Views/FrmLayout.cs +++ b/NetSpeedTray/Views/FrmLayout.cs @@ -11,170 +11,76 @@ namespace Devoldere.NetSpeedTray.Views { public partial class FrmLayout : Form { - protected static NetInterface currentInterface; - - protected static UCNetInterfaceList listView; - - private static Size netViewSize; + static Point p = new Point(5, 30); - private static Size listViewSize; - - #region CONSTRUCTOR + #region INIT /// /// Initialize /// public FrmLayout() { InitializeComponent(); - NetInterfaceManager.Init(); - netViewSize = new Size(netView.Width + 30, netView.Height + 75); - UpdateInterfaces(); - } - #endregion - - #region Interface list update - - /// - /// Update Network Interfaces & bound menuInterfaces Items - /// - protected void UpdateInterfaces() - { - NetInterfaceManager.Stop(); - - NetInterfaceManager.InterfaceList.UpdateList(); - - menuInterfaces.DropDownItems.Clear(); - foreach (NetInterface ni in NetInterfaceManager.InterfaceList) - { - ToolStripMenuItem oItem = new ToolStripMenuItem(ni.Name) - { - ForeColor = ni.State.ForeColor, - Tag = ni.Id, - Image = ni.State.Png - }; - - oItem.Click += SelectInterface; - menuInterfaces.DropDownItems.Add(oItem); - } - - menuInterfaces.Text = NetInterfaceManager.InterfaceList.ToString(); - - NetInterfaceManager.Start(); - - SelectInterface(NetInterfaceManager.InterfaceList.FirstUp); - - + menuReload.Click += MenuEvents.ReloadApp_Click; + menuAbout.Click += MenuEvents.AboutApp_Click; + menuExit.Click += MenuEvents.CloseApp_Click; + menuReloadNetwork.Click += MenuEvents.ReloadNetwork_Click; + oContextMenuExit.Click += MenuEvents.CloseApp_Click; } - #endregion - - #region INTERFACE SELECTION - - /// - /// Select an interface by its ID in NetInterfaceManager.InterfaceList - /// - /// Interface ID (array key in GetAllNetworkInterfaces() - private void SelectInterface(int iId) + private void FrmLayout_Load(object sender, EventArgs e) { - netView.SetInterface(iId); + menuReloadNetwork.Tag = new ToolStripMenuItem[] { menuNetworks, contextMenuNetworks }; - this.Text = netView.CurrentInterface.Name; - this.Icon = netView.CurrentInterface.State.Ico; + MenuEvents.ReloadNetwork_Click(menuReloadNetwork, new EventArgs()); - oNotify.BalloonTipTitle = netView.CurrentInterface.Name; - } + oNotify.ContextMenuStrip = oContextMenu; - /// - /// MenuClick : Select an interface - /// - /// a ToolStripMenuItem - /// EventArgs - private void SelectInterface(object sender, EventArgs e) - { - ToolStripMenuItem oItem = sender as ToolStripMenuItem; - SelectInterface((int)oItem.Tag); + MenuEvents.BindViews(this, p); + + MenuViewSingle_Click(menuViewSingle, e); } #endregion #region EVENTS - - private void ReloadApp(object sender, EventArgs e) - { - Application.Restart(); - } - - private void ReloadNetwork(object sender, EventArgs e) - { - UpdateInterfaces(); - } - - private void CloseApp(object sender, EventArgs e) - { - Environment.Exit(0); - } - - private void AboutApp(object sender, EventArgs e) - { - DialogResult mResult = MessageBox.Show - ( - System.Reflection.Assembly.GetExecutingAssembly().GetName().Name + - " " + - System.Reflection.Assembly.GetExecutingAssembly().GetName().Version + - " (" + Properties.Settings.Default.PublishDate + ")\r" + - Properties.Settings.Default.Author + "\r" + - Properties.Settings.Default.Url + "\r\r" + - "Do you wish to visit "+ Properties.Settings.Default.UrlLabel + " ?", - System.Reflection.Assembly.GetExecutingAssembly().GetName().Name, - MessageBoxButtons.YesNo, - MessageBoxIcon.None - ); - - if(mResult == DialogResult.Yes) + + private void NotifyIcon_MouseClick(object sender, MouseEventArgs e) + { + if(e.Button == MouseButtons.Right) { - System.Diagnostics.Process.Start(Properties.Settings.Default.Url); + oContextMenu.Visible = !oContextMenu.Visible; + return; } - } - private void notifyIcon_MouseClick(object sender, MouseEventArgs e) - { this.Visible = !this.Visible; } - #endregion - private void menuViewInterface_Click(object sender, EventArgs e) + private void SetSize(UserControl uc) { - if(listView != null) - { - listView.Hide(); - } - - menuInterfaces.Visible = true; - this.Size = netViewSize; - netView.Show(); + Height = (uc.Height + 75); + Width = (uc.Width + 30); } - private void menuViewList_Click(object sender, EventArgs e) + private void MenuViewSingle_Click(object sender, EventArgs e) { - if (listView == null) - { - listView = new Views.UCNetInterfaceList(); - listView.Location = netView.Location; - listViewSize = new Size(listView.Width + 30, listView.Height + 50); - this.Controls.Add(listView); - } + MenuEvents.ViewSingle(); + SetSize(MenuEvents.ViewNetInterface); + } - netView.Hide(); - menuInterfaces.Visible = false; - this.Size = listViewSize; - listView.Show(); + private void MenuViewList_Click(object sender, EventArgs e) + { + MenuEvents.ViewList(); + SetSize(MenuEvents.ViewNetInterfaceList); } private void FrmLayout_FormClosing(object sender, FormClosingEventArgs e) { oNotify.Visible = false; } + + #endregion + } } diff --git a/NetSpeedTray/Views/FrmLayout.resx b/NetSpeedTray/Views/FrmLayout.resx index 88691fe..14557e9 100644 --- a/NetSpeedTray/Views/FrmLayout.resx +++ b/NetSpeedTray/Views/FrmLayout.resx @@ -112,15 +112,15 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 361, 17 - + AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQ @@ -216,10 +216,10 @@ AAAAAAAAAAAAAAAAAAAAAAAA4H8AAOB/AAD//wAA - + 464, 17 - + 235, 17 \ No newline at end of file diff --git a/NetSpeedTray/Old/MainWindow.Designer.cs b/NetSpeedTray/Views/FrmLegacy.Designer.cs similarity index 99% rename from NetSpeedTray/Old/MainWindow.Designer.cs rename to NetSpeedTray/Views/FrmLegacy.Designer.cs index 906e1a7..2d1fae7 100644 --- a/NetSpeedTray/Old/MainWindow.Designer.cs +++ b/NetSpeedTray/Views/FrmLegacy.Designer.cs @@ -1,6 +1,6 @@ -namespace Devoldere.NetSpeedTray +namespace Devoldere.NetSpeedTray.Views { - partial class MainWindow + partial class FrmLegacy { /// /// Required designer variable. @@ -29,7 +29,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLegacy)); this.lblSrLbl = new System.Windows.Forms.Label(); this.lblSrUp = new System.Windows.Forms.Label(); this.oTimer = new System.Windows.Forms.Timer(this.components); diff --git a/NetSpeedTray/Old/MainWindow.cs b/NetSpeedTray/Views/FrmLegacy.cs similarity index 83% rename from NetSpeedTray/Old/MainWindow.cs rename to NetSpeedTray/Views/FrmLegacy.cs index 5ffd0ba..d96b638 100644 --- a/NetSpeedTray/Old/MainWindow.cs +++ b/NetSpeedTray/Views/FrmLegacy.cs @@ -7,12 +7,12 @@ using System.Windows.Forms; using System.Net.NetworkInformation; -namespace Devoldere.NetSpeedTray +namespace Devoldere.NetSpeedTray.Views { /// /// Old Standalone Form (working, disabled in current version) /// - public partial class MainWindow : Form + public partial class FrmLegacy : Form { #region PROPERTIES @@ -37,7 +37,7 @@ public partial class MainWindow : Form /// /// Initialize and Retrieve interfaces info /// - public MainWindow() + public FrmLegacy() { InitializeComponent(); @@ -91,7 +91,7 @@ private void MenuInterfacesAdd(NetworkInterface anInterface) oItem.Tag = iInterface; oItem.Click += new System.EventHandler(this.SelectInterface); oItem.Image = Devoldere.NetSpeedTray.Properties.Resources.scroll_down_png; - if (anInterface.OperationalStatus.ToString() == "Up") + if (anInterface.OperationalStatus == OperationalStatus.Up) { oItem.ForeColor = Color.Black; oItem.Image = Devoldere.NetSpeedTray.Properties.Resources.scroll_up_png; @@ -114,7 +114,7 @@ private void SelectInterface() lblName.Text = oInterface.Name; this.Text = oInterface.Name + " " + oInterface.OperationalStatus.ToString(); - if (oInterface.OperationalStatus.ToString() == "Up") + if (oInterface.OperationalStatus == OperationalStatus.Up) { IsUp(); } @@ -288,7 +288,7 @@ private void AboutApp(object sender, EventArgs e) { DialogResult mResult = MessageBox.Show ( - "NetSpeedTray 1.0.0.1 (2014/12)\rMickaël Devoldère\rhttp://devoldere.net\r\rDo you wish to visit devoldere.net ?", + "NetSpeedTray 1.1.0.3 (Legacy)\rMickaël Devoldère\rhttps://devoldere.net\r\rDo you wish to visit devoldere.net ?", "DEVOLDERE", MessageBoxButtons.YesNo, MessageBoxIcon.None @@ -296,60 +296,19 @@ private void AboutApp(object sender, EventArgs e) if(mResult == DialogResult.Yes) { - System.Diagnostics.Process.Start("http://devoldere.net"); + System.Diagnostics.Process.Start("https://devoldere.net"); } } private void notifyIcon_MouseClick(object sender, MouseEventArgs e) { - cbNotify.Checked = (this.Visible == true) ? cbNotify.Checked : false; + //cbNotify.Checked = (this.Visible == true) ? cbNotify.Checked : false; this.Visible = (this.Visible == true) ? false : true; - //this.Location = new Point - //( - // (Screen.PrimaryScreen.Bounds.Width - 290), - // (Screen.PrimaryScreen.Bounds.Height - 290) - //); } #endregion - #region TODO_AND_TESTS - //[DllImportAttribute("user32.dll")] - //public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); - //[DllImportAttribute("user32.dll")] - //public static extern bool ReleaseCapture(); - - //private void Win_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - //{ - // if (e.Button == MouseButtons.Left) - // { - // ReleaseCapture(); - // SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); - // } - //} - - //private void Win_MouseDown(object sender, MouseEventArgs e) - //{ - // dragging = true; - // dragCursorPoint = Cursor.Position; - // dragFormPoint = this.Location; - //} - - //private void Win_MouseMove(object sender, MouseEventArgs e) - //{ - // if (dragging) - // { - // Point dif = Point.Subtract(Cursor.Position, new Size(dragCursorPoint)); - // this.Location = Point.Add(dragFormPoint, new Size(dif)); - // } - //} - - //private void Win_MouseUp(object sender, MouseEventArgs e) - //{ - // dragging = false; - //} - #endregion } } diff --git a/NetSpeedTray/Old/MainWindow.resx b/NetSpeedTray/Views/FrmLegacy.resx similarity index 100% rename from NetSpeedTray/Old/MainWindow.resx rename to NetSpeedTray/Views/FrmLegacy.resx diff --git a/NetSpeedTray/Views/MenuEvents.cs b/NetSpeedTray/Views/MenuEvents.cs new file mode 100644 index 0000000..de0d1f2 --- /dev/null +++ b/NetSpeedTray/Views/MenuEvents.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Net.NetworkInformation; + +namespace Devoldere.NetSpeedTray.Views +{ + public class MenuEvents + { + public static UCViewSingle ViewNetInterface { get; private set; } = new UCViewSingle(); + + public static UCViewList ViewNetInterfaceList { get; private set; } = new UCViewList(); + + private static StringBuilder sb; + + + #region MenuNetworks + + public static void ReloadNetwork_Click(object sender, EventArgs e) + { + ToolStripItem oItem = sender as ToolStripItem; + + ToolStripMenuItem[] oMenus = (oItem?.Tag as ToolStripMenuItem[]); + + if (oMenus != null) + { + NetListener.Stop(); + + NetListener.InterfaceList.UpdateList(); + + foreach (ToolStripMenuItem oMenu in oMenus) + { + SetMenuInterfaces(oMenu); + } + + NetListener.Start(); + + ViewNetInterface.SetInterface(NetListener.InterfaceList.FirstUp); + } + + + } + + public static void SetMenuInterfaces(ToolStripMenuItem m) + { + m.DropDownItems.Clear(); + + foreach (NetInterface ni in NetListener.InterfaceList) + { + ToolStripMenuItem oItem = new ToolStripMenuItem(ni.Name) + { + ForeColor = ni.State.ForeColor, + Tag = ni.Id, + Image = ni.State.Png, + }; + + oItem.Click += SelectInterface_Click; + + m.DropDownItems.Add(oItem); + } + + m.Text = NetListener.InterfaceList.ToString(); + } + + /// + /// MenuClick : Select an interface + /// + /// a ToolStripMenuItem + /// EventArgs + public static void SelectInterface_Click(object sender, EventArgs e) + { + ToolStripItem oItem = sender as ToolStripItem; + + if (oItem != null) + { + ViewNetInterface.SetInterface((int)oItem.Tag); + } + } + + #endregion + + #region MenuView + + public static void BindViews(Form frm, Point p) + { + frm.Controls.Add(ViewNetInterface); + frm.Controls.Add(ViewNetInterfaceList); + + ViewNetInterface.Location = p; + ViewNetInterfaceList.Location = p; + + ViewNetInterface.Hide(); + ViewNetInterfaceList.Hide(); + } + + public static void ViewSingle() + { + ViewNetInterfaceList.Hide(); + ViewNetInterface.Show(); + } + + public static void ViewList() + { + ViewNetInterface.Hide(); + ViewNetInterfaceList.Show(); + } + + #endregion + + #region MenuFile + + public static void ReloadApp_Click(object sender, EventArgs e) + { + Application.Restart(); + } + + public static void CloseApp_Click(object sender, EventArgs e) + { + Environment.Exit(0); + } + + public static void AboutApp_Click(object sender, EventArgs e) + { + if (sb == null) + { + sb = new StringBuilder(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name).Append(" "); + sb.Append(System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); + sb.Append(" (").Append(Properties.Settings.Default.PublishDate).Append(")\r"); + sb.Append(Properties.Settings.Default.Author).Append("\r"); + sb.Append(Properties.Settings.Default.Url).Append("\r\r"); + sb.Append("Do you wish to visit ").Append(Properties.Settings.Default.UrlLabel).Append(" ?"); + } + + DialogResult mResult = MessageBox.Show + ( + sb.ToString(), + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name, + MessageBoxButtons.YesNo, + MessageBoxIcon.None + ); + + if (mResult == DialogResult.Yes) + { + System.Diagnostics.Process.Start(Properties.Settings.Default.Url); + } + } + + #endregion + } +} diff --git a/NetSpeedTray/Views/UCNetInterface.cs b/NetSpeedTray/Views/UCNetInterface.cs deleted file mode 100644 index 2d26852..0000000 --- a/NetSpeedTray/Views/UCNetInterface.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; -using System.Windows.Forms; - -namespace Devoldere.NetSpeedTray.Views -{ - public partial class UCNetInterface : UserControl - { - #region PROPERTIES - - public bool Notify { get; set; } - - public NetInterfaceList InterfaceList { get; private set; } - - public NetInterface CurrentInterface { get; private set; } - - public NetTraffice CurrentTraffice { get; private set; } - - #endregion - - public UCNetInterface() - { - InitializeComponent(); - - InterfaceList = NetInterfaceManager.Init(); - - } - - public void SetInterface(int _id) - { - NetInterfaceManager.TimerApp.Tick -= timer_Tick; - - CurrentInterface = NetInterfaceManager.InterfaceList.GetInterface(_id); - - CurrentTraffice = NetInterfaceManager.InterfaceList.SelectedInterface.Traffice; - - lblName.Text = NetInterfaceManager.InterfaceList.SelectedInterface.Text; - lblName.ForeColor = NetInterfaceManager.InterfaceList.SelectedInterface.State.ForeColor; - - NetInterfaceManager.TimerApp.Tick += timer_Tick; - } - - #region TIMER - /// - /// Event oTimer Tick - /// - /// - /// - private void timer_Tick(object sender, EventArgs e) - { - // if(NetInterfaceManager.InterfaceList.SelectedInterface.State.Up) - //{ - lblSrUp.Text = CurrentTraffice.UnicastPacketsSent; - lblSrDown.Text = CurrentTraffice.UnicastPacketsReceived; - lblBytesUp.Text = CurrentTraffice.BytesSentText; - lblBytesDown.Text = CurrentTraffice.BytesReceivedText; - lblUl.Text = CurrentTraffice.BytesSentSpeedText; - lblDl.Text = CurrentTraffice.BytesReceivedSpeedText; - // } - - - /*if ( - (Notify) && - ((CurrentTraffice.BytesReceivedSpeed >= 1) || (CurrentTraffice.BytesSentSpeed >= 1)) - ) - { - oNotify.Text = "Up: " + lblUl.Text + "\nDown: " + lblDl.Text; - oNotify.BalloonTipText = oNotify.Text; - oNotify.ShowBalloonTip(2500); - }*/ - } - - #endregion - - } -} diff --git a/NetSpeedTray/Views/UCNetInterfaceList.cs b/NetSpeedTray/Views/UCNetInterfaceList.cs deleted file mode 100644 index 2e441a1..0000000 --- a/NetSpeedTray/Views/UCNetInterfaceList.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; -using System.Windows.Forms; - -namespace Devoldere.NetSpeedTray.Views -{ - public partial class UCNetInterfaceList : UserControl - { - BindingSource data; - - public UCNetInterfaceList() - { - InitializeComponent(); - - data = new BindingSource(); - data.DataSource = NetInterfaceManager.InterfaceList; - dataGrid.AutoGenerateColumns = false; - dataGrid.DataSource = null; - dataGrid.DataSource = data; - dataGrid.Refresh(); - NetInterfaceManager.TimerApp.Tick += timer_Tick; - } - - #region TIMER - /// - /// Event oTimer Tick - /// - /// - /// - private void timer_Tick(object sender, EventArgs e) - { - data.DataSource = null; - data.DataSource = NetInterfaceManager.InterfaceList; - dataGrid.Update(); - } - - #endregion - } -} diff --git a/NetSpeedTray/Views/UCNetInterfaceList.Designer.cs b/NetSpeedTray/Views/UCViewList.Designer.cs similarity index 99% rename from NetSpeedTray/Views/UCNetInterfaceList.Designer.cs rename to NetSpeedTray/Views/UCViewList.Designer.cs index aa32625..c023ab1 100644 --- a/NetSpeedTray/Views/UCNetInterfaceList.Designer.cs +++ b/NetSpeedTray/Views/UCViewList.Designer.cs @@ -1,6 +1,6 @@ namespace Devoldere.NetSpeedTray.Views { - partial class UCNetInterfaceList + partial class UCViewList { /// /// Variable nécessaire au concepteur. diff --git a/NetSpeedTray/Views/UCViewList.cs b/NetSpeedTray/Views/UCViewList.cs new file mode 100644 index 0000000..5d33310 --- /dev/null +++ b/NetSpeedTray/Views/UCViewList.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace Devoldere.NetSpeedTray.Views +{ + public partial class UCViewList : UserControl, INetObserver + { + BindingSource data; + + public UCViewList() + { + InitializeComponent(); + + dataGrid.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + + dataGrid.DefaultCellStyle.SelectionForeColor = dataGrid.DefaultCellStyle.ForeColor; + dataGrid.DefaultCellStyle.SelectionBackColor = dataGrid.DefaultCellStyle.BackColor; + + data = new BindingSource(); + data.DataSource = NetListener.InterfaceList; + dataGrid.AutoGenerateColumns = false; + dataGrid.DataSource = null; + dataGrid.DataSource = data; + dataGrid.Refresh(); + NetListener.NetRegister(this); + } + + #region TIMER + /// + /// Event NetListener.*Timer Tick + /// + public void NetUpdate() + { + Point p = dataGrid.CurrentCellAddress; + data.CurrentItemChanged += ItemUpdated; + data.DataSource = null; + data.DataSource = NetListener.InterfaceList; + dataGrid.Update(); + } + + protected void ItemUpdated(object sender, EventArgs e) + { + + } + + #endregion + } +} diff --git a/NetSpeedTray/Views/UCNetInterfaceList.resx b/NetSpeedTray/Views/UCViewList.resx similarity index 93% rename from NetSpeedTray/Views/UCNetInterfaceList.resx rename to NetSpeedTray/Views/UCViewList.resx index 897a793..b7c39f2 100644 --- a/NetSpeedTray/Views/UCNetInterfaceList.resx +++ b/NetSpeedTray/Views/UCViewList.resx @@ -112,24 +112,24 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True - + True - + True - + True - + True \ No newline at end of file diff --git a/NetSpeedTray/Views/UCNetInterface.Designer.cs b/NetSpeedTray/Views/UCViewSingle.Designer.cs similarity index 99% rename from NetSpeedTray/Views/UCNetInterface.Designer.cs rename to NetSpeedTray/Views/UCViewSingle.Designer.cs index dfb3460..93243b2 100644 --- a/NetSpeedTray/Views/UCNetInterface.Designer.cs +++ b/NetSpeedTray/Views/UCViewSingle.Designer.cs @@ -1,6 +1,6 @@ namespace Devoldere.NetSpeedTray.Views { - partial class UCNetInterface + partial class UCViewSingle { /// /// Variable nécessaire au concepteur. diff --git a/NetSpeedTray/Views/UCViewSingle.cs b/NetSpeedTray/Views/UCViewSingle.cs new file mode 100644 index 0000000..2ce1685 --- /dev/null +++ b/NetSpeedTray/Views/UCViewSingle.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace Devoldere.NetSpeedTray.Views +{ + public partial class UCViewSingle : UserControl, INetObserver + { + #region PROPERTIES + + public bool Notify { get; set; } + + public NetInterface CurrentInterface { get; private set; } + + public NetTraffice CurrentTraffice { get; private set; } + + #endregion + + public UCViewSingle() + { + InitializeComponent(); + + NetListener.NetRegister(this); + } + + public void NetUpdate() + { + if(CurrentTraffice != null) + { + lblSrUp.Text = CurrentTraffice.UnicastPacketsSent; + lblSrDown.Text = CurrentTraffice.UnicastPacketsReceived; + lblBytesUp.Text = CurrentTraffice.BytesSentText; + lblBytesDown.Text = CurrentTraffice.BytesReceivedText; + lblUl.Text = CurrentTraffice.SpeedUpText; + lblDl.Text = CurrentTraffice.SpeedDownText; + } + } + + public void SetInterface(int _id) + { + CurrentInterface = NetListener.InterfaceList.GetInterface(_id); + + CurrentTraffice = NetListener.InterfaceList.SelectedInterface.Traffice; + + lblName.Text = NetListener.InterfaceList.SelectedInterface.Text; + lblName.ForeColor = NetListener.InterfaceList.SelectedInterface.State.ForeColor; + } + + #region TIMER + /// + /// Event oTimer Tick + /// + /// + /// + //private void timer_Tick(object sender, EventArgs e) + //{ + // if(NetInterfaceManager.InterfaceList.SelectedInterface.State.Up) + // { + // lblSrUp.Text = CurrentTraffice.UnicastPacketsSent; + // lblSrDown.Text = CurrentTraffice.UnicastPacketsReceived; + // lblBytesUp.Text = CurrentTraffice.BytesSentText; + // lblBytesDown.Text = CurrentTraffice.BytesReceivedText; + // lblUl.Text = CurrentTraffice.BytesSentSpeedText; + // lblDl.Text = CurrentTraffice.BytesReceivedSpeedText; + // } + + + // if ( + // (Notify) && + // ((CurrentTraffice.BytesReceivedSpeed >= 1) || (CurrentTraffice.BytesSentSpeed >= 1)) + // ) + // { + // oNotify.Text = "Up: " + lblUl.Text + "\nDown: " + lblDl.Text; + // oNotify.BalloonTipText = oNotify.Text; + // oNotify.ShowBalloonTip(2500); + // } + //} + + #endregion + + } +} diff --git a/NetSpeedTray/Views/UCNetInterface.resx b/NetSpeedTray/Views/UCViewSingle.resx similarity index 100% rename from NetSpeedTray/Views/UCNetInterface.resx rename to NetSpeedTray/Views/UCViewSingle.resx diff --git a/NetSpeedTray/Views/UCViewSingleGraph.Designer.cs b/NetSpeedTray/Views/UCViewSingleGraph.Designer.cs new file mode 100644 index 0000000..5aaa8e9 --- /dev/null +++ b/NetSpeedTray/Views/UCViewSingleGraph.Designer.cs @@ -0,0 +1,77 @@ +namespace Devoldere.NetSpeedTray.Views +{ + partial class UCViewSingleGraph + { + /// + /// Variable nécessaire au concepteur. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Nettoyage des ressources utilisées. + /// + /// true si les ressources managées doivent être supprimées ; sinon, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Code généré par le Concepteur de composants + + /// + /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas + /// le contenu de cette méthode avec l'éditeur de code. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); + this.netChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); + ((System.ComponentModel.ISupportInitialize)(this.netChart)).BeginInit(); + this.SuspendLayout(); + // + // netChart + // + chartArea1.Name = "netChartTraffice"; + this.netChart.ChartAreas.Add(chartArea1); + legend1.Name = "Legend1"; + this.netChart.Legends.Add(legend1); + this.netChart.Location = new System.Drawing.Point(3, 3); + this.netChart.Name = "netChart"; + series1.ChartArea = "netChartTraffice"; + series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; + series1.Legend = "Legend1"; + series1.Name = "Download"; + series2.ChartArea = "netChartTraffice"; + series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series2.Legend = "Legend1"; + series2.Name = "Upload"; + this.netChart.Series.Add(series1); + this.netChart.Series.Add(series2); + this.netChart.Size = new System.Drawing.Size(507, 193); + this.netChart.TabIndex = 0; + this.netChart.Text = "chart1"; + // + // UCNetInterfaceGraph + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.netChart); + this.Name = "UCNetInterfaceGraph"; + this.Size = new System.Drawing.Size(513, 247); + ((System.ComponentModel.ISupportInitialize)(this.netChart)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataVisualization.Charting.Chart netChart; + } +} diff --git a/NetSpeedTray/Views/UCViewSingleGraph.cs b/NetSpeedTray/Views/UCViewSingleGraph.cs new file mode 100644 index 0000000..8d226a2 --- /dev/null +++ b/NetSpeedTray/Views/UCViewSingleGraph.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace Devoldere.NetSpeedTray.Views +{ + public partial class UCViewSingleGraph : UserControl + { + public UCViewSingleGraph() + { + InitializeComponent(); + } + } +} diff --git a/NetSpeedTray/Views/UCViewSingleGraph.resx b/NetSpeedTray/Views/UCViewSingleGraph.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/NetSpeedTray/Views/UCViewSingleGraph.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/NetSpeedTray/app.config b/NetSpeedTray/app.config index eff9ea5..1511dcd 100644 --- a/NetSpeedTray/app.config +++ b/NetSpeedTray/app.config @@ -1,11 +1,11 @@ - + - -
+ +
- -
+ +
@@ -28,4 +28,4 @@ - \ No newline at end of file + diff --git a/NetSpeedTray/scroll.ico b/NetSpeedTray/scroll.ico new file mode 100644 index 0000000000000000000000000000000000000000..045bb346d247f72fc803289e717b92d213cba4a4 GIT binary patch literal 5430 zcmeHLZERCj7``a@$B>{2{N67y@rPf(2`FMP3I;`I+)&YIAP9@N`2$DWjVTN^2mBEQ zG)7`fFn%OtFbMJ)*)K;7%BN`7b#2$)wzqe;x9x5B`aGu}-gRZGe1w>AlBef=pZ9&w zd+zD!x$mi_P1Eku>gqJ~b=tSHH0=RR(`KQkzG}Lr{R;U(aB$HU0OVBzfB(G&6bMZd zkvq7JYf$%kHOA4%-P=DXzu)Agn_rb}YhRE|G9;0|&dSKufikF*r=5N~;6K@T%uSs9rb|xj>y)EkZjvK=ymEMV zb!~5hp3$6$=zWo_6|GkI$<79KTxrTrMxIt*zoX zj-*m4u`H_$>f~w9VV+sY%;#yCr+l*x)(m_t@f@dGe)2w_PaMq88XXlgnJj}k`G4(} zq%0fHnL&OV{#J#3^7v}`(`j4U+S)LtEy<)Ii9}osBcXcg6YNIO4xg%a#B&Uy(q1ip z(oBlS;}H{mJRXyHA|VFWfIW5cUauFuA+eY)x*jcqI{8}d*&+NK`x}itb@JhGSVHu>LAdj8 zS-n){2?T~D7z|2OkBjfM1vt;+V#NZgr%s-B`UQskH-u9D<2e61*DO={OCQXYPKG7s z|3mb_bE>CK{${me{#nf5)%3D#eRmno;idBNJI~@h5|r>IobMNYDT6wB+PAD;qQGi}{N%lQ9O9#rvt#02?P{IV+lr+|5?_AneCuK@2rHMO4i8;l;DE9y?idmQA>b@gXm!H+<$9KWn@ z!#$8KpRp7ucNOkI%BOEnd-Bld9yz${L+RbML4oqY&suR;@Tqr*W23$pIOU-^^_T^^9oh0_X@+gC0shcFi#>uU#fD(g(vuarx*wD0vNL=XO{&<5GT zJ%Bd)^nSWQ#oMS0Gnus5Hf!Ti1=fVDxii_cw7;=XA(PDrZwj>0kI&4OLR@R>Mip~b8nm47fvcF!SkmSD08nI+3Qn# zMeQr@Ef-w-SnJ|m&EYP=cPl`doZDwId1p)G5AOFPWpb0n;Ms2MjJq5ERRaH|{q5B> I0;#os0BlN$0RR91 literal 0 HcmV?d00001 diff --git a/NetSpeedTrayLegacy/App.config b/NetSpeedTrayLegacy/App.config new file mode 100644 index 0000000..d1428ad --- /dev/null +++ b/NetSpeedTrayLegacy/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/NetSpeedTrayLegacy/FrmLegacy.Designer.cs b/NetSpeedTrayLegacy/FrmLegacy.Designer.cs new file mode 100644 index 0000000..3f04b7c --- /dev/null +++ b/NetSpeedTrayLegacy/FrmLegacy.Designer.cs @@ -0,0 +1,371 @@ +namespace Devoldere.NetSpeedTrayLegacy +{ + partial class FrmLegacy + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLegacy)); + this.lblSrLbl = new System.Windows.Forms.Label(); + this.lblSrUp = new System.Windows.Forms.Label(); + this.oTimer = new System.Windows.Forms.Timer(this.components); + this.lblDlLbl = new System.Windows.Forms.Label(); + this.lblDl = new System.Windows.Forms.Label(); + this.lblUl = new System.Windows.Forms.Label(); + this.cbNotify = new System.Windows.Forms.CheckBox(); + this.lblName = new System.Windows.Forms.Label(); + this.oMenu = new System.Windows.Forms.MenuStrip(); + this.menuFile = new System.Windows.Forms.ToolStripMenuItem(); + this.menuReload = new System.Windows.Forms.ToolStripMenuItem(); + this.menuExit = new System.Windows.Forms.ToolStripMenuItem(); + this.menuAbout = new System.Windows.Forms.ToolStripMenuItem(); + this.menuInterfaces = new System.Windows.Forms.ToolStripMenuItem(); + this.oNotify = new System.Windows.Forms.NotifyIcon(this.components); + this.oContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.Exit = new System.Windows.Forms.ToolStripMenuItem(); + this.lblSrDown = new System.Windows.Forms.Label(); + this.lblSpeedLbl = new System.Windows.Forms.Label(); + this.lblSpace = new System.Windows.Forms.Label(); + this.lblUlLbl = new System.Windows.Forms.Label(); + this.LblBytesLbl = new System.Windows.Forms.Label(); + this.lblBytesUp = new System.Windows.Forms.Label(); + this.lblBytesDown = new System.Windows.Forms.Label(); + this.oMenu.SuspendLayout(); + this.oContextMenu.SuspendLayout(); + this.SuspendLayout(); + // + // lblSrLbl + // + this.lblSrLbl.BackColor = System.Drawing.SystemColors.Info; + this.lblSrLbl.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblSrLbl.Location = new System.Drawing.Point(3, 98); + this.lblSrLbl.Name = "lblSrLbl"; + this.lblSrLbl.Size = new System.Drawing.Size(44, 16); + this.lblSrLbl.TabIndex = 2; + this.lblSrLbl.Text = "Packets"; + this.lblSrLbl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lblSrUp + // + this.lblSrUp.BackColor = System.Drawing.SystemColors.Info; + this.lblSrUp.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblSrUp.ForeColor = System.Drawing.Color.DarkGreen; + this.lblSrUp.Location = new System.Drawing.Point(48, 98); + this.lblSrUp.Name = "lblSrUp"; + this.lblSrUp.Size = new System.Drawing.Size(80, 16); + this.lblSrUp.TabIndex = 4; + this.lblSrUp.Text = "0"; + this.lblSrUp.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // oTimer + // + this.oTimer.Enabled = true; + this.oTimer.Interval = 1000; + this.oTimer.Tick += new System.EventHandler(this.tmrRefresh_Tick); + // + // lblDlLbl + // + this.lblDlLbl.BackColor = System.Drawing.SystemColors.Info; + this.lblDlLbl.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblDlLbl.ForeColor = System.Drawing.Color.DarkRed; + this.lblDlLbl.Location = new System.Drawing.Point(129, 81); + this.lblDlLbl.Name = "lblDlLbl"; + this.lblDlLbl.Size = new System.Drawing.Size(80, 16); + this.lblDlLbl.TabIndex = 6; + this.lblDlLbl.Text = "DL"; + this.lblDlLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblDl + // + this.lblDl.BackColor = System.Drawing.SystemColors.Info; + this.lblDl.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblDl.ForeColor = System.Drawing.Color.DarkRed; + this.lblDl.Location = new System.Drawing.Point(129, 132); + this.lblDl.Name = "lblDl"; + this.lblDl.Size = new System.Drawing.Size(80, 16); + this.lblDl.TabIndex = 8; + this.lblDl.Text = "0"; + this.lblDl.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblUl + // + this.lblUl.BackColor = System.Drawing.SystemColors.Info; + this.lblUl.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblUl.ForeColor = System.Drawing.Color.DarkGreen; + this.lblUl.Location = new System.Drawing.Point(48, 132); + this.lblUl.Name = "lblUl"; + this.lblUl.Size = new System.Drawing.Size(80, 16); + this.lblUl.TabIndex = 9; + this.lblUl.Text = "0"; + this.lblUl.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // cbNotify + // + this.cbNotify.AutoSize = true; + this.cbNotify.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbNotify.Location = new System.Drawing.Point(139, 2); + this.cbNotify.Margin = new System.Windows.Forms.Padding(2); + this.cbNotify.Name = "cbNotify"; + this.cbNotify.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.cbNotify.Size = new System.Drawing.Size(59, 19); + this.cbNotify.TabIndex = 10; + this.cbNotify.Text = "Notify"; + this.cbNotify.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.cbNotify.UseVisualStyleBackColor = true; + // + // lblName + // + this.lblName.BackColor = System.Drawing.SystemColors.Control; + this.lblName.Font = new System.Drawing.Font("Segoe UI", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblName.ForeColor = System.Drawing.Color.DimGray; + this.lblName.Location = new System.Drawing.Point(4, 23); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(205, 57); + this.lblName.TabIndex = 11; + this.lblName.Text = "Network"; + this.lblName.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // oMenu + // + this.oMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuFile, + this.menuInterfaces}); + this.oMenu.Location = new System.Drawing.Point(0, 0); + this.oMenu.Name = "oMenu"; + this.oMenu.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2); + this.oMenu.Size = new System.Drawing.Size(212, 24); + this.oMenu.TabIndex = 12; + this.oMenu.Text = "Menu"; + // + // menuFile + // + this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuReload, + this.menuExit, + this.menuAbout}); + this.menuFile.Name = "menuFile"; + this.menuFile.Size = new System.Drawing.Size(37, 20); + this.menuFile.Text = "File"; + // + // menuReload + // + this.menuReload.Image = global::Devoldere.NetSpeedTrayLegacy.Properties.Resources.Refresh; + this.menuReload.Name = "menuReload"; + this.menuReload.Size = new System.Drawing.Size(110, 22); + this.menuReload.Text = "Reload"; + this.menuReload.Click += new System.EventHandler(this.ReloadApp); + // + // menuExit + // + this.menuExit.Image = global::Devoldere.NetSpeedTrayLegacy.Properties.Resources.Close; + this.menuExit.Name = "menuExit"; + this.menuExit.Size = new System.Drawing.Size(110, 22); + this.menuExit.Text = "Exit"; + this.menuExit.Click += new System.EventHandler(this.CloseApp); + // + // menuAbout + // + this.menuAbout.Image = global::Devoldere.NetSpeedTrayLegacy.Properties.Resources._2bs; + this.menuAbout.Name = "menuAbout"; + this.menuAbout.Size = new System.Drawing.Size(110, 22); + this.menuAbout.Text = "About"; + this.menuAbout.Click += new System.EventHandler(this.AboutApp); + // + // menuInterfaces + // + this.menuInterfaces.Name = "menuInterfaces"; + this.menuInterfaces.Size = new System.Drawing.Size(70, 20); + this.menuInterfaces.Text = "Interfaces"; + // + // oNotify + // + this.oNotify.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info; + this.oNotify.BalloonTipTitle = "Devoldere NetSpeed"; + this.oNotify.Icon = ((System.Drawing.Icon)(resources.GetObject("oNotify.Icon"))); + this.oNotify.Text = "NetSpeedTray"; + this.oNotify.Visible = true; + this.oNotify.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseClick); + // + // oContextMenu + // + this.oContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.Exit}); + this.oContextMenu.Name = "contextMenuStrip1"; + this.oContextMenu.Size = new System.Drawing.Size(163, 26); + // + // Exit + // + this.Exit.Name = "Exit"; + this.Exit.Size = new System.Drawing.Size(162, 22); + this.Exit.Text = "contextMenuExit"; + // + // lblSrDown + // + this.lblSrDown.BackColor = System.Drawing.SystemColors.Info; + this.lblSrDown.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblSrDown.ForeColor = System.Drawing.Color.DarkRed; + this.lblSrDown.Location = new System.Drawing.Point(129, 98); + this.lblSrDown.Name = "lblSrDown"; + this.lblSrDown.Size = new System.Drawing.Size(80, 16); + this.lblSrDown.TabIndex = 13; + this.lblSrDown.Text = "0"; + this.lblSrDown.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblSpeedLbl + // + this.lblSpeedLbl.BackColor = System.Drawing.SystemColors.Info; + this.lblSpeedLbl.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblSpeedLbl.Location = new System.Drawing.Point(3, 132); + this.lblSpeedLbl.Name = "lblSpeedLbl"; + this.lblSpeedLbl.Size = new System.Drawing.Size(44, 16); + this.lblSpeedLbl.TabIndex = 14; + this.lblSpeedLbl.Text = "Speed"; + this.lblSpeedLbl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lblSpace + // + this.lblSpace.BackColor = System.Drawing.SystemColors.Info; + this.lblSpace.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblSpace.Location = new System.Drawing.Point(3, 81); + this.lblSpace.Name = "lblSpace"; + this.lblSpace.Size = new System.Drawing.Size(44, 16); + this.lblSpace.TabIndex = 15; + this.lblSpace.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblUlLbl + // + this.lblUlLbl.BackColor = System.Drawing.SystemColors.Info; + this.lblUlLbl.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblUlLbl.ForeColor = System.Drawing.Color.DarkGreen; + this.lblUlLbl.Location = new System.Drawing.Point(48, 81); + this.lblUlLbl.Name = "lblUlLbl"; + this.lblUlLbl.Size = new System.Drawing.Size(80, 16); + this.lblUlLbl.TabIndex = 7; + this.lblUlLbl.Text = "UL"; + this.lblUlLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // LblBytesLbl + // + this.LblBytesLbl.BackColor = System.Drawing.SystemColors.Info; + this.LblBytesLbl.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.LblBytesLbl.Location = new System.Drawing.Point(3, 115); + this.LblBytesLbl.Name = "LblBytesLbl"; + this.LblBytesLbl.Size = new System.Drawing.Size(44, 16); + this.LblBytesLbl.TabIndex = 18; + this.LblBytesLbl.Text = "Bytes"; + this.LblBytesLbl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lblBytesUp + // + this.lblBytesUp.BackColor = System.Drawing.SystemColors.Info; + this.lblBytesUp.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblBytesUp.ForeColor = System.Drawing.Color.DarkGreen; + this.lblBytesUp.Location = new System.Drawing.Point(48, 115); + this.lblBytesUp.Name = "lblBytesUp"; + this.lblBytesUp.Size = new System.Drawing.Size(80, 16); + this.lblBytesUp.TabIndex = 17; + this.lblBytesUp.Text = "0"; + this.lblBytesUp.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lblBytesDown + // + this.lblBytesDown.BackColor = System.Drawing.SystemColors.Info; + this.lblBytesDown.Font = new System.Drawing.Font("Segoe UI Semibold", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblBytesDown.ForeColor = System.Drawing.Color.DarkRed; + this.lblBytesDown.Location = new System.Drawing.Point(129, 115); + this.lblBytesDown.Name = "lblBytesDown"; + this.lblBytesDown.Size = new System.Drawing.Size(80, 16); + this.lblBytesDown.TabIndex = 16; + this.lblBytesDown.Text = "0"; + this.lblBytesDown.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // MainWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(212, 152); + this.Controls.Add(this.LblBytesLbl); + this.Controls.Add(this.lblBytesUp); + this.Controls.Add(this.lblBytesDown); + this.Controls.Add(this.lblSpace); + this.Controls.Add(this.lblSpeedLbl); + this.Controls.Add(this.lblSrDown); + this.Controls.Add(this.lblName); + this.Controls.Add(this.cbNotify); + this.Controls.Add(this.lblUl); + this.Controls.Add(this.lblDl); + this.Controls.Add(this.lblUlLbl); + this.Controls.Add(this.lblDlLbl); + this.Controls.Add(this.lblSrUp); + this.Controls.Add(this.lblSrLbl); + this.Controls.Add(this.oMenu); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = global::Devoldere.NetSpeedTrayLegacy.Properties.Resources.scroll; + this.MainMenuStrip = this.oMenu; + this.MaximizeBox = false; + this.Name = "MainWindow"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Devoldere NetSpeed"; + this.TopMost = true; + this.oMenu.ResumeLayout(false); + this.oMenu.PerformLayout(); + this.oContextMenu.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lblSrLbl; + private System.Windows.Forms.Label lblSrUp; + private System.Windows.Forms.Timer oTimer; + private System.Windows.Forms.Label lblDlLbl; + private System.Windows.Forms.Label lblDl; + private System.Windows.Forms.Label lblUl; + private System.Windows.Forms.CheckBox cbNotify; + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.MenuStrip oMenu; + private System.Windows.Forms.ToolStripMenuItem menuFile; + private System.Windows.Forms.ToolStripMenuItem menuReload; + private System.Windows.Forms.ToolStripMenuItem menuInterfaces; + private System.Windows.Forms.ToolStripMenuItem menuExit; + private System.Windows.Forms.NotifyIcon oNotify; + private System.Windows.Forms.ContextMenuStrip oContextMenu; + private System.Windows.Forms.ToolStripMenuItem Exit; + private System.Windows.Forms.Label lblSrDown; + private System.Windows.Forms.Label lblSpeedLbl; + private System.Windows.Forms.Label lblSpace; + private System.Windows.Forms.Label lblUlLbl; + private System.Windows.Forms.Label LblBytesLbl; + private System.Windows.Forms.Label lblBytesUp; + private System.Windows.Forms.Label lblBytesDown; + private System.Windows.Forms.ToolStripMenuItem menuAbout; + } +} + diff --git a/NetSpeedTrayLegacy/FrmLegacy.cs b/NetSpeedTrayLegacy/FrmLegacy.cs new file mode 100644 index 0000000..0d058f8 --- /dev/null +++ b/NetSpeedTrayLegacy/FrmLegacy.cs @@ -0,0 +1,314 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Net.NetworkInformation; + +namespace Devoldere.NetSpeedTrayLegacy +{ + /// + /// Old Standalone Form (working, disabled in current version) + /// + public partial class FrmLegacy : Form + { + + #region PROPERTIES + + //private bool dragging = false; + //private Point dragCursorPoint; + //private Point dragFormPoint; + + //public const int WM_NCLBUTTONDOWN = 0xA1; + //public const int HT_CAPTION = 0x2; + int iInterface = 0; // found interfaces + int iInterfaceUp = 0; // interfaces up + int iFirstUp = -1; // First interface ID + long lngBytesSend = 0; // bytes sent storage + long lngBytesReceived = 0; // bytes received storage + private StringBuilder _bytesUnit; // bytsunit used by BytesFormat method + NetworkInterface oInterface; // selected interface object + + #endregion + + #region CONSTRUCTOR + /// + /// Initialize and Retrieve interfaces info + /// + public FrmLegacy() + { + InitializeComponent(); + + if(null == oTimer) + { + throw new Exception("Timer Initialization Error"); + } + + oTimer.Stop(); + + if (NetworkInterface.GetAllNetworkInterfaces().Length == 0) + { + throw new Exception("No interface found"); + } + + foreach (NetworkInterface anInterface in NetworkInterface.GetAllNetworkInterfaces()) + { + if(anInterface.NetworkInterfaceType != NetworkInterfaceType.Tunnel + && anInterface.NetworkInterfaceType != NetworkInterfaceType.Loopback) + MenuInterfacesAdd(anInterface); + } + + if (0 < iInterface) + { + menuInterfaces.Text += " (" + iInterfaceUp.ToString(); + menuInterfaces.Text += "/" + (iInterface - iInterfaceUp).ToString() + ")"; + if (-1 == iFirstUp) + { + iFirstUp = 0; + } + SelectInterface(iFirstUp); + } + else + { + IsDown(); + } + } + #endregion + + #region INTERFACE SELECTION + /// + /// Add interface info to the top menu + /// + /// NetworkInterface object + private void MenuInterfacesAdd(NetworkInterface anInterface) + { + if(anInterface.NetworkInterfaceType.ToString() != "Tunnel") + { + ToolStripMenuItem oItem = new ToolStripMenuItem(anInterface.OperationalStatus.ToString() + ": " + anInterface.Name); + oItem.ForeColor = Color.DarkGray; + oItem.Tag = iInterface; + oItem.Click += new System.EventHandler(this.SelectInterface); + oItem.Image = Devoldere.NetSpeedTrayLegacy.Properties.Resources.scroll_down_png; + if (anInterface.OperationalStatus == OperationalStatus.Up) + { + oItem.ForeColor = Color.Black; + oItem.Image = Devoldere.NetSpeedTrayLegacy.Properties.Resources.scroll_up_png; + iInterfaceUp++; + if (-1 == iFirstUp) + { + iFirstUp = iInterface; + } + } + menuInterfaces.DropDownItems.Add(oItem); + iInterface++; + } + } + + /// + /// Select current interface stored in oInterface and check its connexion status + /// + private void SelectInterface() + { + lblName.Text = oInterface.Name; + this.Text = oInterface.Name + " " + oInterface.OperationalStatus.ToString(); + + if (oInterface.OperationalStatus == OperationalStatus.Up) + { + IsUp(); + } + else + { + IsDown(); + } + } + + /// + /// Select an interface by its ID + /// + /// Interface ID (array key in GetAllNetworkInterfaces() + private void SelectInterface(int iId) + { + if (iId < NetworkInterface.GetAllNetworkInterfaces().Length) + { + oInterface = NetworkInterface.GetAllNetworkInterfaces()[iId]; + SelectInterface(); + } + } + + /// + /// MenuClick : Select an interface + /// + /// a ToolStripMenuItem + /// EventArgs + private void SelectInterface(object sender, EventArgs e) + { + ToolStripMenuItem oItem = sender as ToolStripMenuItem; + SelectInterface((int)oItem.Tag); + } + + #endregion + + #region INTERFACE_UPDATE + + /// + /// Retrieve interface connexion info + /// + private void IsUp() + { + if ( + 1 < oInterface.GetIPProperties().UnicastAddresses.Count + && + null != (oInterface.GetIPProperties().UnicastAddresses[1].Address) + ) + { + lblName.Text += "\r" + (oInterface.GetIPProperties().UnicastAddresses[1].Address).ToString(); + if (null != (oInterface.GetIPProperties().UnicastAddresses[1].IPv4Mask)) + lblName.Text += "\r" + (oInterface.GetIPProperties().UnicastAddresses[1].IPv4Mask).ToString(); + } + else + { + lblName.Text += "\r" + (oInterface.GetIPProperties().UnicastAddresses[0].Address).ToString(); + this.Icon = Devoldere.NetSpeedTrayLegacy.Properties.Resources.scroll; + } + lblName.Text += "\r" + (oInterface.Speed / 1000000).ToString() + " Mbps"; ; + + oTimer.Start(); + oNotify.BalloonTipTitle = this.Text; + lblName.ForeColor = Color.Black; + cbNotify.Enabled = true; + this.ClientSize = new System.Drawing.Size(212, 152); + this.Icon = Devoldere.NetSpeedTrayLegacy.Properties.Resources.scroll_up; + } + + /// + /// Display an offline interface info + /// + private void IsDown() + { + oTimer.Stop(); + lblName.ForeColor = Color.Gray; + lblName.Text += "\rDown"; + cbNotify.Checked = false; + cbNotify.Enabled = false; + this.ClientSize = new System.Drawing.Size(212, 80); + this.Icon = Devoldere.NetSpeedTrayLegacy.Properties.Resources.scroll_down; + } + + #endregion + + #region TIMER + /// + /// Event oTimer Tick + /// + /// + /// + private void tmrRefresh_Tick(object sender, EventArgs e) + { + IPv4InterfaceStatistics interfaceStatistic = oInterface.GetIPv4Statistics(); + + int bytesSentSpeed = (int)(interfaceStatistic.BytesSent - lngBytesSend); + int bytesReceivedSpeed = (int)(interfaceStatistic.BytesReceived - lngBytesReceived); + + //lblSpeed.Text = (oInterface.Speed / 1000000).ToString() + " Mbps"; + lblSrUp.Text = interfaceStatistic.UnicastPacketsSent.ToString(); + lblSrDown.Text = interfaceStatistic.UnicastPacketsReceived.ToString(); + lblBytesUp.Text = BytesFormat(interfaceStatistic.BytesSent, "B", 1024); + lblBytesDown.Text = BytesFormat(interfaceStatistic.BytesReceived, "B", 1024); + lblUl.Text = BytesFormat(bytesSentSpeed, "B/s", 1024); + lblDl.Text = BytesFormat(bytesReceivedSpeed, "B/s", 1024); + lngBytesSend = interfaceStatistic.BytesSent; + lngBytesReceived = interfaceStatistic.BytesReceived; + + if ( + (cbNotify.Checked == true) && + ((bytesReceivedSpeed >= 1) || (bytesSentSpeed >= 1)) + ) + { + oNotify.Text = "UL: " + lblUl.Text + "\nDL: " + lblDl.Text; + oNotify.BalloonTipText = oNotify.Text; + oNotify.ShowBalloonTip(2500); + } + } + + #endregion + + #region BYTES_FORMAT + /// + /// Format Bytes to string + /// + /// bytes value + /// + /// 1000 or 1024 + /// + private string BytesFormat(double iValue, string sFormat, int iDivider) + { + if (iValue == 0) + return "0"; + + _bytesUnit = new StringBuilder(sFormat, 5); + + if (iValue > 1073741824) // 1gb + { + iValue = iValue / iDivider / iDivider / iDivider; + _bytesUnit.Insert(0, "G"); + } + else if (iValue > 1048576) // 1mb + { + iValue = iValue / iDivider / iDivider; + _bytesUnit.Insert(0, "M"); + } + else if (iValue > 1024) // 1kb + { + iValue = iValue / iDivider; + _bytesUnit.Insert(0, "K"); + } + + _bytesUnit.Insert(0, " "); + + return iValue.ToString("#.##") + _bytesUnit.ToString(); + } + + #endregion + + #region EVENTS + + private void ReloadApp(object sender, EventArgs e) + { + Application.Restart(); + } + + private void CloseApp(object sender, EventArgs e) + { + Environment.Exit(0); + } + + private void AboutApp(object sender, EventArgs e) + { + DialogResult mResult = MessageBox.Show + ( + "NetSpeedTray 1.1.0.3 (Legacy)\rMickaël Devoldère\rhttps://devoldere.net\r\rDo you wish to visit devoldere.net ?", + "DEVOLDERE", + MessageBoxButtons.YesNo, + MessageBoxIcon.None + ); + + if(mResult == DialogResult.Yes) + { + System.Diagnostics.Process.Start("https://devoldere.net"); + } + } + + private void notifyIcon_MouseClick(object sender, MouseEventArgs e) + { + //cbNotify.Checked = (this.Visible == true) ? cbNotify.Checked : false; + this.Visible = (this.Visible == true) ? false : true; + } + + #endregion + + + + } +} diff --git a/NetSpeedTrayLegacy/FrmLegacy.resx b/NetSpeedTrayLegacy/FrmLegacy.resx new file mode 100644 index 0000000..1278f1e --- /dev/null +++ b/NetSpeedTrayLegacy/FrmLegacy.resx @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 235, 17 + + + 361, 17 + + + + + AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQ + AAASCwAAEgsAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAA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//hWVJ//jy5//o28j/5tnH/+bZx//m2cf/6NvI//jy + 5/+FZUn/u5x//7ucf/+6m3//upt//7qbf/+6m3//upt//7qbf/+6m3//AAAAFgAAABa/o4n/iGlP//// + ////////////////////////////////////////////////////////flw///bv5f/k1b//49S+/+TV + v//27+X/flw///////////////////////////////////////////////////////8AAAAWAAAAFr+j + if+HaE3///////7//v/9/f3//f38//z9/P/8/fz//P38//z9/P/8/fz//f79////////////flw///jx + 5//iz7T/+PHn/35cP/////////////3+/f/8/fz//P38//z9/P/8/fz//P38//39/P/9/f3//f38/wAA + ABYAAAAWv6OJ/4doTP//////+/z8//39/f/6+vr/+Pj4//j4+P/4+Pj/+Pj4//j4+P/6+vv//f7+//7/ + ////////f10////78v9/XUD///////7////9/v7/+vr7//j4+P/4+Pj/+Pj4//j4+P/4+Pj/+vr6//39 + /f/6+vr/AAAAFgAAABa/o4n/h2hM///////8/P3/fHx8//v7+//29vb/9fX1//X19f/19fX/9vb2//v7 + +/98fHz//Pz8//r7+//+////fls9//b29v/6+/z//Pz8/3x8fP/7+/v/9vb2//X19f/19fX/9fX1//b2 + 9v/7+/v/fHx8//v7+/8AAAAWAAAAFr+jif+HaEz///////v7+/+AgID/+/r6//X09P/z8vL/8/Ly//Py + 8v/19PT/+/r6/4CAgP/7+vr/9fT1//b19//4+Pn/9vb3//X09f/7+vr/gICA//v6+v/19PT/8/Ly//Py + 8v/z8vL/9fT0//v6+v+AgID/+/r6/wAAABYAAAAWv6OJ/4doTP//////+Pj3/4GBgf/4+Pf/8vLx//Dw + 7//x8fD/8PDv//Ly8f/4+Pf/gYGB//j49//y8vH/8PHv//Hx8P/w8fD/8vLx//j49/+BgYH/+Pj3//Ly + 8f/w8O//8PDv//Dw7//y8vH/+Pj3/4GBgf/4+Pf/AAAAFgAAABa/o4n/h2hM///////y8/L/fn5+//Pz + 8v/v7+7/7/Dw//Hy8v/v8PD/7+/u//Pz8v9/f3//8/Px/+7u7f/t7ez/7e3s/+3t7P/u7u3/8/Px/39/ + f//z8/H/7u7t/+3t7P/t7ez/7e3s/+7u7f/z8/H/f39///Pz8f8AAAAWAAAAFr+jif+HaE3//////+3s + 7f/v7u7/7u3t/+7u7//y8/b/f1w9//Lz9v/u7u//7u3t/+/u7v/t7Oz/6+rq/+vq6v/r6ur/6+rq/+vq + 6v/t7Oz/7+7u/+3s7P/r6ur/6+rq/+vq6v/r6ur/6+rq/+3s7P/v7u7/7ezs/wAAABYAAAAWv6OJ/4do + Tf//////5+jn/+jp6P/r7Oz/7vHz/4BdP///////gF0//+7x8//r7Oz/6enp/+jo5//o6Of/6Ojn/+jo + 5//o6Of/6Ojn/+jo5//o6Of/6Ojn/+jo5//o6Of/6Ojn/+jo5//o6Of/6Ojn/+jo5//o6Of/AAAAFgAA + ABa/o4n/iGlO///////l5eT/5+fn/+zt7/+AXkD/+vXv//Xu5f/69e//gF5A/+zt7//n5+f/5eXk/+Xk + 4//l5OP/5eTj/+Xk4//l5OP/5eTj/+Xk4//l5OP/5eTj/+Xk4//l5OP/5eTj/+Xk4//l5OP/5eTj/+Xk + 4/8AAAAWAAAAFsCjif+Ja1H/////////////////gF5A//jy6f/u49b/7eLU/+7j1v/48un/gF5A//// + //////////////////////////////////////////////////////////////////////////////// + /////////////wAAABYAAAAQwKOJ/4xvVv+KbFH/iGlO/4ZmS//58uf/6drI/+bYxv/m2Mb/5tjG/+na + yP/58uf/hmZL/4hpTf+IaU3/h2hN/4doTf+HaE3/h2hN/4doTf+HaE3/h2hN/4doTf+HaE3/h2hN/4do + Tf+HaE3/h2hN/4doTf+HaE3/AAAAEQAAAAW9oYfwwKOJ/8Ckiv/CpIr/iWtR//fx5P/i0Ln/4tC6/+LQ + uv/i0Lr/4tC5//fx5P+Ja1H/waSK/8Ckif+/o4n/v6OJ/7+jif+/o4n/v6OJ/7+jif+/o4n/v6OJ/7+j + if+/o4n/v6OJ/7+jif+/o4n/v6OJ/7+jif8AAAAGAAAAAAAAAAAAAAAAAAAAAAAAABWLbVP/+fLl/9zI + q//cx6v/3Mis/9zHq//cyKv/+fLl/4ttU/8AAAAVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADY5x + V////fT//Pfu//v27f/79+3/+/bt//z37v///fT/jnFX/wAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAEkHRbtI9yWP+Nb1X/jW9V/41vVf+Nb1X/jW9V/49yWP+QdFu0AAAABAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP//////////////////////8AH///AB///w + Af8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAPAB///wAf//8AH/////////////////////////////KAAAABAAAAAgAAAAAQAgAAAA + AAAABAAAEgsAABILAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALwAA + ADMAAAAzAAAAMwAAADMAAAAnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI9z + W/GPcVf/jW9U/41vVP+PcVf/iW5X0AAAAAAAAAAAAAAAMAAAADMAAAAzAAAAMwAAADMAAAAzAAAAMwAA + ADOLblT///////359f/9+fX//////4xvVP8AAAAzAAAAM7mcgvK4mn7/t5h7/7aYev+2mHr/t5h7/7eZ + fP+7nID/h2hN//v37//u5Nf/7uTX//v37/+IaU7/ro91/7iZfP+4mn7///////////////////////// + /////////////4JhRP/k28//6NjE/+jYxP/k28//gmFF////////////t5h7///////7/Pz/+/v8//v7 + +//6+/v/+/v8//7/////////gF9B/+3n3f/t593/gV9B//v9/f/+////+/v8/7aXev//////9/j3//n5 + +P/39/b/9fX0//X19P/4+Pf//f7+//n6+P+CYEP/gmBD//n6+f/9////+Pj3//X19P+2mHr///////b3 + 9v98fH3/9/f2//Pz8//z8/P/9/f2/31+fv/6+/v/8fHw//Hx8P/6+/v/fX5+//f39f/y8vH/tph7//// + ///y8vH/fn9///X29v/z9vb/8/b2//X29v9/f3//8/Py/+/w7//v8O//8/Py/35+fv/z8/H/7u7t/7eY + e///////6+rr/+/w8f/z9fj/hGJF/4RiRf/z9fj/8PDx/+vr6//p6Oj/6ejo/+vq6v/t6+z/6+rq/+no + 6P+3mHv//////+Xm5//s7vH/g2JF/9LDtv/Sw7b/g2JF/+zu8f/m5+j/4+Pj/+Pi4//j4uP/4+Pj/+Pi + 4//j4uP/uJp+////////////hGNG/8/Bsf/z6t7/8+re/8/Bsf+EY0b///////////////////////// + /////////////7uehLC5m3//u52B/4hpTv/79uz/59fD/+fXw//79uz/iGlO/7udgP+4mXz/t5h7/7eY + e/+3mHv/t5h7/7eYe/8AAAAAAAAAAAAAAACMblT///z0//v27f/79u3///z0/4xuVP8AAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAknVcr49yWP+Nb1X/jW9V/49yWP+SdVyvAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD/AwAA/wMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA4H8AAOB/AAD//wAA + + + + 464, 17 + + \ No newline at end of file diff --git a/NetSpeedTrayLegacy/NetSpeedTrayLegacy.csproj b/NetSpeedTrayLegacy/NetSpeedTrayLegacy.csproj new file mode 100644 index 0000000..05c97bd --- /dev/null +++ b/NetSpeedTrayLegacy/NetSpeedTrayLegacy.csproj @@ -0,0 +1,118 @@ + + + + + Debug + AnyCPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294} + WinExe + Devoldere.NetSpeedTrayLegacy + NetSpeedTrayLegacy + v4.5 + 512 + true + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + scroll.ico + + + + + + + + + + + + + + + + + Form + + + FrmLegacy.cs + + + + + FrmLegacy.cs + Designer + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NetSpeedTrayLegacy/Program.cs b/NetSpeedTrayLegacy/Program.cs new file mode 100644 index 0000000..0bcabe4 --- /dev/null +++ b/NetSpeedTrayLegacy/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Devoldere.NetSpeedTrayLegacy +{ + static class Program + { + /// + /// Point d'entrée principal de l'application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FrmLegacy()); + } + } +} diff --git a/NetSpeedTrayLegacy/Properties/AssemblyInfo.cs b/NetSpeedTrayLegacy/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e4adc6d --- /dev/null +++ b/NetSpeedTrayLegacy/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("NetSpeedTrayLegacy")] +[assembly: AssemblyDescription("NetworkInfo")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("DEVOLDERE.NET")] +[assembly: AssemblyProduct("NetSpeedTrayLegacy")] +[assembly: AssemblyCopyright("Copyright © Mickael Devoldere 2018")] +[assembly: AssemblyTrademark("MDEVOLDERE")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("ac0a3462-d8aa-4d8c-8111-2a327c045294")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.1.0.3")] +[assembly: AssemblyFileVersion("1.1.0.3")] diff --git a/NetSpeedTrayLegacy/Properties/Resources.Designer.cs b/NetSpeedTrayLegacy/Properties/Resources.Designer.cs new file mode 100644 index 0000000..706cd96 --- /dev/null +++ b/NetSpeedTrayLegacy/Properties/Resources.Designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.42000 +// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// +//------------------------------------------------------------------------------ + +namespace Devoldere.NetSpeedTrayLegacy.Properties { + using System; + + + /// + /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. + /// + // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder + // à l'aide d'un outil, tel que ResGen ou Visual Studio. + // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen + // avec l'option /str ou régénérez votre projet VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Devoldere.NetSpeedTrayLegacy.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Remplace la propriété CurrentUICulture du thread actuel pour toutes + /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _2bs { + get { + object obj = ResourceManager.GetObject("_2bs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Close { + get { + object obj = ResourceManager.GetObject("Close", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Refresh { + get { + object obj = ResourceManager.GetObject("Refresh", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Icon semblable à (Icône). + /// + internal static System.Drawing.Icon scroll { + get { + object obj = ResourceManager.GetObject("scroll", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Icon semblable à (Icône). + /// + internal static System.Drawing.Icon scroll_down { + get { + object obj = ResourceManager.GetObject("scroll_down", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap scroll_down_png { + get { + object obj = ResourceManager.GetObject("scroll_down_png", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Icon semblable à (Icône). + /// + internal static System.Drawing.Icon scroll_up { + get { + object obj = ResourceManager.GetObject("scroll_up", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap scroll_up_png { + get { + object obj = ResourceManager.GetObject("scroll_up_png", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/NetSpeedTrayLegacy/Properties/Resources.resx b/NetSpeedTrayLegacy/Properties/Resources.resx new file mode 100644 index 0000000..b668658 --- /dev/null +++ b/NetSpeedTrayLegacy/Properties/Resources.resx @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\scroll.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\scroll-down.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\scroll-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\scroll-up.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\scroll-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\2bs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/NetSpeedTrayLegacy/Properties/Settings.Designer.cs b/NetSpeedTrayLegacy/Properties/Settings.Designer.cs new file mode 100644 index 0000000..6817747 --- /dev/null +++ b/NetSpeedTrayLegacy/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.42000 +// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// +//------------------------------------------------------------------------------ + +namespace Devoldere.NetSpeedTrayLegacy.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/NetSpeedTrayLegacy/Properties/Settings.settings b/NetSpeedTrayLegacy/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/NetSpeedTrayLegacy/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/NetSpeedTrayLegacy/Resources/2bs.png b/NetSpeedTrayLegacy/Resources/2bs.png new file mode 100644 index 0000000000000000000000000000000000000000..e2bb3c488a51a2921ab7f251545ff36851c77a33 GIT binary patch literal 5963 zcmV-R7qsY!P)WFU8GbZ8()Nlj2>E@cM*02Z%FL_t(&-rbvduw-?W z=RfE7``vpp^X2lkdbPbOstROLKy+Xb=|&OUPzOPynQ_|IcJIa!F;K(?QE0b8!hMYC zF>G6Hm(dQ|u~kGV5fKrHVkw{sC~B{IRd3(&W!~lYJM+iQhcPh`4vIoK8Ih6i<;{$| z=iGC?=X=iiUf~FPs4A~}>+AUDm%h3DfBpSeUOu#Y=Werhbo5zi+C6@Laq-;Q>8bus zC)G4d-MZ0rJCEM9@jKUi=5gU!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MDE$g-3)>r#Xq-{U|faVj~1HD#!ar9}OnK)SqT#`fCh9#$AIQOwr+?qzb~ z5V3O%3=R+{)lyE60fobpGwj~==vhz70Xz3RCf=7!!#Rs}5g`P;554B4yitKD!I}iq zYm-AS7neul)*8eZoQ)9aO+Si&p{)I$fCH==wCspWl0-R2G-AtMg5N~7wU)c?xE7=1B2wA5(A8(z0l^mPkj9Eo|FSBl~RRmU4(Tp0VNbg8OA-7RLadiMo^=`~!G0#KsZ^3b*i$chXX tIW}(EgwHb2a_L}Q#Lk^NMxLkx{x@1lxsWh6#{&QW002ovPDHLkV1n1$x(5IN literal 0 HcmV?d00001 diff --git a/NetSpeedTrayLegacy/Resources/Close.png b/NetSpeedTrayLegacy/Resources/Close.png new file mode 100644 index 0000000000000000000000000000000000000000..7b03ffc736bdaaab31364ea9cab034ecf7992fbc GIT binary patch literal 667 zcmV;M0%ZM(P)PpNH`{m&eCC@Yw)3-Q7*TnV2AKwGcw|fqjC1UZoUzGRe=qy(EAE@OXc( z9LqvE4jN!iPtz_I(OkESOr_9G6Sq`C0mAcmyt`8X8h{UUtSX*u6Uk(lTwUe$$_h@i ziS&IYb2&1(93mdawQby54X>xl0Pq0Ms-k-V?P8Iz(;+oG%hdWh1L-ueu`y)1j9V@f z)a%fZ_&tKI0s+2dp==w@&iJ*tiQ8&1JU7SS_&83f#P!Ao`t>!M;~?_|yk0VW1(hG) z85v9xi^XU+8Z^pf5{3al{o#S&{2WoOV%2KY0}oFro@Jm(2dz>;`aZ9=w;`P-e|gDc zK2LOJhUC^3o|KqDKvWaYEqH*2Ko^48;v$i$DH>N-*vrd2WV6Uh1#@A6$oxDJKo?!x zeG5Ji3Pqqm+ux@ihUh0JEEEc;LV?@0HN?mW1E;67fS`x@n}L9~QnV06fuVx~5=!A{ z8UVu=7dS#t7lJ0;-DlqzPtb6T5YYi81Z}`X5a})X2qcQ%D4I&)L_?L1(ZK2ve0a;Z z<3ga9>>%|Nj0WQAlx)EE2YSP5u)7=WSkW->`;VT^l2OFv{qku!W>dHu$1t75^V zndN&L|_*YM=w17v?`{JuXH!{qb~$1tqO z`jDCxu%%@+m}L|GfFIeP+qgA#6C-02h#wq)UeIx4Y6i82(8M^dh>|F9A(=g*ViHOG ztN%9@f#oS;G#W|OEW1ZArDPHy+Vlb6lwE#I47vr+*uN=Ewo*0y@| z@FB#ak+#OzESItQV+*EfrU^YHzHEF=ZG78QJNXxCwQ9OzS&2OX1^{;>7~7G@F7^Nb N002ovPDHLkV1naNHP8S6 literal 0 HcmV?d00001 diff --git a/NetSpeedTrayLegacy/Resources/scroll-down.ico b/NetSpeedTrayLegacy/Resources/scroll-down.ico new file mode 100644 index 0000000000000000000000000000000000000000..1e1f27238aed312c5b9a88fb20dd8fe9d1d04f66 GIT binary patch literal 5430 zcmeI0%THZZ6vh`~otfZ3hYcgKsoIAc2M(;7CN{>HXpH|tM>=w>)5gSTqH&_J(9+ln zt%Qe2;Yx}SC_Sxxqz@|~eLv^}Nz*p9ey-oy_i!$kbG$bosRMTMvG;nfz4qg5u33#e zWcBsteZ75GXZEC-)p-xS`C+qzK7Pu1u3{S;@bj7^TgHQ{LEgIjkNGP+H{W6QL=GNz z{-X}xiA&Omz0UEfa*UMa=#NYa2 z4xY=D*Yl>^U3W}Xz!jH|>)ctXzfUUcO#uxbxfyzue1-bF_m=d|8`8#Cqzx}shTpI{ zGb#PpCUx#f0SzB{b$&wpw>M#P(y!s_n^{2r{ znD6(~r&BX_U&=@C#EJPx?5mMy#Xo#lI(k$(b;|30j@V&e z(?i2Yj^1K1H~w+aMn|PXhr;}cIpuq9%;!oEO%9G&`G8NY&_kcQd!g|8^ZhSx{%#r9Rh#4>gPRXJ#Len6~^%Ln;-r~e&@_o8;~DmuH=u8%m6Qz Fe*hP8*G&Kb literal 0 HcmV?d00001 diff --git a/NetSpeedTrayLegacy/Resources/scroll-down.png b/NetSpeedTrayLegacy/Resources/scroll-down.png new file mode 100644 index 0000000000000000000000000000000000000000..c5d7cb22c9d9fc18b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an9oN}F)!*hQ<8_wH>@U)!^XB-^& zhO-8lze8%FYCnY`2giKJoC>F0hqm;Y1^Gd&KYV330^U~u$1+^ci8hSIej{u+*2B6H zq$8g)C{_rg4vr%kd*)2Nm9S!~nB#K5eG@qnT zg!8t<^O*@VMld%4Z!s*|T$qdV=UBAPuZ9|Y*Ib7@`kD$;4vuM0{ci~6$i)U6+*#=@ch!y`urI4YIqO6iw=&- zi=IPTe=)o?^nB>8uNABd*7WP}se@y#6|N($C+3<&a~WfVb;;*LJA&iJTHT?RNi5+B i^ZPp5D;$%zN5ken;D1ID>#SpsFgrxs?~4!!E&l=!A9fS~ literal 0 HcmV?d00001 diff --git a/NetSpeedTrayLegacy/Resources/scroll-up.png b/NetSpeedTrayLegacy/Resources/scroll-up.png new file mode 100644 index 0000000000000000000000000000000000000000..7ee92685b81fa2b268f0b7f6f5c6ec81a133aebc GIT binary patch literal 1103 zcmV-V1hD&wP)Xdi{z-7)u1D1EPUW+C!UL?Sy)aFRZi3ZKpHNFBMRZnq^ zH9q7D0M}T9I(*3&0|TT;jmCgO2Y@nV3K#NZHnObE%~5G?LmM~)si!@YsIZh+;;MEP zS;(W8Ah<}7AcjO?zCh+6!;|SJG+v=yB8EnS`Q3Tqu{df{J-r0R8RwFBi94-3(1Pde z@eR4ifKOO~7N|mHEIBs%E?B5s@XiVY2isqz#O>-$ax(>relzwW&3RU;8Q!1y7#H`@ z#vB%Rjc?<^t#@!HY`%YX3v9YS2V`W<@CLS@7=VI;j0`Qf{maenLw6(sbP==tUDSfw zOfB>nmVsri^Nd|wTqGpkVj9z0re@YoMFR{BMaalq8asg)K13k6XXY@iWgeJ6@;CcT zkmRDZ$UQU17F#$txFaqfKq#KF4V-)(v*_jLt2*-kcm zp-GGN>^ekpbTFa_mA{yrV(Wk8l?G&Ee?zFG$XvRrLDf#8FV_(80ku(fFVQeUOpy+FrP#UJ8R?UfT;-JIN#q z`2}2DbaW)7p~gp~IDm&oMXg|CBcg5qs%kY1W)uy!vOl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R;@Tqr*W23$pIOU-^^_T^^9oh0_X@+gC0shcFi#>uU#fD(g(vuarx*wD0vNL=XO{&<5GT zJ%Bd)^nSWQ#oMS0Gnus5Hf!Ti1=fVDxii_cw7;=XA(PDrZwj>0kI&4OLR@R>Mip~b8nm47fvcF!SkmSD08nI+3Qn# zMeQr@Ef-w-SnJ|m&EYP=cPl`doZDwId1p)G5AOFPWpb0n;Ms2MjJq5ERRaH|{q5B> I0;#os0BlN$0RR91 literal 0 HcmV?d00001 diff --git a/NetSpeedTrayLegacy/scroll.ico b/NetSpeedTrayLegacy/scroll.ico new file mode 100644 index 0000000000000000000000000000000000000000..045bb346d247f72fc803289e717b92d213cba4a4 GIT binary patch literal 5430 zcmeHLZERCj7``a@$B>{2{N67y@rPf(2`FMP3I;`I+)&YIAP9@N`2$DWjVTN^2mBEQ zG)7`fFn%OtFbMJ)*)K;7%BN`7b#2$)wzqe;x9x5B`aGu}-gRZGe1w>AlBef=pZ9&w zd+zD!x$mi_P1Eku>gqJ~b=tSHH0=RR(`KQkzG}Lr{R;U(aB$HU0OVBzfB(G&6bMZd zkvq7JYf$%kHOA4%-P=DXzu)Agn_rb}YhRE|G9;0|&dSKufikF*r=5N~;6K@T%uSs9rb|xj>y)EkZjvK=ymEMV zb!~5hp3$6$=zWo_6|GkI$<79KTxrTrMxIt*zoX zj-*m4u`H_$>f~w9VV+sY%;#yCr+l*x)(m_t@f@dGe)2w_PaMq88XXlgnJj}k`G4(} zq%0fHnL&OV{#J#3^7v}`(`j4U+S)LtEy<)Ii9}osBcXcg6YNIO4xg%a#B&Uy(q1ip z(oBlS;}H{mJRXyHA|VFWfIW5cUauFuA+eY)x*jcqI{8}d*&+NK`x}itb@JhGSVHu>LAdj8 zS-n){2?T~D7z|2OkBjfM1vt;+V#NZgr%s-B`UQskH-u9D<2e61*DO={OCQXYPKG7s z|3mb_bE>CK{${me{#nf5)%3D#eRmno;idBNJI~@h5|r>IobMNYDT6wB+PAD;qQGi}{N%lQ9O9#rvt#02?P{IV+lr+|5?_AneCuK@2rHMO4i8;l;DE9y?idmQA>b@gXm!H+<$9KWn@ z!#$8KpRp7ucNOkI%BOEnd-Bld9yz${L+RbML4oqY&suR;@Tqr*W23$pIOU-^^_T^^9oh0_X@+gC0shcFi#>uU#fD(g(vuarx*wD0vNL=XO{&<5GT zJ%Bd)^nSWQ#oMS0Gnus5Hf!Ti1=fVDxii_cw7;=XA(PDrZwj>0kI&4OLR@R>Mip~b8nm47fvcF!SkmSD08nI+3Qn# zMeQr@Ef-w-SnJ|m&EYP=cPl`doZDwId1p)G5AOFPWpb0n;Ms2MjJq5ERRaH|{q5B> I0;#os0BlN$0RR91 literal 0 HcmV?d00001 diff --git a/NetworkSpeed.sln b/NetworkSpeed.sln index 2ac48f8..448e643 100644 --- a/NetworkSpeed.sln +++ b/NetworkSpeed.sln @@ -5,28 +5,52 @@ VisualStudioVersion = 15.0.27428.2043 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetSpeedTray", "NetSpeedTray\NetSpeedTray.csproj", "{F539AC91-2EA9-42D4-A412-474DC1859982}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetSpeedTrayLegacy", "NetSpeedTrayLegacy\NetSpeedTrayLegacy.csproj", "{AC0A3462-D8AA-4D8C-8111-2A327C045294}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|ARM.ActiveCfg = Debug|Any CPU + {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|ARM.Build.0 = Debug|Any CPU {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|x64.ActiveCfg = Debug|x64 {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|x64.Build.0 = Debug|x64 {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|x86.ActiveCfg = Debug|x86 {F539AC91-2EA9-42D4-A412-474DC1859982}.Debug|x86.Build.0 = Debug|x86 {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|Any CPU.ActiveCfg = Release|Any CPU {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|Any CPU.Build.0 = Release|Any CPU + {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|ARM.ActiveCfg = Release|Any CPU + {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|ARM.Build.0 = Release|Any CPU {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|x64.ActiveCfg = Release|x64 {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|x64.Build.0 = Release|x64 {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|x86.ActiveCfg = Release|x86 {F539AC91-2EA9-42D4-A412-474DC1859982}.Release|x86.Build.0 = Release|x86 + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|ARM.ActiveCfg = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|ARM.Build.0 = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|x64.ActiveCfg = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|x64.Build.0 = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|x86.ActiveCfg = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Debug|x86.Build.0 = Debug|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|Any CPU.Build.0 = Release|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|ARM.ActiveCfg = Release|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|ARM.Build.0 = Release|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|x64.ActiveCfg = Release|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|x64.Build.0 = Release|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|x86.ActiveCfg = Release|Any CPU + {AC0A3462-D8AA-4D8C-8111-2A327C045294}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE