Exemplo n.º 1
0
 public void OnDropOuterFile(string[] files)
 {
     foreach (var file in files)
     {
         FileAttributes attr = 0;
         try
         {
             attr = File.GetAttributes(file);
         }
         catch (FileNotFoundException)
         {
             MessageBox.Show("Sorry, coulnd't drop file. It might not exist");
             return;
         }
         IData component;
         if (attr.HasFlag(FileAttributes.Directory))
         {
             component = new RelatedFolder(file);
         }
         else
         {
             component = new RelatedFile(file);
         }
         component.Move(CurrentPath);
         ShowFolderContent(CurrentPath);
     }
 }
Exemplo n.º 2
0
 public void OnDropOuterFile(string[] files)
 {
     foreach (var file in files)
     {
         FileAttributes attr = File.GetAttributes(file);
         IData          component;
         if (attr.HasFlag(FileAttributes.Directory))
         {
             component = new RelatedFolder(file);
         }
         else
         {
             component = new RelatedFile(file);
         }
         (component).Move(_currentPath);
         ShowFolderContent(_currentPath);
     }
 }