General improvements

This commit is contained in:
Alex Amadori
2017-03-13 11:29:24 +01:00
parent 971d8eb7c5
commit caa6e9c82b
7 changed files with 10 additions and 7 deletions

View File

@ -12,6 +12,7 @@ using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using osu.Game.Screens.Menu;
using osu.Game.Beatmaps.IO;
namespace osu.Desktop
{
@ -57,7 +58,7 @@ namespace osu.Desktop
var dropData = (object[])e.Data.GetData(DataFormats.FileDrop);
var filePaths = dropData.Select(f => f.ToString()).ToArray();
if (filePaths.All(f => Path.GetExtension(f) == @".osz"))
if (filePaths.All(f => Path.GetExtension(f) == BeatmapArchiveReader.OszExtension))
Task.Run(() => BeatmapDatabase.Import(filePaths));
else if (filePaths.All(f => Path.GetExtension(f) == @".osr"))
Task.Run(() =>
@ -67,7 +68,7 @@ namespace osu.Desktop
});
}
private static readonly string[] allowed_extensions = { @".osz", @".osr" };
private static readonly string[] allowed_extensions = { BeatmapArchiveReader.OszExtension, @".osr" };
private void dragEnter(DragEventArgs e)
{