mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-18 03:12:18 +12:00
Add description for OneClick registry keys
Adds a description to protocol handler registry keys when setting up OneClick install.
This commit is contained in:
parent
3b9dc222d0
commit
140dde19fd
|
@ -168,12 +168,12 @@ namespace ModAssistant
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OneClickInstaller.Register(args[1], true);
|
OneClickInstaller.Register(args[1], true, args[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Update = false;
|
Update = false;
|
||||||
GUI = false;
|
GUI = false;
|
||||||
args = Shift(args, 2);
|
args = Shift(args, args.Length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "--unregister":
|
case "--unregister":
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace ModAssistant
|
||||||
await API.Playlists.DownloadAll(uri);
|
await API.Playlists.DownloadAll(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Register(string Protocol, bool Background = false)
|
public static void Register(string Protocol, bool Background = false, string Description = null)
|
||||||
{
|
{
|
||||||
if (IsRegistered(Protocol) == true)
|
if (IsRegistered(Protocol) == true)
|
||||||
return;
|
return;
|
||||||
|
@ -75,6 +75,10 @@ namespace ModAssistant
|
||||||
|
|
||||||
if (ProtocolKey.GetValue("OneClick-Provider", "").ToString() != "ModAssistant")
|
if (ProtocolKey.GetValue("OneClick-Provider", "").ToString() != "ModAssistant")
|
||||||
{
|
{
|
||||||
|
if (Description != null)
|
||||||
|
{
|
||||||
|
ProtocolKey.SetValue("", Description, RegistryValueKind.String);
|
||||||
|
}
|
||||||
ProtocolKey.SetValue("URL Protocol", "", RegistryValueKind.String);
|
ProtocolKey.SetValue("URL Protocol", "", RegistryValueKind.String);
|
||||||
ProtocolKey.SetValue("OneClick-Provider", "ModAssistant", RegistryValueKind.String);
|
ProtocolKey.SetValue("OneClick-Provider", "ModAssistant", RegistryValueKind.String);
|
||||||
CommandKey.SetValue("", $"\"{Utils.ExePath}\" \"--install\" \"%1\"");
|
CommandKey.SetValue("", $"\"{Utils.ExePath}\" \"--install\" \"%1\"");
|
||||||
|
@ -84,7 +88,7 @@ namespace ModAssistant
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Utils.StartAsAdmin($"\"--register\" \"{Protocol}\"");
|
Utils.StartAsAdmin($"\"--register\" \"{Protocol}\" \"{Description}\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace ModAssistant.Pages
|
||||||
|
|
||||||
public void ModelSaberProtocolHandler_Checked(object sender, RoutedEventArgs e)
|
public void ModelSaberProtocolHandler_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OneClickInstaller.Register("modelsaber");
|
OneClickInstaller.Register("modelsaber", Description: "URL:ModelSaber OneClick Install");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ModelSaberProtocolHandler_Unchecked(object sender, RoutedEventArgs e)
|
public void ModelSaberProtocolHandler_Unchecked(object sender, RoutedEventArgs e)
|
||||||
|
@ -147,7 +147,7 @@ namespace ModAssistant.Pages
|
||||||
|
|
||||||
public void BeatSaverProtocolHandler_Checked(object sender, RoutedEventArgs e)
|
public void BeatSaverProtocolHandler_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OneClickInstaller.Register("beatsaver");
|
OneClickInstaller.Register("beatsaver", Description: "URL:BeatSaver OneClick Install");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BeatSaverProtocolHandler_Unchecked(object sender, RoutedEventArgs e)
|
public void BeatSaverProtocolHandler_Unchecked(object sender, RoutedEventArgs e)
|
||||||
|
@ -156,7 +156,7 @@ namespace ModAssistant.Pages
|
||||||
}
|
}
|
||||||
public void PlaylistsProtocolHandler_Checked(object sender, RoutedEventArgs e)
|
public void PlaylistsProtocolHandler_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OneClickInstaller.Register("bsplaylist");
|
OneClickInstaller.Register("bsplaylist", Description: "URL:BeatSaver Playlist OneClick Install");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlaylistsProtocolHandler_Unchecked(object sender, RoutedEventArgs e)
|
public void PlaylistsProtocolHandler_Unchecked(object sender, RoutedEventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue