Example #1
0
 private void ContextMenu_NewTop_Click(object sender, EventArgs e)
 {
     var f = new Data.Folder();
     _Folders.Add(f);
     Tree.BeginUpdate();
     Tree.Nodes.Add(GetNode(f));
     Tree.Sort();
     Tree.EndUpdate();
     var dlg = new PhillipKuhrt.VoTra.Forms.Editor.FolderSettingsDialog(f, _FolderIcons);
     dlg.ShowDialog();
     UpdateNode(Tree.SelectedNode);
 }
Example #2
0
 private void ContextMenu_New_Click(object sender, EventArgs e)
 {
     if (Tree.SelectedNode == null)
     {
         var f = new Data.Folder();
         _Folders.Add(f);
         var dlg = new PhillipKuhrt.VoTra.Forms.Editor.FolderSettingsDialog(f, _FolderIcons);
         dlg.ShowDialog();
         Tree.BeginUpdate();
         Tree.Nodes.Add(GetNode(f));
         Tree.Sort();
         Tree.EndUpdate();
     }
     else
     {
         var f1 = Tree.SelectedNode.Tag as Data.Folder;
         var f2 = new Data.Folder();
         f2.Parent = f1;
         var dlg = new PhillipKuhrt.VoTra.Forms.Editor.FolderSettingsDialog(f2, _FolderIcons);
         dlg.ShowDialog();
         Tree.BeginUpdate();
         Tree.SelectedNode.Nodes.Add(GetNode(f2));
         Tree.Sort();
         Tree.EndUpdate();
     }
 }
Example #3
0
 private void ContextMenu_Edit_Click(object sender, EventArgs e)
 {
     if (Tree.SelectedNode != null)
     {
         var f1 = Tree.SelectedNode.Tag as Data.Folder;
         var dlg = new PhillipKuhrt.VoTra.Forms.Editor.FolderSettingsDialog(f1, _FolderIcons);
         dlg.ShowDialog();
         UpdateNode(Tree.SelectedNode);
     }
 }