Skip to content

Commit

Permalink
Now when you have Elpis minimized and you press a hotkey like like, d…
Browse files Browse the repository at this point in the history
…islike, pause/play or next, a balloontooltip appears on system tray saying what you have done.
  • Loading branch information
seliver committed Apr 6, 2015
1 parent 73e190e commit 29fccdd
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 11 deletions.
50 changes: 50 additions & 0 deletions Elpis/MainWindow.xaml.cs
Expand Up @@ -1419,12 +1419,40 @@ public void LoadStation(string station)

public void PlayPauseToggled(object sender, ExecutedRoutedEventArgs e)
{
if (_config.Fields.Elpis_ShowTrayNotifications)
{
if (WindowState == System.Windows.WindowState.Minimized)
{
//this is inverse because of being applied before action is taken
if (!_player.Paused)
{
_notify.BalloonTipTitle = "Paused";
_notify.BalloonTipText = " ";
}
else
{
string tipText = _player.CurrentSong.SongTitle;
_notify.BalloonTipTitle = "Playing: " + tipText;
_notify.BalloonTipText = " by " + _player.CurrentSong.Artist;
}
_notify.ShowBalloonTip(3000);
}
}
_player.PlayPause();
}

public void SkipTrack(object sender, ExecutedRoutedEventArgs e)
{
_player.Next();
if (_config.Fields.Elpis_ShowTrayNotifications)
{
if (WindowState == System.Windows.WindowState.Minimized)
{
_notify.BalloonTipTitle = "Song Skipped";
_notify.BalloonTipText = " ";
_notify.ShowBalloonTip(3000);
}
}
}

private void CanExecutePlayPauseSkip(object sender, CanExecuteRoutedEventArgs e)
Expand All @@ -1448,13 +1476,35 @@ private void CanExecutePlayPauseSkip(object sender, CanExecuteRoutedEventArgs e)

public void ExecuteThumbsUp(object sender, ExecutedRoutedEventArgs e)
{
if (_config.Fields.Elpis_ShowTrayNotifications)
{
if (WindowState == System.Windows.WindowState.Minimized)
{
//this is inverse because of being applied before action is taken
if (!GetCurrentSong().Loved)
_notify.BalloonTipTitle = "Song Liked";
else
_notify.BalloonTipTitle = "Song Unliked";
_notify.BalloonTipText = " ";
_notify.ShowBalloonTip(3000);
}
}
_playlistPage.ThumbUpCurrent();
}


public void ExecuteThumbsDown(object sender, ExecutedRoutedEventArgs e)
{
_playlistPage.ThumbDownCurrent();
if (_config.Fields.Elpis_ShowTrayNotifications)
{
if (WindowState == System.Windows.WindowState.Minimized)
{
_notify.BalloonTipTitle = "Song Disliked";
_notify.BalloonTipText = " ";
_notify.ShowBalloonTip(3000);
}
}
}

private void CanExecuteThumbsUpDown(object sender, CanExecuteRoutedEventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion Elpis/Properties/AssemblyInfo.cs
Expand Up @@ -52,5 +52,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.4.7")]
[assembly: AssemblyVersion("1.4.9")]
//[assembly: AssemblyFileVersion("0.0.0.0")]
20 changes: 10 additions & 10 deletions ElpisSetup/ElpisSetup.vdproj
Expand Up @@ -435,7 +435,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Lpfm.LastFmScrobbler, Version=1.1.5539.36442, Culture=neutral, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:Lpfm.LastFmScrobbler, Version=1.1.5549.34319, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_010E6E01E6F5B6AADC295523D4ECA4D6"
Expand Down Expand Up @@ -466,7 +466,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:PlayerControlQuery, Version=1.4.5539.36443, Culture=neutral, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:PlayerControlQuery, Version=1.4.5553.28960, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_28035C075265B0593085A2866E700674"
Expand Down Expand Up @@ -497,7 +497,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:BassPlayer, Version=1.1.5539.36443, Culture=neutral, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:BassPlayer, Version=1.1.5553.28117, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_400B827A0F0AD2219A9A7D5665DAECB3"
Expand Down Expand Up @@ -579,7 +579,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:PandoraSharpPlayer, Version=1.1.5539.36443, Culture=neutral, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:PandoraSharpPlayer, Version=1.1.5553.28961, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_7AB720A5D8D651D9FB48BF4B06BEE4AD"
Expand Down Expand Up @@ -670,7 +670,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:PandoraSharpScrobbler, Version=1.4.5539.36443, Culture=neutral, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:PandoraSharpScrobbler, Version=1.4.5553.28960, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_ABD5A4E57FD842C5AFA8FFBF5B55064E"
Expand Down Expand Up @@ -763,7 +763,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Util, Version=1.1.5539.36442, Culture=neutral, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:Util, Version=1.1.5549.34319, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_C3FC75DE0D4394CCCC02FDC3089DF8C0"
Expand Down Expand Up @@ -865,7 +865,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:PandoraSharp, Version=1.1.5539.36443, Culture=neutral, processorArchitecture=x86"
"AssemblyAsmDisplayName" = "8:PandoraSharp, Version=1.1.5553.28960, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_E91B36C8829F1D3F85101A8682DD0A4E"
Expand Down Expand Up @@ -959,15 +959,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Elpis"
"ProductCode" = "8:{B2182CB3-6C6C-406D-8FB6-6DF70F46CAA4}"
"PackageCode" = "8:{FF1569DA-4EC6-4BDF-B26A-4ED4C19DE649}"
"ProductCode" = "8:{0AE24B53-7880-43B6-B315-1FCA6B71400F}"
"PackageCode" = "8:{A9F969AC-FCB5-4B87-AA6F-B60F28F1322E}"
"UpgradeCode" = "8:{F0962B86-5C6F-4A2C-98F4-2FF9D0AC46AD}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.4.7"
"ProductVersion" = "8:1.4.9"
"Manufacturer" = "8:Adam Haile, Alexey Seliverstov"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:https://github.com/adammhaile/Elpis/"
Expand Down

0 comments on commit 29fccdd

Please sign in to comment.