bug fix for logo not shown on start
This commit is contained in:
@@ -18,6 +18,8 @@ namespace mpvnet
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
if (mp.ConfigFolder == "") return;
|
||||
|
||||
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
|
||||
|
||||
if (args.Length == 2 && args[0] == "--reg-file-assoc")
|
||||
|
||||
@@ -359,7 +359,7 @@ public class TaskDialog<T> : TaskDialogNative, IDisposable
|
||||
public void AddCommandLink(string text, T value)
|
||||
{
|
||||
int n = 1000 + IdValueDic.Count + 1;
|
||||
IdValueDic[n] = value == null ? (T)(object)text : value;
|
||||
IdValueDic[n] = value;
|
||||
IdTextDic[n] = text;
|
||||
Buttons.Add(new TaskDialogNative.TASKDIALOG_BUTTON(n, text));
|
||||
Config.dwFlags |= TaskDialogNative.TASKDIALOG_FLAGS.TDF_USE_COMMAND_LINKS;
|
||||
|
||||
@@ -83,7 +83,6 @@ namespace mpvnet
|
||||
|
||||
if (mp.GPUAPI != "vulkan") mp.VideoSizeAutoResetEvent.WaitOne(App.StartThreshold);
|
||||
if (Height < FontHeight * 4) SetFormPosAndSize();
|
||||
if (mp.get_property_int("playlist-count") == 0) mp.ShowLogo();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -508,6 +507,12 @@ namespace mpvnet
|
||||
}));
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
if (mp.get_property_int("playlist-count") == 0) mp.ShowLogo();
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
|
||||
@@ -166,10 +166,15 @@ namespace mpvnet
|
||||
td.AddCommandLink(@"AppData\Roaming\mpv", appdataFolderMpv, appdataFolderMpv);
|
||||
td.AddCommandLink("<startup>\\portable_config", portableFolder, portableFolder);
|
||||
td.AddCommandLink("Choose custom folder", "custom");
|
||||
td.AllowCancel = false;
|
||||
_ConfigFolder = td.Show();
|
||||
}
|
||||
|
||||
if (_ConfigFolder == null)
|
||||
{
|
||||
_ConfigFolder = "";
|
||||
return "";
|
||||
}
|
||||
|
||||
if (_ConfigFolder == "custom")
|
||||
{
|
||||
using (var d = new WinForms.FolderBrowserDialog())
|
||||
|
||||
Reference in New Issue
Block a user