示例#1
0
        //Operator State
        private void DigitPeriod_Button_MouseClick(object sender, MouseEventArgs e)
        {
            string input = DigitPeriod_Button.Text;

            CalculatorState.getInstance().nextState(1, input);
            textBox1.Text = CalculationState.getInstance().display();
        }
示例#2
0
        private void Digit7_Button_Click(object sender, EventArgs e)
        {
            string input = Digit7_Button.Text;

            CalculatorState.getInstance().nextState(1, input);
            textBox1.Text = CalculationState.getInstance().clearScreen();
            textBox1.Text = CalculationState.getInstance().display();
        }
示例#3
0
 //Calculation State
 private void ComputeButton_MouseClick(object sender, MouseEventArgs e)
 {
     CalculatorState.getInstance().nextState(3, null);
     textBox1.Text = CalculationState.getInstance().display();
 }