mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-04-30 18:43:08 +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
|
||||
{
|
||||
OneClickInstaller.Register(args[1], true);
|
||||
OneClickInstaller.Register(args[1], true, args[2]);
|
||||
}
|
||||
|
||||
Update = false;
|
||||
GUI = false;
|
||||
args = Shift(args, 2);
|
||||
args = Shift(args, args.Length);
|
||||
break;
|
||||
|
||||
case "--unregister":
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace ModAssistant
|
|||
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)
|
||||
return;
|
||||
|
@ -75,6 +75,10 @@ namespace ModAssistant
|
|||
|
||||
if (ProtocolKey.GetValue("OneClick-Provider", "").ToString() != "ModAssistant")
|
||||
{
|
||||
if (Description != null)
|
||||
{
|
||||
ProtocolKey.SetValue("", Description, RegistryValueKind.String);
|
||||
}
|
||||
ProtocolKey.SetValue("URL Protocol", "", RegistryValueKind.String);
|
||||
ProtocolKey.SetValue("OneClick-Provider", "ModAssistant", RegistryValueKind.String);
|
||||
CommandKey.SetValue("", $"\"{Utils.ExePath}\" \"--install\" \"%1\"");
|
||||
|
@ -84,7 +88,7 @@ namespace ModAssistant
|
|||
}
|
||||
else
|
||||
{
|
||||
Utils.StartAsAdmin($"\"--register\" \"{Protocol}\"");
|
||||
Utils.StartAsAdmin($"\"--register\" \"{Protocol}\" \"{Description}\"");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -137,7 +137,7 @@ namespace ModAssistant.Pages
|
|||
|
||||
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)
|
||||
|
@ -147,7 +147,7 @@ namespace ModAssistant.Pages
|
|||
|
||||
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)
|
||||
|
@ -156,7 +156,7 @@ namespace ModAssistant.Pages
|
|||
}
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue