public static void Main() { Console.SetWindowSize(WindowWidth, Console.WindowHeight); Console.SetBufferSize(WindowWidth, Console.BufferHeight); _evaluator = new Evaluator(); while (true) { Console.Write("> "); var input = Console.ReadLine() ?? string.Empty; if (SpecialActions.ContainsKey(input)) { SpecialActions[input].Invoke(); continue; } try { Console.WriteLine(CleanOutput(_evaluator.Evaluate(input)).PadLeft(WindowWidth, ' ')); } catch (Exception ex) { Console.WriteLine(ex.Message.PadLeft(WindowWidth, ' ')); } } }
public MainWindow() { InitializeComponent(); _evaluator = new Evaluator(); FillInsertMenu(); InputBox.Focus(); }
public void Initialize() { _evaluator = new Evaluator(); }