Ejemplo n.º 1
0
        private void timer5_Tick(object sender, EventArgs e)
        {
            counter5--;

            if (counter5 == 0)
            {
                timer5.Stop();
                Console.Beep(5000, 1000);
                Btn6.PerformClick();
            }


            LblCounter.Text = counter5.ToString();
        }
Ejemplo n.º 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;
            }
        }