public MainWindowViewModel()
        {
            LeftExplorerView  = new View.FileExplorer();
            RightExplorerView = new View.FileExplorer();

            LeftExplorer  = LeftExplorerView.DataContext as FileExplorerViewModel;
            RightExplorer = RightExplorerView.DataContext as FileExplorerViewModel;

            Icon = MahApps.Metro.IconPacks.PackIconModernKind.CabinetFiles.ToImageSource(System.Windows.Media.Brushes.DimGray);
        }
 /// Костыли
 public void SelectedItemInExplorer(FileExplorerViewModel Explorer)
 {
     if (Explorer == LeftExplorer)
     {
         RightExplorer.IsSelectedExplorer = false;
     }
     else if (Explorer == RightExplorer)
     {
         LeftExplorer.IsSelectedExplorer = false;
     }
 }
 public void DragExplorer(FileExplorerViewModel Explorer)
 {
     if (Explorer == LeftExplorer)
     {
         LeftExplorer.IsDragSource  = true;
         RightExplorer.IsDragSource = false;
     }
     else if (Explorer == RightExplorer)
     {
         RightExplorer.IsDragSource = true;
         LeftExplorer.IsDragSource  = false;
     }
 }
        public void DropFiles(FileExplorerViewModel Receiving, DragEventArgs e)
        {
            string[] files = null;

            if (e.Data.GetDataPresent(typeof(List <ListItem>)))
            {
                if (!Receiving.IsDragSource)
                {
                    files = (e.Data.GetData(typeof(List <ListItem>)) as List <ListItem>).
                            Where(i => (i.File.Attributes.HasFlag(FileAttributes.Directory) ? Directory.Exists(Path.Combine(Receiving.CurrentDirectory.FullName, i.File.Name))
                                                : File.Exists(Path.Combine(Receiving.CurrentDirectory.FullName, i.File.Name))) == false).
                            Select(i => i.File.FullName).ToArray();
                }
            }
            else if (e.Data.GetDataPresent("FileNameW"))
            {
                string[] filesInCurrentDirectory = Receiving.ExplorerItems.Select(i => i.File.FullName).ToArray();
                files = (e.Data.GetData("FileNameW") as string[]).Where(i => filesInCurrentDirectory.Contains(i) == false).ToArray();
            }

            if (files != null)
            {
                try
                {
                    foreach (var item in files)
                    {
                        Copyring(item, Receiving.CurrentDirectory.FullName);
                    }
                }
                catch (Exception ex)
                {
#if DEBUG
                    MessageBox.Show(ex.Message);
#endif
                }

                Receiving.RefreshExplorer();
            }
        }