a issue with the taskbar-progress feature was fixed

This commit is contained in:
Frank Skare
2019-09-06 04:32:39 +02:00
parent 0a28f13d51
commit c2c33228a0
3 changed files with 16 additions and 7 deletions

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.0.0")]
[assembly: AssemblyFileVersion("5.4.0.0")]
[assembly: AssemblyVersion("5.4.1.0")]
[assembly: AssemblyFileVersion("5.4.1.0")]

View File

@@ -387,9 +387,10 @@ namespace mpvnet
else
Text = "mpv.net " + Application.ProductVersion;
ProgressTimer.Interval = (int)(mp.Duration.TotalMilliseconds / 99);
if (ProgressTimer.Interval < 100) ProgressTimer.Interval = 100;
if (ProgressTimer.Interval > 999) ProgressTimer.Interval = 999;
int interval = (int)(mp.Duration.TotalMilliseconds / 100);
if (interval < 100) interval = 100;
if (interval > 1000) interval = 1000;
ProgressTimer.Interval = interval;
UpdateProgressBar();
}));
@@ -486,7 +487,7 @@ namespace mpvnet
return;
}
if (m.Msg == TaskbarButtonCreatedMessage)
if (m.Msg == TaskbarButtonCreatedMessage && mp.TaskbarProgress)
{
Taskbar = new Taskbar(Handle);
ProgressTimer.Start();
@@ -543,7 +544,7 @@ namespace mpvnet
void PropChangePause(bool enabled)
{
if (Taskbar != null)
if (Taskbar != null && mp.TaskbarProgress)
{
if (enabled)
Taskbar.SetState(TaskbarStates.Paused);