//Some logic for switching modes private void buttonMode_Click(object sender, EventArgs e) { this.calcWindow.Text = currentMode.clear(); if (currentMode.GetType() == typeof(RPN)) { currentMode = new INFIX(); this.enterBtn.Visible = false; } else { currentMode = new RPN(); this.enterBtn.Visible = true; } this.modeLabel.Text = currentMode.getName(); }
//Functions----------------------------------------------------------------------------------------------------------------------------- public Form1() { InitializeComponent(); currentMode = new INFIX(); }