private Statement readPS() { PrintStatement ps = new PrintStatement(); Console.WriteLine("Input expression:"); ps.setE(readExpression()); return(ps); }
void ButtonPrintStatementClick(object sender, EventArgs e) { PrintStatement ps = new PrintStatement(); using (ExpressionForm expF = new ExpressionForm()) { if (expF.ShowDialog() == System.Windows.Forms.DialogResult.OK) { ps.setE(expF.getExpression()); this.stmt = ps; finished(); } } }