public void UpdateCommand(DataWrapper data) { foreach (CPPManager m in _managers) { m.Execute(data); } }
public void UpdateUI(DataWrapper data) { string str = data.GetData(DataType.OutputString) as string; if (str == null) { return; } TextBlock outputBox = CreateOutputBox(_name + ": " + str); stackPanel_Global.Children.Add(outputBox); TextBox inputBox = CreateInputBox(); stackPanel_Global.Children.Add(inputBox); stackPanel_Global.Children[stackPanel_Global.Children.Count - 1].Focus(); }
private void InputBoxEnterDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { TextBox box = sender as TextBox; if (box == null) { return; } box.IsReadOnly = true; box.Focusable = false; DataWrapper data = CreateDataWrapper(box.Text); UpdateCommand(data); e.Handled = true; } }