changeset 20:b21318f6e3f1

About window tweaks
author Brad Greco <brad@bgreco.net>
date Thu, 30 May 2019 20:36:42 -0400
parents b3128fe10d57
children 832a07de0f90
files ServerMonitor/Forms/AboutForm.Designer.cs ServerMonitor/Forms/AboutForm.cs
diffstat 2 files changed, 45 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/ServerMonitor/Forms/AboutForm.Designer.cs	Wed May 29 20:18:37 2019 -0400
+++ b/ServerMonitor/Forms/AboutForm.Designer.cs	Thu May 30 20:36:42 2019 -0400
@@ -33,7 +33,8 @@
             this.CopyrightLabel = new System.Windows.Forms.Label();
             this.HomePageLink = new System.Windows.Forms.LinkLabel();
             this.LicenseLabel = new System.Windows.Forms.Label();
-            this.LibrariesLabel = new System.Windows.Forms.Label();
+            this.SshNetLinkLabel = new System.Windows.Forms.LinkLabel();
+            this.NAppUpdateLinkLabel = new System.Windows.Forms.LinkLabel();
             ((System.ComponentModel.ISupportInitialize)(this.IconPictureBox)).BeginInit();
             this.SuspendLayout();
             // 
@@ -59,7 +60,7 @@
             // 
             // CopyrightLabel
             // 
-            this.CopyrightLabel.Location = new System.Drawing.Point(12, 111);
+            this.CopyrightLabel.Location = new System.Drawing.Point(12, 109);
             this.CopyrightLabel.Name = "CopyrightLabel";
             this.CopyrightLabel.Size = new System.Drawing.Size(300, 20);
             this.CopyrightLabel.TabIndex = 2;
@@ -68,7 +69,7 @@
             // 
             // HomePageLink
             // 
-            this.HomePageLink.Location = new System.Drawing.Point(12, 131);
+            this.HomePageLink.Location = new System.Drawing.Point(12, 127);
             this.HomePageLink.Name = "HomePageLink";
             this.HomePageLink.Size = new System.Drawing.Size(300, 20);
             this.HomePageLink.TabIndex = 3;
@@ -88,22 +89,39 @@
     " NO WARRANTY.";
             this.LicenseLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
             // 
-            // LibrariesLabel
+            // SshNetLinkLabel
+            // 
+            this.SshNetLinkLabel.LinkArea = new System.Windows.Forms.LinkArea(31, 7);
+            this.SshNetLinkLabel.Location = new System.Drawing.Point(12, 230);
+            this.SshNetLinkLabel.Name = "SshNetLinkLabel";
+            this.SshNetLinkLabel.Size = new System.Drawing.Size(300, 18);
+            this.SshNetLinkLabel.TabIndex = 6;
+            this.SshNetLinkLabel.TabStop = true;
+            this.SshNetLinkLabel.Text = "SSH support is provided by the SSH.NET library.";
+            this.SshNetLinkLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+            this.SshNetLinkLabel.UseCompatibleTextRendering = true;
+            this.SshNetLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.SshNetLinkLabel_LinkClicked);
             // 
-            this.LibrariesLabel.Location = new System.Drawing.Point(12, 230);
-            this.LibrariesLabel.Name = "LibrariesLabel";
-            this.LibrariesLabel.Size = new System.Drawing.Size(300, 45);
-            this.LibrariesLabel.TabIndex = 5;
-            this.LibrariesLabel.Text = "SSH support is provided by the SSH.NET library.\r\nProgram updates are handled by t" +
-    "he NAppUpdate library.";
-            this.LibrariesLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+            // NAppUpdateLinkLabel
+            // 
+            this.NAppUpdateLinkLabel.LinkArea = new System.Windows.Forms.LinkArea(35, 10);
+            this.NAppUpdateLinkLabel.Location = new System.Drawing.Point(12, 246);
+            this.NAppUpdateLinkLabel.Name = "NAppUpdateLinkLabel";
+            this.NAppUpdateLinkLabel.Size = new System.Drawing.Size(300, 18);
+            this.NAppUpdateLinkLabel.TabIndex = 7;
+            this.NAppUpdateLinkLabel.TabStop = true;
+            this.NAppUpdateLinkLabel.Text = "Program updates are handled by the NAppUpdate library.";
+            this.NAppUpdateLinkLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+            this.NAppUpdateLinkLabel.UseCompatibleTextRendering = true;
+            this.NAppUpdateLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.NAppUpdateLinkLabel_LinkClicked);
             // 
             // AboutForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(324, 273);
-            this.Controls.Add(this.LibrariesLabel);
+            this.Controls.Add(this.NAppUpdateLinkLabel);
+            this.Controls.Add(this.SshNetLinkLabel);
             this.Controls.Add(this.LicenseLabel);
             this.Controls.Add(this.HomePageLink);
             this.Controls.Add(this.CopyrightLabel);
@@ -127,6 +145,7 @@
         private System.Windows.Forms.Label CopyrightLabel;
         private System.Windows.Forms.LinkLabel HomePageLink;
         private System.Windows.Forms.Label LicenseLabel;
-        private System.Windows.Forms.Label LibrariesLabel;
+        private System.Windows.Forms.LinkLabel SshNetLinkLabel;
+        private System.Windows.Forms.LinkLabel NAppUpdateLinkLabel;
     }
 }
\ No newline at end of file
--- a/ServerMonitor/Forms/AboutForm.cs	Wed May 29 20:18:37 2019 -0400
+++ b/ServerMonitor/Forms/AboutForm.cs	Thu May 30 20:36:42 2019 -0400
@@ -18,6 +18,8 @@
         {
             Icon = Resources.icon;
             NameLabel.Text += " " + Assembly.GetExecutingAssembly().GetName().Version.ToString(2);
+            // Remove initial focus on the first link causing an dotted outline.
+            ActiveControl = NameLabel;
         }
 
         /// <summary>Hides the form when ESC is pressed.</summary>
@@ -33,7 +35,17 @@
 
         private void HomePageLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
         {
-            Process.Start("http://bgreco.net/servermonitor");
+            Process.Start("https://bgreco.net/servermonitor");
+        }
+
+        private void SshNetLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        {
+            Process.Start("https://github.com/sshnet/SSH.NET");
+        }
+
+        private void NAppUpdateLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        {
+            Process.Start("https://github.com/synhershko/NAppUpdate");
         }
     }
 }