Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Fixed capslock indicator from pool request
Browse files Browse the repository at this point in the history
yes
  • Loading branch information
skver0 committed Dec 26, 2018
1 parent ef442f7 commit bb22a37
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 57 deletions.
9 changes: 2 additions & 7 deletions Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public Main()
bool helpdialog = false;
PowerStatus battery = SystemInformation.PowerStatus;
Help help = new Help();
publicbool publicbool = new publicbool();
string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

private void Main_Load(object sender, EventArgs e)
Expand Down Expand Up @@ -266,14 +267,8 @@ private void t1_Tick(object sender, EventArgs e)

if (IsKeyPushedDown(Keys.CapsLock))
{
if (IsKeyLocked(Keys.CapsLock))
if (!publicbool.visible)
{
// nt1.ShowBalloonTip(5, "x1", "capslock enabled", ToolTipIcon.None);
caps.Show();
}
else
{
//nt1.ShowBalloonTip(5, "x1", "capslock disabled", ToolTipIcon.None);
caps.Show();
}
}
Expand Down
55 changes: 21 additions & 34 deletions caps.Designer.cs

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

30 changes: 15 additions & 15 deletions caps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ public caps()
InitializeComponent();
}

private void label1_Click(object sender, EventArgs e)
{

}

publicbool publicbool = new publicbool();
private void caps_Load(object sender, EventArgs e)
{
this.Opacity = 1;
{
publicbool.visible = true;
Opacity = 1;
if (IsKeyLocked(Keys.CapsLock))
{
label1.Text = "A";
Opacity = 1;
capsindicator.Text = "caps on";
}
else
{
label1.Text = "a";
Opacity = 1;
capsindicator.Text = "caps off";
}
timer1.Start();
timer1.Interval = 1;
t1.Start();
t1.Interval = 1;
}

private void timer1_Tick(object sender, EventArgs e)
{
if (this.Opacity > 0)
if (Opacity > 0)
{
this.Opacity -= 0.01;
Opacity -= 0.01;
}
else {
this.Close();
timer1.Stop();
publicbool.visible = false;
Close();
t1.Stop();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion caps.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="t1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
13 changes: 13 additions & 0 deletions publicbool.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace x1
{
public class publicbool
{
public bool visible = false;
}
}
1 change: 1 addition & 0 deletions x1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="publicbool.cs" />
<EmbeddedResource Include="caps.resx">
<DependentUpon>caps.cs</DependentUpon>
</EmbeddedResource>
Expand Down

0 comments on commit bb22a37

Please sign in to comment.