Skip to content

Commit

Permalink
Fixed issue with the notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
tech-chieftain committed Mar 2, 2018
1 parent 32fbe4d commit 62d2bf6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
29 changes: 16 additions & 13 deletions exhibit/Form1.Designer.cs

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

22 changes: 10 additions & 12 deletions exhibit/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ due to their inability to differntiate certain colors.
-----------------------------------------------------------------------------------------
I've used [John Gietzen] answer from this stackoverflow page [https://stackoverflow.com/questions/1483928/how-to-read-the-color-of-a-screen-pixel]. Thanks John!
*/






using System;
using System.Drawing;
using System.Windows.Forms;
Expand All @@ -26,9 +20,9 @@ namespace exhibit
{
public partial class frmMain : Form
{
private bool showNotification = false;
private bool showNotification = true;
private List<Keys> C1 = new List<Keys> { };
int count = 0;

private globalKeyboardHook gkh = new globalKeyboardHook();

private bool mouseMoveTimer = false;
Expand Down Expand Up @@ -72,7 +66,6 @@ private void frmMain_Load(object sender, EventArgs e)
notifyIcon1.BalloonTipText = "Exhibit is running.";
notifyIcon1.BalloonTipTitle = "Exhibit";
notifyIcon1.Icon = SystemIcons.Application;

notifyIcon1.ShowBalloonTip(1000);

}
Expand All @@ -94,6 +87,7 @@ public void ConsoleLog(List<Keys> keys)
mouseMoveTimer = false;
if (showNotification)
{
notifyIcon1.Visible = true;
notifyIcon1.BalloonTipTitle = "Exhibit";
notifyIcon1.BalloonTipText = "Last color is: " + textBox1.Text;
notifyIcon1.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
Expand All @@ -111,7 +105,7 @@ private void button1_Click(object sender, EventArgs e)

private void MouseMoveTimer_Tick_1(object sender, EventArgs e)
{

Point cursor = new Point();
GetCursorPos(ref cursor);
var c = GetColorAt(cursor);
Expand Down Expand Up @@ -405,7 +399,7 @@ private void checkBox1_CheckedChanged(object sender, EventArgs e)
}
else
{
showNotification = false;
showNotification = true;


}
Expand All @@ -415,7 +409,6 @@ private void checkBox1_CheckedChanged(object sender, EventArgs e)
private void RunStrip_Click(object sender, EventArgs e)
{
this.Focus();

ConsoleLog(C1);
this.Show();

Expand Down Expand Up @@ -443,5 +436,10 @@ private void notifyIcon1_DoubleClick(object sender, EventArgs e)
this.WindowState = FormWindowState.Normal;
notifyIcon1.Visible = false;
}

private void textBox1_TextChanged(object sender, EventArgs e)
{

}
}
}

0 comments on commit 62d2bf6

Please sign in to comment.