disable iTunesLib related code for now

This should be re-enabled later. I don't have this "iTunesLib" which I
assume is installed along with iTunes on Windows (which I also don't
have installed).
This commit is contained in:
gered 2012-05-29 11:13:48 -04:00
parent d365eb62e4
commit ca775eb919
2 changed files with 18 additions and 23 deletions

View file

@ -333,17 +333,6 @@
<ItemGroup>
<Resource Include="Gnome-Preferences-Desktop-Keyboard-Shortcuts.ico" />
</ItemGroup>
<ItemGroup>
<COMReference Include="iTunesLib">
<Guid>{9E93C96F-CF0D-43F6-8BA8-B807A3370712}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>13</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -3,38 +3,44 @@
using System.Linq;
using System.Text;
using System.Diagnostics;
using iTunesLib;
//using iTunesLib;
using System.Windows;
namespace AppleWirelessKeyboard
{
// TODO: get this "iTunesLib" (probably by installing iTunes?) and uncomment this code
public static class iTunesControl
{
public static bool iTunesRunning
{
get
{
var processes = Process.GetProcesses();
return Process.GetProcessesByName("iTunes").Any();
//var processes = Process.GetProcesses();
//return Process.GetProcessesByName("iTunes").Any();
// might as well just do this for now, since the iTunes functionality below
// has been commented out
return false;
}
}
public static void NextSong()
{
iTunesApp app = new iTunesApp();
app.NextTrack();
app = null;
//iTunesApp app = new iTunesApp();
//app.NextTrack();
//app = null;
}
public static void PreviousSong()
{
iTunesApp app = new iTunesApp();
app.PreviousTrack();
app = null;
//iTunesApp app = new iTunesApp();
//app.PreviousTrack();
//app = null;
}
public static void PlayPause()
{
iTunesApp app = new iTunesApp();
app.PlayPause();
app = null;
//iTunesApp app = new iTunesApp();
//app.PlayPause();
//app = null;
}
}
}