Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .vs/CSharp/v17/.suo
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .vs/MB_TaskbarTidbit/v17/.suo
Binary file not shown.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\CSharp.sln",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
9 changes: 7 additions & 2 deletions CSharpDll.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MusicBeePlugin</RootNamespace>
<AssemblyName>mb_TaskbarTidbit</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
Expand All @@ -31,6 +31,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -40,6 +41,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand All @@ -49,6 +51,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -59,6 +62,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
Expand All @@ -69,6 +73,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
Expand Down
16 changes: 15 additions & 1 deletion TaskbarTidbit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,27 @@ public void ReceiveNotification(string sourceFileUrl, NotificationType type)
string artist = mbApiInterface.NowPlaying_GetFileTag(MetaDataType.Artist);

break;
case NotificationType.PlayStateChanged:
switch (mbApiInterface.Player_GetPlayState())
{
case PlayState.Playing:
TaskbarProgress.SetState(mbApiInterface.MB_GetWindowHandle(), TaskbarProgress.TaskbarStates.Normal);
break;
case PlayState.Paused:
TaskbarProgress.SetState(mbApiInterface.MB_GetWindowHandle(), TaskbarProgress.TaskbarStates.Paused);
break;
default:
TaskbarProgress.SetState(mbApiInterface.MB_GetWindowHandle(), TaskbarProgress.TaskbarStates.NoProgress);
break;
}
break;

}
}

private void initTimer()
{
timer = new System.Timers.Timer();
timer = new System.Timers.Timer();
timer.Interval = 100;
timer.Elapsed += new ElapsedEventHandler(onTime);
timer.Enabled = true;
Expand Down
Binary file added bin/Debug/mb_TaskbarTidbit.dll
Binary file not shown.
Binary file added bin/Debug/mb_TaskbarTidbit.pdb
Binary file not shown.
4 changes: 4 additions & 0 deletions obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
1 change: 1 addition & 0 deletions obj/Debug/CSharpDll.csproj.CoreCompileInputs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d573226f1cc63073ee50f46d76f67ec654e30f0e
6 changes: 6 additions & 0 deletions obj/Debug/CSharpDll.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
C:\Users\Leo\source\repos\MB_TaskbarTidbit\bin\Debug\mb_TaskbarTidbit.dll
C:\Users\Leo\source\repos\MB_TaskbarTidbit\bin\Debug\mb_TaskbarTidbit.pdb
C:\Users\Leo\source\repos\MB_TaskbarTidbit\obj\Debug\CSharpDll.csproj.AssemblyReference.cache
C:\Users\Leo\source\repos\MB_TaskbarTidbit\obj\Debug\CSharpDll.csproj.CoreCompileInputs.cache
C:\Users\Leo\source\repos\MB_TaskbarTidbit\obj\Debug\mb_TaskbarTidbit.dll
C:\Users\Leo\source\repos\MB_TaskbarTidbit\obj\Debug\mb_TaskbarTidbit.pdb
Binary file not shown.
1 change: 1 addition & 0 deletions obj/Debug/_IsIncrementalBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj\Debug\\_IsIncrementalBuild
Binary file added obj/Debug/mb_TaskbarTidbit.dll
Binary file not shown.
Binary file added obj/Debug/mb_TaskbarTidbit.pdb
Binary file not shown.
4 changes: 4 additions & 0 deletions obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.