public void DoDrop(string[] fileNames) { List <string> imageFiles = PhotoUploadWizard.FindImageFiles(fileNames); if (imageFiles.Count != 0) { if (ServiceProvider.ViewManager.EndDialog(ServiceProvider.ViewManager.Dialog)) { // This is a bit hacky. Don't clear the selected album on drop // if a dialog (e.g. an existing upload wizard) is up. // This will leave it if the embedded browser or settings dialog is up, // but whatever. _photoUploadWizard.SetDefaultAlbum(null); } _photoUploadWizard.Show(imageFiles); } }
protected override void OnDrop(DragEventArgs e) { base.OnDrop(e); if (!DragContainer.IsInDrag) { string[] fileNames = e.Data.GetData(DataFormats.FileDrop) as string[]; List <string> imageFiles = PhotoUploadWizard.FindImageFiles(fileNames); if (imageFiles.Count != 0) { PhotoUploadWizard.Show(imageFiles); } #if !USE_STANDARD_DRAGDROP DropTargetHelper.Drop(e.Data, e.GetPosition(this), DragDropEffects.Copy); #endif } }