Skip to content

Commit

Permalink
Error-checking, idiot-proofing, shenaniganary
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordy3D committed Mar 1, 2023
1 parent c0809e1 commit e8ba532
Show file tree
Hide file tree
Showing 10 changed files with 667 additions and 325 deletions.
41 changes: 35 additions & 6 deletions KeyLockDisplay/AboutForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions KeyLockDisplay/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ void ApplyTheme()
aboutBox.ForeColor = ColorTranslator.FromHtml(_isLightMode ? "#000" : "#fff");
}

Process p = new Process();

private void aboutBox_LinkClicked(object sender, LinkClickedEventArgs e)
private void aboutBox_TextChanged(object sender, EventArgs e)
{
p = Process.Start(e.LinkText);
}

private void aboutBox_TextChanged(object sender, EventArgs e)
{
}

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://github.com/Jordy3D/KeyLockDisplay");
}
}
}
}
4 changes: 3 additions & 1 deletion KeyLockDisplay/AboutForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ like are enabled.
Now, I can tell if I need to worry about typing over
my previously-written text!

I hope you find this useful!</value>
I hope you find this useful!

You can find a link to the GitHub repo below:</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
2 changes: 1 addition & 1 deletion KeyLockDisplay/KeyLockDisplay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>0.1.1.1</ApplicationVersion>
<ApplicationVersion>0.2.1.1</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down
4 changes: 2 additions & 2 deletions KeyLockDisplay/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static void Main()

//Launch
Application.Run();

}

private static void UpdateLockIcon(object state)
Expand All @@ -74,6 +73,7 @@ private static void UpdateLockIcon(object state)
private static Icon KeyStateIcon()
{
string lockString = "";

// if capslock, numlock, scrolllock or insert is on, add a letter to the string
if (Control.IsKeyLocked(Keys.CapsLock)) lockString += "C";
if (Control.IsKeyLocked(Keys.NumLock)) lockString += "N";
Expand All @@ -84,6 +84,7 @@ private static Icon KeyStateIcon()
if (lockString == "")
lockString = "None";

// Add the appropriate suffix for the current theme mode
lockString += _isLightMode ? "_W" : "_B";

if (Properties.Settings.Default.UseCustomIcons)
Expand All @@ -95,7 +96,6 @@ private static Icon KeyStateIcon()
}
else
{
// otherwise, return the icon with the appropriate letters, ie return Properties.Resources.Active_CNI if capslock, numlock and insert are on
return (Icon)Properties.Resources.ResourceManager.GetObject("Active_" + lockString);
}
}
Expand Down
4 changes: 2 additions & 2 deletions KeyLockDisplay/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("0.2")]
[assembly: AssemblyFileVersion("0.2")]
54 changes: 29 additions & 25 deletions KeyLockDisplay/SettingsForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8ba532

Please sign in to comment.