Ejemplo n.º 1
0
 /// <summary>
 /// Adds a bookmark indicator.
 /// </summary>
 /// <param name="pos">The position where to add the bookmark</param>
 public void AddBookmark(double pos)
 {
     while (bookmarkLayer == null)
     {
         ;
     }
     bookmarkLayer.AddBookmark(pos);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Invoked when the control is loded
        /// </summary>
        /// <param name="sender">The sender of the event</param>
        /// <param name="e">The event data</param>
        private void Control_Loaded(object sender, RoutedEventArgs e)
        {
            bookmarkLayer = new BookmarkLayer(SongProgress);
            bookmarkLayer.RemoveClicked += new EventHandler(RemoveBookmark_Click);
            bookmarkLayer.Clicked       += new BookmarkEventHandler(Bookmark_Clicked);
            AdornerLayer al = AdornerLayer.GetAdornerLayer(SongProgress);

            al.Add(bookmarkLayer);

            if (SettingsManager.CurrentTrack != null)
            {
                foreach (double b in MediaManager.GetLibrarySourceTrack(SettingsManager.CurrentTrack).Bookmarks)
                {
                    bookmarkLayer.AddBookmark(b);
                }
            }

            if (System.Windows.Forms.VisualStyles.VisualStyleInformation.DisplayName == "")
            {
                InfoWindow.BorderThickness = new Thickness(1, 1, 0, 0);
                InfoWindow.BorderBrush     = SystemColors.ControlDarkBrush;
                InfoWindow.CornerRadius    = new CornerRadius(0);

                InfoWindowBorder1.BorderThickness = new Thickness(0, 0, 1, 1);
                InfoWindowBorder1.BorderBrush     = SystemColors.ControlLightLightBrush;
                InfoWindowBorder1.CornerRadius    = new CornerRadius(0);

                InfoWindowBorder2.BorderThickness = new Thickness(1, 1, 0, 0);
                InfoWindowBorder2.BorderBrush     = null;
                InfoWindowBorder2.CornerRadius    = new CornerRadius(0);

                InfoWindowBorder3.BorderThickness = new Thickness(0, 0, 1, 1);
                InfoWindowBorder3.BorderBrush     = null;
                InfoWindowBorder3.CornerRadius    = new CornerRadius(0);

                InfoWindowInner.Background = SystemColors.ControlBrush;

                InfoTimeMinus.Foreground = SystemColors.ControlTextBrush;
                InfoTimePlus.Foreground  = SystemColors.ControlTextBrush;
                InfoName.Foreground      = SystemColors.ControlTextBrush;
            }

            UpdateInfo();
            UpdateShuffle();
            UpdateRepeat();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Invoked when the control is loded
        /// </summary>
        /// <param name="sender">The sender of the event</param>
        /// <param name="e">The event data</param>
        private void Playback_Loaded(object sender, RoutedEventArgs e)
        {
            bookmarkLayer = new BookmarkLayer(SongProgress);
            bookmarkLayer.RemoveClicked += new EventHandler(RemoveBookmark_Click);
            bookmarkLayer.Clicked += new BookmarkEventHandler(Bookmark_Clicked);
            AdornerLayer al = AdornerLayer.GetAdornerLayer(SongProgress);
            al.Add(bookmarkLayer);

            if (SettingsManager.CurrentTrack != null)
            {
                foreach (double b in MediaManager.GetLibrarySourceTrack(SettingsManager.CurrentTrack).Bookmarks)
                {
                    bookmarkLayer.AddBookmark(b);
                }
            }

            if (System.Windows.Forms.VisualStyles.VisualStyleInformation.DisplayName == "")
            {
                InfoWindow.BorderThickness = new Thickness(1, 1, 0, 0);
                InfoWindow.BorderBrush = SystemColors.ControlDarkBrush;
                InfoWindow.CornerRadius = new CornerRadius(0);

                InfoWindowBorder1.BorderThickness = new Thickness(0, 0, 1, 1);
                InfoWindowBorder1.BorderBrush = SystemColors.ControlLightLightBrush;
                InfoWindowBorder1.CornerRadius = new CornerRadius(0);

                InfoWindowBorder2.BorderThickness = new Thickness(1, 1, 0, 0);
                InfoWindowBorder2.BorderBrush = null;
                InfoWindowBorder2.CornerRadius = new CornerRadius(0);

                InfoWindowBorder3.BorderThickness = new Thickness(0, 0, 1, 1);
                InfoWindowBorder3.BorderBrush = null;
                InfoWindowBorder3.CornerRadius = new CornerRadius(0);

                InfoWindowInner.Background = SystemColors.ControlBrush;

                InfoTimeMinus.Foreground = SystemColors.ControlTextBrush;
                InfoTimePlus.Foreground = SystemColors.ControlTextBrush;
                InfoName.Foreground = SystemColors.ControlTextBrush;
            }

            UpdateInfo();
            UpdateShuffle();
            UpdateRepeat();
        }