private void Window_Initialized(object sender, EventArgs e) { Logger.OnLog += Log; Logger.DebugLogging = DebugLogToggle.IsChecked ?? false; Evaluator.Initialize(); EntryBox.Focus(); ShowBtn_Click(ShowBtn, null); }
private void GoBtn_Click(object sender, RoutedEventArgs e) { string input = EntryBox.Text; ListBoxItem inputLBI = new ListBoxItem(); inputLBI.Content = input; inputLBI.HorizontalContentAlignment = HorizontalAlignment.Left; inputLBI.HorizontalAlignment = HorizontalAlignment.Stretch; HistoryBox.Items.Add(inputLBI); IResultValue irv = Evaluator.Evaluate(input); ListBoxItem outputLBI = new ListBoxItem(); outputLBI.Content = irv.ToDisplayString(); outputLBI.HorizontalContentAlignment = HorizontalAlignment.Right; outputLBI.HorizontalAlignment = HorizontalAlignment.Stretch; HistoryBox.Items.Add(outputLBI); EntryBox.Text = ""; EntryBox.Focus(); }
private void StringDialog_Shown(object sender, EventArgs e) { EntryBox.Text = String; EntryBox.Focus(); EntryBox.SelectAll(); }