Skip to content

Commit 6402eaa

Browse files
committed
Add "Read more" link for Trusted Signing documentation
Introduced a new "Read more" link in the UI to provide users with quick access to Microsoft Learn documentation on Trusted Signing. Added a static string for the documentation URL in `Globals.cs`. Updated `MainForm.Designer.cs` to include the `linkLabelReadMoreTrustedSigning` control and its properties. Implemented the `linkLabelReadMoreTrustedSigning_LinkClicked` event handler in `MainForm.cs` to open the URL, log user interaction, and handle potential errors with appropriate messages and logging. These changes enhance user experience and improve accessibility to relevant resources.
1 parent 6418fef commit 6402eaa

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

src/SignToolGUI/Class/Globals.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ internal class ToolStates
3535
internal class ToolStings
3636
{
3737
internal static string URLAzurePortalTrustedSigning = @"https://portal.azure.com/#browse/Microsoft.CodeSigning%2Fcodesigningaccounts";
38+
internal static string URLMicrosoftLearnTrustedSigning = @"https://learn.microsoft.com/en-us/azure/trusted-signing/overview";
3839
}
3940

4041

src/SignToolGUI/Forms/MainForm.Designer.cs

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/SignToolGUI/Forms/MainForm.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,5 +3240,24 @@ private void ExportCommandScript()
32403240
Message("Failed to export command script: " + ex.Message, EventType.Error, 20101);
32413241
}
32423242
}
3243+
3244+
private void linkLabelReadMoreTrustedSigning_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
3245+
{
3246+
try
3247+
{
3248+
Process.Start(Globals.ToolStings.URLAzurePortalTrustedSigning);
3249+
3250+
// Log the opening of the URL message
3251+
Message("User clicked the 'Read more' link for Trusted Signing to open the URL: '" + Globals.ToolStings.URLMicrosoftLearnTrustedSigning + "'", EventType.Information, 1052);
3252+
}
3253+
catch (Exception ex)
3254+
{
3255+
// Show an error message if the URL could not be opened
3256+
MessageBox.Show(@"Failed to open the URL '" + Globals.ToolStings.URLAzurePortalTrustedSigning + "'. Error: " + ex.Message, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
3257+
3258+
// Log the error message
3259+
Message("Failed to open the URL: " + ex.Message, EventType.Error, 1041);
3260+
}
3261+
}
32433262
}
32443263
}

0 commit comments

Comments
 (0)