support added to force single instance

This commit is contained in:
Frank Skare
2019-06-16 10:00:14 +02:00
parent 1bf8e568c5
commit 63ee598ebd
9 changed files with 122 additions and 36 deletions

View File

@@ -531,15 +531,15 @@ namespace mpvnet
foreach (string i in args)
{
if (!i.StartsWith("--") && File.Exists(i) || i == "-" || i.StartsWith("http"))
if (!i.StartsWith("--") && (File.Exists(i) || i == "-" || i.StartsWith("http")))
{
files.Add(i);
if (i.StartsWith("http"))
RegistryHelp.SetObject("HKCU\\Software\\" + Application.ProductName, "LastURL", i);
RegistryHelp.SetObject(App.RegPath, "LastURL", i);
}
}
mp.LoadFiles(files.ToArray());
mp.Load(files.ToArray());
foreach (string i in args)
{
@@ -557,7 +557,7 @@ namespace mpvnet
}
}
public static void LoadFiles(params string[] files)
public static void Load(params string[] files)
{
if (files is null || files.Length == 0) return;
HideLogo();