private void addButton_Click(object sender, EventArgs e) { if ((this.resultScreen.Contains('+')) || (this.resultScreen.Contains('-')) || (this.resultScreen.Contains('x')) || (this.resultScreen.Contains('÷'))) { this.equalButton_Click(sender, e); } if (this.resultLabel.Text.Length <= 14) { if (!this.resultScreen.Contains('+')) { this.oper = new Sum(); this.result = float.Parse(this.resultScreen, CultureInfo.InvariantCulture.NumberFormat); this.oper.setResult(this.result); this.resultScreen = this.resultScreen + "+"; this.resultLabel.Text = this.resultScreen; } } }
public void setOper(Operations oper) { this.oper = oper; }
public Percentage(Operations operation) { //Constructor method this.operation = operation; }