Skip to content

Commit

Permalink
fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
JuHem committed Apr 23, 2022
1 parent 37cbb61 commit c9b82f5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions jxlgui.wpf/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ private void Border_DragOver(object sender, DragEventArgs e)
e.Effects = DragDropEffects.None;
var droppedFileName = e.Data.GetData(DataFormats.FileDrop) as string[];

if (droppedFileName != null && droppedFileName.Any()
&& droppedFileName.Select(f => Path.GetExtension(f))
.All(e => Constants.Extensions.Any(ee => ee == e)))
e.Effects = DragDropEffects.Copy | DragDropEffects.Move;
if (droppedFileName != null
&& droppedFileName.Any()
&& droppedFileName.Select(f => Path.GetExtension(f)).All(e => Constants.Extensions.Any(ee => ee.ToLower() == e.ToLower())))
{
e.Effects = DragDropEffects.Copy | DragDropEffects.Move;
}

e.Handled = true;
}
Expand Down

0 comments on commit c9b82f5

Please sign in to comment.