Move contributors to UI Base

This commit is contained in:
Michael Bucari-Tovo 2025-03-24 13:29:02 -06:00
parent 17612dacd2
commit 0a9e489f48
5 changed files with 125 additions and 159 deletions

View file

@ -40,15 +40,8 @@
label2 = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
linkLabel4 = new System.Windows.Forms.LinkLabel();
linkLabel2 = new System.Windows.Forms.LinkLabel();
linkLabel3 = new System.Windows.Forms.LinkLabel();
linkLabel1 = new System.Windows.Forms.LinkLabel();
linkLabel5 = new System.Windows.Forms.LinkLabel();
linkLabel6 = new System.Windows.Forms.LinkLabel();
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
groupBox1.SuspendLayout();
flowLayoutPanel1.SuspendLayout();
SuspendLayout();
//
// pictureBox1
@ -65,7 +58,7 @@
// releaseNotesLbl
//
releaseNotesLbl.AutoSize = true;
releaseNotesLbl.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
releaseNotesLbl.Font = new System.Drawing.Font("Segoe UI", 11F);
releaseNotesLbl.Location = new System.Drawing.Point(12, 12);
releaseNotesLbl.Name = "releaseNotesLbl";
releaseNotesLbl.Size = new System.Drawing.Size(171, 20);
@ -77,7 +70,7 @@
// checkForUpgradeBtn
//
checkForUpgradeBtn.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
checkForUpgradeBtn.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
checkForUpgradeBtn.Font = new System.Drawing.Font("Segoe UI", 10F);
checkForUpgradeBtn.Location = new System.Drawing.Point(12, 54);
checkForUpgradeBtn.Name = "checkForUpgradeBtn";
checkForUpgradeBtn.Size = new System.Drawing.Size(410, 31);
@ -90,7 +83,7 @@
//
getLibationLbl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
getLibationLbl.AutoSize = true;
getLibationLbl.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
getLibationLbl.Font = new System.Drawing.Font("Segoe UI", 11F);
getLibationLbl.Location = new System.Drawing.Point(245, 12);
getLibationLbl.Name = "getLibationLbl";
getLibationLbl.Size = new System.Drawing.Size(162, 20);
@ -103,7 +96,7 @@
//
rmcrackanLbl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
rmcrackanLbl.AutoSize = true;
rmcrackanLbl.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
rmcrackanLbl.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
rmcrackanLbl.Location = new System.Drawing.Point(6, 19);
rmcrackanLbl.Name = "rmcrackanLbl";
rmcrackanLbl.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
@ -111,13 +104,13 @@
rmcrackanLbl.TabIndex = 8;
rmcrackanLbl.TabStop = true;
rmcrackanLbl.Text = "rmcrackan";
rmcrackanLbl.LinkClicked += Link_GithubUser;
rmcrackanLbl.LinkClicked += ContributorLabel_LinkClicked;
//
// MBucariLbl
//
MBucariLbl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
MBucariLbl.AutoSize = true;
MBucariLbl.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
MBucariLbl.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold);
MBucariLbl.Location = new System.Drawing.Point(6, 40);
MBucariLbl.Name = "MBucariLbl";
MBucariLbl.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
@ -125,7 +118,7 @@
MBucariLbl.TabIndex = 9;
MBucariLbl.TabStop = true;
MBucariLbl.Text = "Mbucari";
MBucariLbl.LinkClicked += Link_GithubUser;
MBucariLbl.LinkClicked += ContributorLabel_LinkClicked;
//
// groupBox1
//
@ -147,7 +140,7 @@
// label3
//
label3.AutoSize = true;
label3.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
label3.Font = new System.Drawing.Font("Segoe UI", 10F);
label3.Location = new System.Drawing.Point(92, 43);
label3.Name = "label3";
label3.Padding = new System.Windows.Forms.Padding(0, 0, 0, 3);
@ -158,7 +151,7 @@
// label4
//
label4.AutoSize = true;
label4.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
label4.Font = new System.Drawing.Font("Segoe UI", 10F);
label4.Location = new System.Drawing.Point(92, 22);
label4.Name = "label4";
label4.Padding = new System.Windows.Forms.Padding(0, 0, 0, 3);
@ -169,7 +162,7 @@
// label2
//
label2.AutoSize = true;
label2.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
label2.Font = new System.Drawing.Font("Segoe UI", 10F);
label2.Location = new System.Drawing.Point(92, 22);
label2.Name = "label2";
label2.Padding = new System.Windows.Forms.Padding(0, 0, 0, 3);
@ -189,101 +182,11 @@
// flowLayoutPanel1
//
flowLayoutPanel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
flowLayoutPanel1.Controls.Add(linkLabel4);
flowLayoutPanel1.Controls.Add(linkLabel2);
flowLayoutPanel1.Controls.Add(linkLabel3);
flowLayoutPanel1.Controls.Add(linkLabel1);
flowLayoutPanel1.Controls.Add(linkLabel5);
flowLayoutPanel1.Controls.Add(linkLabel6);
flowLayoutPanel1.Location = new System.Drawing.Point(6, 100);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Size = new System.Drawing.Size(398, 66);
flowLayoutPanel1.TabIndex = 10;
//
// linkLabel4
//
linkLabel4.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
linkLabel4.AutoSize = true;
linkLabel4.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
linkLabel4.Location = new System.Drawing.Point(3, 0);
linkLabel4.Name = "linkLabel4";
linkLabel4.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
linkLabel4.Size = new System.Drawing.Size(41, 21);
linkLabel4.TabIndex = 9;
linkLabel4.TabStop = true;
linkLabel4.Text = "pixil98";
linkLabel4.LinkClicked += Link_GithubUser;
//
// linkLabel2
//
linkLabel2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
linkLabel2.AutoSize = true;
linkLabel2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
linkLabel2.Location = new System.Drawing.Point(50, 0);
linkLabel2.Name = "linkLabel2";
linkLabel2.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
linkLabel2.Size = new System.Drawing.Size(104, 21);
linkLabel2.TabIndex = 9;
linkLabel2.TabStop = true;
linkLabel2.Text = "hutattedonmyarm";
linkLabel2.LinkClicked += Link_GithubUser;
//
// linkLabel3
//
linkLabel3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
linkLabel3.AutoSize = true;
linkLabel3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
linkLabel3.Location = new System.Drawing.Point(160, 0);
linkLabel3.Name = "linkLabel3";
linkLabel3.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
linkLabel3.Size = new System.Drawing.Size(43, 21);
linkLabel3.TabIndex = 9;
linkLabel3.TabStop = true;
linkLabel3.Text = "seanke";
linkLabel3.LinkClicked += Link_GithubUser;
//
// linkLabel1
//
linkLabel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
linkLabel1.AutoSize = true;
linkLabel1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
linkLabel1.Location = new System.Drawing.Point(209, 0);
linkLabel1.Name = "linkLabel1";
linkLabel1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
linkLabel1.Size = new System.Drawing.Size(66, 21);
linkLabel1.TabIndex = 9;
linkLabel1.TabStop = true;
linkLabel1.Text = "wtanksleyjr";
linkLabel1.LinkClicked += Link_GithubUser;
//
// linkLabel5
//
linkLabel5.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
linkLabel5.AutoSize = true;
linkLabel5.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
linkLabel5.Location = new System.Drawing.Point(281, 0);
linkLabel5.Name = "linkLabel5";
linkLabel5.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
linkLabel5.Size = new System.Drawing.Size(51, 21);
linkLabel5.TabIndex = 9;
linkLabel5.TabStop = true;
linkLabel5.Text = "Dr.Blank";
linkLabel5.LinkClicked += Link_GithubUser;
//
// linkLabel6
//
linkLabel6.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
linkLabel6.AutoSize = true;
linkLabel6.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
linkLabel6.Location = new System.Drawing.Point(3, 21);
linkLabel6.Name = "linkLabel6";
linkLabel6.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
linkLabel6.Size = new System.Drawing.Size(77, 21);
linkLabel6.TabIndex = 9;
linkLabel6.TabStop = true;
linkLabel6.Text = "CharlieRussel";
linkLabel6.LinkClicked += Link_GithubUser;
//
// AboutDialog
//
AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@ -301,8 +204,6 @@
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
@ -317,15 +218,9 @@
private System.Windows.Forms.LinkLabel MBucariLbl;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.LinkLabel linkLabel4;
private System.Windows.Forms.LinkLabel linkLabel2;
private System.Windows.Forms.LinkLabel linkLabel3;
private System.Windows.Forms.LinkLabel linkLabel5;
private System.Windows.Forms.LinkLabel linkLabel6;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label label2;
}
}

View file

@ -1,5 +1,6 @@
using LibationUiBase;
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -13,10 +14,29 @@ namespace LibationWinForms.Dialogs
this.SetLibationIcon();
releaseNotesLbl.Text = $"Libation {AppScaffolding.LibationScaffolding.Variety} v{AppScaffolding.LibationScaffolding.BuildVersion}";
rmcrackanLbl.Tag = LibationContributor.PrimaryContributors.Single(c => c.Name == rmcrackanLbl.Text);
MBucariLbl.Tag = LibationContributor.PrimaryContributors.Single(c => c.Name == MBucariLbl.Text);
foreach (var contributor in LibationContributor.AdditionalContributors)
{
var label = new LinkLabel { Tag = contributor, Text = contributor.Name, AutoSize = true };
label.LinkClicked += ContributorLabel_LinkClicked;
flowLayoutPanel1.Controls.Add(label);
}
var toolTip = new ToolTip();
toolTip.SetToolTip(releaseNotesLbl, "View Release Notes");
}
private void ContributorLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
if (sender is LinkLabel lbl && lbl.Tag is LibationContributor contributor)
{
Dinah.Core.Go.To.Url(contributor.Link.AbsoluteUri);
e.Link.Visited = true;
}
}
private void releaseNotesLbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Dinah.Core.Go.To.Url($"{AppScaffolding.LibationScaffolding.RepositoryUrl}/releases/tag/v{AppScaffolding.LibationScaffolding.BuildVersion.ToString(3)}");
@ -50,13 +70,5 @@ namespace LibationWinForms.Dialogs
private void getLibationLbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
=> Dinah.Core.Go.To.Url(AppScaffolding.LibationScaffolding.WebsiteUrl);
private void Link_GithubUser(object sender, LinkLabelLinkClickedEventArgs e)
{
if (sender is LinkLabel lbl)
{
Dinah.Core.Go.To.Url($"ht" + $"tps://github.com/{lbl.Text.Replace('.', '-')}");
}
}
}
}