Beispiel #1
0
        private void ProcessNumPadInput(string value)
        {
            if (Darbiba.GetInput() != "0" || value == ",")
            {
                txtOutput.Text += value;
            }
            else
            {
                txtOutput.Text = value;
            }

            Darbiba.SetInput(txtOutput.Text);

            if (value != ",")
            {
                Darbiba.DoAritmetics();
            }
        }
Beispiel #2
0
 private void btnReset_Click(object sender, EventArgs e)
 {
     txtOutput.Text = "0";
     Darbiba.Reset();
 }
Beispiel #3
0
 private void btnEquals_Click(object sender, EventArgs e)
 {
     Darbiba.SetOperator("");
     Darbiba.SetInput("0");
     txtOutput.Text = Darbiba.GetResult();
 }
Beispiel #4
0
 private void ProcessArithmeticsInput(string value)
 {
     Darbiba.SetOperator(value);
     Darbiba.SetInput("0");
     txtOutput.Text = Darbiba.GetResult();
 }