Exemplo n.º 1
0
        private void addLinkBtn_Click(object sender, EventArgs e)
        {
            string link = AddNodePrompt.ShowDialog("Enter a link", "Web Address");

            if (link != string.Empty)
            {
                mainRichTextBox.InsertLink(mainRichTextBox.SelectedText, link, mainRichTextBox.SelectionStart);
            }
        }
Exemplo n.º 2
0
 private void addNodeBtn_Click(object sender, EventArgs e)
 {
     if (treeView.SelectedNode.Name == "homeNode")
     {
         MessageBox.Show("Cannot add node to homepage");
     }
     else
     {
         newNodeName = AddNodePrompt.ShowDialog("Choose a Name", "Node Name");
         SearchAndAddNode(treeView.SelectedNode.Name, newNodeName);
         treeView.SelectedNode = FindNode(newNodeName, treeView.SelectedNode.Name);
     }
 }