Exemplo n.º 1
0
        private void OperatorClick(object sender, EventArgs e)
        {
            Button BtnOp = (Button)sender;

            if (Resultat != 0)
            {
                BtnEqual.PerformClick();
                Operations     = BtnOp.Text;
                LabelUtr.Text  = Resultat + " " + Operations;
                OperationGjord = true;
            }
            else
            {
                Operations     = BtnOp.Text;
                Resultat       = Double.Parse(NrBox.Text);
                LabelUtr.Text  = Resultat + " " + Operations;
                OperationGjord = true;
            }
        }
Exemplo n.º 2
0
        private void Operator_Click(object sender, EventArgs e)
        {
            Button button = (Button)sender;

            if (resultValue != 0)
            {
                BtnEqual.PerformClick();
                operationPerfomed          = button.Text;
                labelCurrentOperation.Text = resultValue + " " + operationPerfomed;
                isOperationPerfomed        = true;
            }
            else
            {
                operationPerfomed          = button.Text;
                resultValue                = Double.Parse(TxtBoxResult.Text);
                labelCurrentOperation.Text = resultValue + " " + operationPerfomed;
                isOperationPerfomed        = true;
            }
        }