コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 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);
         }
     }
 }