diff --git a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs index 11ff2c3a..0d75a493 100644 --- a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs +++ b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs @@ -2034,6 +2034,15 @@ namespace UniversalEditor.Engines.WindowsForms { e.Effect = DragDropEffects.Link; } + + if (e.Data.GetDataPresent("Preferred DropEffect")) + { + System.IO.MemoryStream ms = (e.Data.GetData("Preferred DropEffect") as System.IO.MemoryStream); + System.IO.BinaryReader br = new System.IO.BinaryReader(ms); + int value = br.ReadInt32(); + DragDropEffects effect = (DragDropEffects)value; + e.Effect = effect; + } } private void MainWindow_DragDrop(object sender, DragEventArgs e) @@ -2057,6 +2066,17 @@ namespace UniversalEditor.Engines.WindowsForms { string rtf = (e.Data.GetData("Text") as string); } + else if (e.Data.GetDataPresent("FileDrop")) + { + object data = e.Data.GetData("FileDrop"); + string[] filenames = (e.Data.GetData("FileDrop") as string[]); + Document[] documents = new Document[filenames.Length]; + for (int i = 0; i < documents.Length; i++) + { + documents[i] = new Document(null, null, new FileAccessor(filenames[i])); + } + OpenFile(documents); + } else if (e.Data.GetDataPresent("FileNameW")) { string[] filenames = (e.Data.GetData("FileNameW") as string[]);