コード例 #1
0
        /// <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;
        }
コード例 #2
0
 /// <summary>
 /// New settings, reinitializes.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SettingSaving(object sender, CancelEventArgs e)
 {
     Plex.Init();
 }
コード例 #3
0
 private void TrayBalloonTipClicked(object sender, RoutedEventArgs e)
 {
     Plex.OpenPlexMedia(name);
 }