private void AddProblem_Click(object sender, RoutedEventArgs e) { var textDlg = new TextDialog(this, "Add Problem", "Enter a clear and concise problem statement, focusing on describing the symptoms while minimizing assumptions about possible causes."); if (textDlg.ShowDialog().Value) { vm.CreateProblem(textDlg.Text); } }
private void EditNodeText_Click(object sender, RoutedEventArgs e) { var textDlg = new TextDialog(this, "Edit Text", $"Old text:\n{contextMenuNode.Text}\n\nNew text:"); textDlg.NodeText.Text = contextMenuNode.Text; if (textDlg.ShowDialog().Value) { vm.EditNodeText(textDlg.Text, contextMenuNode); } }
private void Node_Click(object sender, RoutedEventArgs e) { contextMenuNode = (((FrameworkElement)sender).DataContext as Graphing.RootCauseVertex).Source; if (isLinking) { CreateLink(contextMenuNode); } else { var textDlg = new TextDialog(this, "Add Cause", $"{contextMenuNode.Text}\n", "\uE019 Because Therefore \uE018"); if (textDlg.ShowDialog().Value) { vm.CreateChildNode(textDlg.Text, contextMenuNode); } } }