show setup dialog on new startup location
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
in order to support AviSynth portable mode.
|
||||
- New option global-media-keys (next, previous, play/pause, stop).
|
||||
- Improved setup dialog.
|
||||
- Whenever there is a new startup location, the setup dialog is shown.
|
||||
- libmpv updated to shinshiro 2020-11-22.
|
||||
|
||||
|
||||
|
||||
@@ -192,5 +192,25 @@ namespace mpvnet
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ShowSetup()
|
||||
{
|
||||
string path = RegistryHelp.GetString(RegistryHelp.ApplicationKey, "SetupDialog");
|
||||
|
||||
if (path != Folder.Startup)
|
||||
{
|
||||
if (Msg.ShowQuestion("Would you like to setup mpv.net for the current startup location?",
|
||||
"Current startup location:\n\n" + Folder.Startup + "\n\n" +
|
||||
"The setup allows to create a start menu shortcut, file associations and " +
|
||||
"add mpv.net to the Path environment variable.\n\n" +
|
||||
"Show setup dialog?") == MsgResult.OK)
|
||||
|
||||
Commands.Execute("show-setup-dialog");
|
||||
else
|
||||
Msg.Show("The setup dialog can be found in the context menu at:\n\nTools > Setup");
|
||||
|
||||
RegistryHelp.SetValue(RegistryHelp.ApplicationKey, "SetupDialog", Folder.Startup);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace mpvnet
|
||||
{
|
||||
public class Commands
|
||||
{
|
||||
public static void Execute(string id, string[] args)
|
||||
public static void Execute(string id, string[] args = null)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
|
||||
@@ -814,6 +814,7 @@ namespace mpvnet
|
||||
core.LoadScripts();
|
||||
Task.Run(() => App.Extension = new Extension());
|
||||
ShownTickCount = Environment.TickCount;
|
||||
App.ShowSetup();
|
||||
}
|
||||
|
||||
protected override void OnActivated(EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user