Example #1
0
        //TreeViewItem GeTile(LibraryComponent lc)
        //{

        //	TreeViewItem tv = new TreeViewItem();
        //				   tv.items
        //	nTile.Width = 95;
        //	nTile.Height = 95;

        //	Grid gd = new Grid();
        //	gd.Height = 85;
        //	gd.Width = 95;
        //	if (lc.Type == ComponentType.Static)
        //	{
        //		TextBlock ic = new TextBlock();
        //		ic.Text = lc.Icon;
        //		ic.TextAlignment = TextAlignment.Center;
        //		ic.VerticalAlignment = VerticalAlignment.Top;
        //		ic.HorizontalAlignment = HorizontalAlignment.Center;
        //		ic.Margin = new Thickness(0, 10, 0, 0);
        //		ic.FontSize = 40;
        //		ic.FontFamily = App.Current.MainWindow.FontFamily;
        //		gd.Children.Add(ic);
        //	}
        //	else
        //	{
        //		ProgressRing pg = new ProgressRing();
        //		pg.Width = 35;
        //		pg.Height = 35;
        //		pg.VerticalAlignment = VerticalAlignment.Top;
        //		pg.HorizontalAlignment = HorizontalAlignment.Center;
        //		pg.IsActive = true;
        //		pg.Margin = new Thickness(0, 10, 0, 10);
        //		gd.Children.Add(pg);
        //	}

        //	TextBlock ic2 = new TextBlock();
        //	ic2.Text = lc.Caption;
        //	ic2.TextAlignment = TextAlignment.Center;
        //	ic2.VerticalAlignment = VerticalAlignment.Bottom;
        //	ic2.HorizontalAlignment = HorizontalAlignment.Center;
        //	ic2.FontSize = 10;
        //	ic2.Margin = new Thickness(0, 10, 0, 10);
        //	gd.Children.Add(ic2);

        //	//nTile.SetResourceReference(BackgroundProperty, "GrayBrush8");
        //	nTile.Content.Children.Add( gd);
        //	 nTile.Background = null;
        //	nTile.Tag = lc;
        //	return nTile;
        //}

        public void ShowLibrary()
        {
            foreach (Control v in Container.Children)
            {
                v.FadeOut();
            }
            Tabs.FadeIn();
            Container.FadeOut();
        }
Example #2
0
 /// <summary>
 ///     Update the list if the tracks collection has changed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Tracks_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (Tabs.Visibility == Visibility.Hidden)
     {
         Tabs.FadeIn();
         grdDD.FadeOut();
     }
     //if (!Results.displayFreeze && EnumerationsContainer.LibraryUi == LibraryUiMode.Songs)
     Dispatcher.BeginInvoke(new Action(() => Scrolls(tracklist)));
 }
Example #3
0
        void plugTree_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var sel = plugTree.SelectedItem as TreeViewItem;

            if (sel != null)
            {
                var t = sel.Tag as LibraryComponent;
                t.ChildrenToggled(sel.Header.ToString());
                //library togs

                if (t.Caption == " My Library" && grdDD.Visibility == Visibility.Hidden)
                {
                    Tabs.FadeIn();
                    Container.FadeOut();
                    switch (sel.Header.ToString())
                    {
                    case " Songs":
                        EnumerationsContainer.LibraryUi = LibraryUiMode.Songs;
                        break;

                    case " Artists":
                        EnumerationsContainer.LibraryUi = LibraryUiMode.Artist;
                        break;

                    case " Albums":
                        EnumerationsContainer.LibraryUi = LibraryUiMode.Album;
                        break;

                    case " Genres":
                        EnumerationsContainer.LibraryUi = LibraryUiMode.Genre;
                        break;
                    }
                    RefreshUi();
                }
                else
                {
                    Tabs.FadeOut();
                    Container.FadeIn();
                    LibraryComponent lc = sel.Tag as LibraryComponent;

                    if (!lc.Initialized)
                    {
                        lc.Initialize();
                    }
                    if (!Container.Children.Contains(lc.ComponentUI))
                    {
                        if (lc.ComponentUI != null)
                        {
                            Container.Children.Add(lc.ComponentUI);
                        }
                    }
                    foreach (Control v in Container.Children)
                    {
                        if (v != lc.ComponentUI)
                        {
                            v.FadeOut();
                        }
                    }
                    lc.ComponentUI.FadeIn();
                }
            }
        }