private void updateState(mousekey currentKey) { if (currentKey.mActivated == true) { pictureBox37.Image = OnGreen; pictureBox38.Image = OffBlack; } else { pictureBox37.Image = OnBlack; pictureBox38.Image = OffGreen; } }
private void updateYellowKey(mousekey newKey) { //This checks to see if there is a current key in memory and executes if there is if (currentkey != null) { if (currentkey.mActivated == true) { currentkey.setGreen(); } else { currentkey.setBlack(); } if (currentkey.relative == true) { radioButton1.Checked = true; } else if (currentkey.relative == false) { radioButton2.Checked = true; } } currentkey = newKey; newKey.setYellow(); updateState(currentkey); updateClick(currentkey); Console.WriteLine("Update yellow " + currentkey.mCurrentKeyLabel.Text); }
private void updateClick(mousekey currentKey) { radioButton1.Visible = true; radioButton2.Visible = true; switch (currentkey.clickType) { case 1: pictureBox39.Image = LeftGreen; pictureBox40.Image = NoClickBlack; pictureBox41.Image = RightBlack; break; case 2: pictureBox39.Image = LeftBlack; pictureBox40.Image = NoClickBlack; pictureBox41.Image = RightGreen; break; default: pictureBox39.Image = LeftBlack; pictureBox40.Image = NoClickGreen; pictureBox41.Image = RightBlack; break; } switch (currentkey.relative) { case true: radioButton1.Checked = true; break; default: radioButton2.Checked = true; break; } }