From b71a5f7290be7956217cfa9bdb094c704bd5c07f Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 8 Jun 2023 21:04:10 +1000 Subject: [PATCH] splashscreen: Fix sizing and added link - Added a new label2 control to the designer file - Created a new event handler for the label2_Click method in SplashScreen.cs - Implemented ProcessStartInfo and Process.Start() methods to open website --- FireWallet/SplashScreen.Designer.cs | 24 ++++++++++++++++++++---- FireWallet/SplashScreen.cs | 11 +++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/FireWallet/SplashScreen.Designer.cs b/FireWallet/SplashScreen.Designer.cs index 81f69fd..ba7de0b 100644 --- a/FireWallet/SplashScreen.Designer.cs +++ b/FireWallet/SplashScreen.Designer.cs @@ -33,6 +33,7 @@ timerSplashDelay = new System.Windows.Forms.Timer(components); label1 = new Label(); pictureBox1 = new PictureBox(); + label2 = new Label(); ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); SuspendLayout(); // @@ -46,7 +47,7 @@ // label1.AutoSize = true; label1.Font = new Font("Segoe UI", 20F, FontStyle.Regular, GraphicsUnit.Point); - label1.Location = new Point(209, 36); + label1.Location = new Point(80, 9); label1.Name = "label1"; label1.Size = new Size(284, 37); label1.TabIndex = 0; @@ -54,20 +55,33 @@ // // pictureBox1 // + pictureBox1.BackColor = Color.Transparent; pictureBox1.Image = (Image)resources.GetObject("pictureBox1.Image"); - pictureBox1.Location = new Point(142, 76); + pictureBox1.Location = new Point(12, 58); pictureBox1.Name = "pictureBox1"; - pictureBox1.Size = new Size(411, 328); + pictureBox1.Size = new Size(420, 330); pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; pictureBox1.TabIndex = 1; pictureBox1.TabStop = false; // + // label2 + // + label2.AutoSize = true; + label2.Font = new Font("Segoe UI", 11F, FontStyle.Regular, GraphicsUnit.Point); + label2.Location = new Point(154, 400); + label2.Name = "label2"; + label2.Size = new Size(136, 20); + label2.TabIndex = 2; + label2.Text = "Nathan.Woodburn/"; + label2.Click += label2_Click; + // // SplashScreen // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; BackColor = Color.Black; - ClientSize = new Size(749, 416); + ClientSize = new Size(444, 435); + Controls.Add(label2); Controls.Add(pictureBox1); Controls.Add(label1); ForeColor = Color.FromArgb(142, 5, 194); @@ -77,6 +91,7 @@ ShowInTaskbar = false; StartPosition = FormStartPosition.CenterScreen; Text = "FireWallet"; + TopMost = true; FormClosing += SplashScreen_FormClosing; ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); ResumeLayout(false); @@ -88,5 +103,6 @@ private System.Windows.Forms.Timer timerSplashDelay; private Label label1; private PictureBox pictureBox1; + private Label label2; } } \ No newline at end of file diff --git a/FireWallet/SplashScreen.cs b/FireWallet/SplashScreen.cs index 8512195..c8439a0 100644 --- a/FireWallet/SplashScreen.cs +++ b/FireWallet/SplashScreen.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; using System.Linq; using System.Text; @@ -31,5 +32,15 @@ namespace FireWallet e.Cancel = true; } } + + private void label2_Click(object sender, EventArgs e) + { + ProcessStartInfo psi = new ProcessStartInfo + { + FileName = "https://nathan.woodburn.au", + UseShellExecute = true + }; + Process.Start(psi); + } } }