/// <summary> /// Creates tray icon and starts listening for input. /// </summary> /// <param name="e"></param> protected override void OnStartup(StartupEventArgs e) { // Exit application if already running. if (!mutex.WaitOne(TimeSpan.Zero, true)) { Current.Shutdown(); } base.OnStartup(e); Plex.Init(); notifyIcon = (TaskbarIcon)FindResource("NotifyIcon"); notifyIcon.TrayBalloonTipClicked += TrayBalloonTipClicked; Pushbullet.Communicator.Init(); Pushbullet.Communicator.PushRecieved += ShowBalloon; }
/// <summary> /// New settings, reinitializes. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SettingSaving(object sender, CancelEventArgs e) { Plex.Init(); }
private void TrayBalloonTipClicked(object sender, RoutedEventArgs e) { Plex.OpenPlexMedia(name); }