Exemplo n.º 1
0
 public QueryRenameForm(PlaylistEntry ent)
 {
     this.entry = ent;
     InitializeComponent();
     this.textBox1.Text = ent.Name;
     this.textBox1.Select();
     this.textBox1.SelectAll();
 }
Exemplo n.º 2
0
 private void treeView1_DragDrop(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(typeof(TreeNode)))
     {
         TreeNode target = GetNodeAt(PointToClient(new Point(e.X, e.Y)));
         if (target != null && target.Tag != null && target.Tag is PlaylistEntryDirectory)
         {
             PlaylistEntryDirectory ped = (PlaylistEntryDirectory)target.Tag;
             var           tomove       = (TreeNode)e.Data.GetData(typeof(TreeNode));
             PlaylistEntry src_pe       = (PlaylistEntry)tomove.Tag;
             if (target == tomove)
             {
                 return;
             }
             if (tomove.Parent == target)
             {
                 return;
             }
             System.IO.Directory.Move(src_pe.Path, ped.Path + System.IO.Path.DirectorySeparatorChar + System.IO.Path.GetFileName(src_pe.Path));
             reloadDynamicPlaylist();
         }
     }
 }