From 852af9bdffb9f2492f6ace073424d00027c11480 Mon Sep 17 00:00:00 2001 From: Sigmanor Date: Mon, 18 Jan 2016 20:33:21 +0200 Subject: [PATCH] Added release notes link --- Updater/Form1.Designer.cs | 18 +++++++++++++++++- Updater/Form1.cs | 6 +++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Updater/Form1.Designer.cs b/Updater/Form1.Designer.cs index c423a94..3410994 100644 --- a/Updater/Form1.Designer.cs +++ b/Updater/Form1.Designer.cs @@ -32,6 +32,7 @@ private void InitializeComponent() this.panel1 = new System.Windows.Forms.Panel(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.button1 = new System.Windows.Forms.Button(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); @@ -40,7 +41,7 @@ private void InitializeComponent() // this.label1.Location = new System.Drawing.Point(76, 29); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(215, 35); + this.label1.Size = new System.Drawing.Size(215, 41); this.label1.TabIndex = 2; this.label1.Text = "Application will be updated and reopened."; // @@ -75,11 +76,24 @@ private void InitializeComponent() this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline; + this.linkLabel1.Location = new System.Drawing.Point(12, 97); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(96, 13); + this.linkLabel1.TabIndex = 6; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "View release notes"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // // UpdateForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(294, 121); + this.Controls.Add(this.linkLabel1); this.Controls.Add(this.button1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -93,6 +107,7 @@ private void InitializeComponent() this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -101,6 +116,7 @@ private void InitializeComponent() private System.Windows.Forms.Label label1; private System.Windows.Forms.Button button1; private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.LinkLabel linkLabel1; } } diff --git a/Updater/Form1.cs b/Updater/Form1.cs index 784f2d3..da7e6d3 100644 --- a/Updater/Form1.cs +++ b/Updater/Form1.cs @@ -35,6 +35,7 @@ void downloader_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e) if (e.Error != null) { System.Media.SystemSounds.Beep.Play(); + //linkLabel1.Visible = false; okButton = true; button1.Enabled = true; label1.Text = "There was some errors during the update, please try again later."; @@ -83,6 +84,9 @@ private void button1_Click(object sender, EventArgs e) } } - + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("https://github.com/Sigmanor/Crypto-Notepad/wiki/Release-Notes"); + } } }