예제 #1
0
 public DirectoryTree()
 {
     //vm = new FileSystemViewModel(@"C:\Program Files (x86)\GOG.com\Freespace 2");
     vm          = new FileSystemViewModel();
     DataContext = vm;
     //InitializeComponent();
 }
예제 #2
0
 public DirectoryTree()
 {
     //vm = new FileSystemViewModel(@"C:\Program Files (x86)\GOG.com\Freespace 2");
     vm = new FileSystemViewModel();
     DataContext = vm;
     //InitializeComponent();
 }
예제 #3
0
        private void TextBlock_MouseMove(object sender, MouseEventArgs e)
        {
            FileSystemViewModel model = (sender as TextBlock).DataContext as FileSystemViewModel;
            string datString;

            /*if (vm.RootFileName == block)
             * {
             *  datString = vm.RootName;
             * }
             * else
             * {
             *  IEnumerable<string> data =
             *      (from FileSystemViewModel v in vm.children where v.RootFileName == block select v.RootName);
             *  datString = data.ElementAt(0);
             * }*/
            datString = model.RootName;
            if (e.LeftButton == MouseButtonState.Pressed)
            {
                DragDrop.DoDragDrop(sender as TextBlock, datString, DragDropEffects.Link | DragDropEffects.Copy);
            }
        }