/Application/GUI/Controls/NowPlaying.xaml.cs
http://yet-another-music-application.googlecode.com/ · C# · 93 lines · 50 code · 11 blank · 32 comment · 2 complexity · 6aced851b3f3e28f53f5c6bde926aec6 MD5 · raw file
- /**
- * NowPlaying.xaml.cs
- *
- * The "Now Playing" screen.
- *
- * * * * * * * * *
- *
- * This code is part of the Stoffi Music Player Project.
- * Visit our website at: stoffiplayer.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 3 of the License, or (at your option) any later version.
- *
- * See stoffiplayer.com/license for more information.
- **/
-
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using System.Windows.Threading;
-
- namespace Stoffi
- {
- /// <summary>
- /// Interaction logic for NowPlaying.xaml
- /// </summary>
- public partial class NowPlaying : UserControl
- {
- #region Constructor
-
- /// <summary>
- ///
- /// </summary>
- public NowPlaying()
- {
- U.L(LogLevel.Debug, "NOW PLAYING", "Initialize");
- InitializeComponent();
-
- MediaManager.NavigateBrowser += new NavigateBrowserDelegate(MediaManager_NavigateBrowser);
- if (SettingsManager.CurrentTrack != null)
- {
- InfoPaneArtist.Text = SettingsManager.CurrentTrack.Artist;
- InfoPaneTitle.Text = SettingsManager.CurrentTrack.Title;
- }
- U.L(LogLevel.Debug, "NOW PLAYING", "Initialized");
- }
-
- #endregion
-
- #region Methods
-
- #region Event handlers
-
- /// <summary>
- /// Invoked when the user clicks on the YouTube video
- /// </summary>
- /// <param name="sender">The sender of the event</param>
- /// <param name="e">The event data</param>
- private void Browser_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- Console.WriteLine("Left");
- }
-
- /// <summary>
- /// Invoked when the browser needs to navigate.
- /// </summary>
- /// <param name="source">The URI to navigate to</param>
- private void MediaManager_NavigateBrowser(Uri source)
- {
- Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate()
- {
- Browser.Source = source;
- }));
- }
-
- #endregion
-
- #endregion
- }
- }