Ejemplo n.º 1
0
        private void Equal()
        {
            this.operand       *= (double)this.sign;
            this.sign           = 1;
            this.operand_       = this.operand;
            this.was_operation_ = this.was_operation;
            switch (this.was_operation)
            {
            case Form1.Action.Addition:
                this.operand = this.old_operand + this.operand;
                break;

            case Form1.Action.Subtraction:
                this.operand = this.old_operand - this.operand;
                break;

            case Form1.Action.Multiplication:
                this.operand = this.old_operand * this.operand;
                break;

            case Form1.Action.Division:
                this.operand = this.old_operand / this.operand;
                break;
            }
            this.old_operand = this.operand;
            this.Opetand_to_indicator();
            this.fractional = false;
        }
Ejemplo n.º 2
0
 private void ClearAll()
 {
     this.was_equal     = false;
     this.operand       = 0.0;
     this.was_operation = Form1.Action.Empty;
     this.old_operand   = 0.0;
     this.fractional    = false;
     this.sign          = 1;
 }
Ejemplo n.º 3
0
 private void button14_Click(object sender, EventArgs e)
 {
     if (this.was_equal)
     {
         this.old_operand   = this.operand;
         this.operand       = this.operand_;
         this.was_operation = this.was_operation_;
     }
     this.was_equal = true;
     this.Equal();
     this.was_operation = Form1.Action.Empty;
 }
Ejemplo n.º 4
0
 private void operation(Form1.Action oper)
 {
     if (this.block_double_operation)
     {
         return;
     }
     this.block_double_operation = true;
     this.Equal();
     this.was_equal     = false;
     this.was_operation = oper;
     this.old_operand   = this.operand;
     this.fractional    = false;
     this.operand       = 0.0;
 }