private void timer8_Tick(object sender, EventArgs e)
        {
            counter8--;

            if (counter8 == 0)
            {
                timer8.Stop();
                Console.Beep(5000, 1000);
                Btn9.PerformClick();
            }


            LblCounter.Text = counter8.ToString();
        }
示例#2
0
        // Keyboard Keys Events.
        private void Calculator_KeyDown(object sender, KeyEventArgs e)
        {
            // Using Switch To Perform Various Key Events.
            switch (e.KeyCode)
            {
            case Keys.NumPad1: { Btn1.PerformClick(); break; }

            case Keys.NumPad2: { Btn2.PerformClick(); break; }

            case Keys.NumPad3: { Btn3.PerformClick(); break; }

            case Keys.NumPad4: { Btn4.PerformClick(); break; }

            case Keys.NumPad5: { Btn5.PerformClick(); break; }

            case Keys.NumPad6: { Btn6.PerformClick(); break; }

            case Keys.NumPad7: { Btn7.PerformClick(); break; }

            case Keys.NumPad8: { Btn8.PerformClick(); break; }

            case Keys.NumPad9: { Btn9.PerformClick(); break; }

            case Keys.NumPad0: { Btn0.PerformClick(); break; }

            case Keys.Back: { BackBtn.PerformClick(); break; }

            case Keys.Add: { BtnPlus.PerformClick(); break; }

            case Keys.Subtract: { BtnMinus.PerformClick(); break; }

            case Keys.Divide: { BtnDivision.PerformClick(); break; }

            case Keys.Multiply: { BtnMultiple.PerformClick(); break; }

            case Keys.Decimal: { BtnPoint.PerformClick(); break; }

            case Keys.Oemplus: { BtnEquals.PerformClick(); break; }

            case Keys.H: { vh.Show(); break; }

            default: break;
            }
        }