25 lines
772 B
C#
25 lines
772 B
C#
using Cryville.Common;
|
|
using Cryville.Crtr.Browsing;
|
|
using Microsoft.Win32;
|
|
using System;
|
|
using System.IO;
|
|
|
|
namespace Cryville.Crtr.Extensions.Quaver {
|
|
public class QuaverChartFinder : LocalResourceFinder {
|
|
public override string Name { get { return "Quaver beatmaps"; } }
|
|
|
|
public override string GetRootPath() {
|
|
switch (Environment.OSVersion.Platform) {
|
|
case PlatformID.Win32NT:
|
|
var reg = Registry.ClassesRoot.OpenSubKey(@"quaver\Shell\Open\Command");
|
|
if (reg == null) return null;
|
|
var pathObj = reg.GetValue(null);
|
|
if (pathObj == null) return null;
|
|
var path = (string)pathObj;
|
|
return Path.Combine(new FileInfo(StringUtils.GetProcessPathFromCommand(path)).Directory.FullName, "Songs");
|
|
default: return null;
|
|
}
|
|
}
|
|
}
|
|
}
|