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 MainWindow.Action.Addition: this.operand = this.old_operand + this.operand; break; case MainWindow.Action.Subtraction: this.operand = this.old_operand - this.operand; break; case MainWindow.Action.Multiplication: this.operand = this.old_operand * this.operand; break; case MainWindow.Action.Division: this.operand = this.old_operand / this.operand; break; } this.old_operand = this.operand; this.Opetand_to_indicator(); this.fractional = false; }
private void ClearAll() { this.was_equal = false; this.operand = 0.0; this.was_operation = MainWindow.Action.Empty; this.old_operand = 0.0; this.fractional = false; this.sign = 1; }
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 = MainWindow.Action.Empty; }
private void operation(MainWindow.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; }