Beispiel #1
0
        public RootPage()
        {
            this.InitializeComponent();

            //InitializeADealsAds();

            App.Navigator = new Navigator(this, LayoutRoot);

            if (Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Mobile")
            {
                //(Application.Current.Resources["MusicusVideoColor"] as SolidColorBrush).Color = Colors.White;

                (Application.Current.Resources["MusicusLowColor"] as SolidColorBrush).Color = Colors.Transparent;
            }
            ColorPicker _colorPicker = new ColorPicker();

            try
            {
                var indexString = App.Locator.AppSettingsHelper.Read <int>(Core.PlayerConstants.AppThemeIndex);
                if (indexString < 1)
                {
                    _colorPicker.ChangeColor(index: 1);
                }
                else
                {
                    _colorPicker.ChangeColor(index: indexString);
                }
            }
            catch
            {
                _colorPicker.ChangeColor(index: 1);
            }

            Window.Current.SizeChanged += Current_SizeChanged;
            Current_SizeChanged(null, null);



            if (!App.Locator.Setting.TurboMode)
            {
                App.Navigator.AddPage(new FirstRunPage());
                App.Navigator.AddPage(new HomePage());
                App.Navigator.AddPage(new CollectionPage());
                App.Navigator.AddPage(new CollectionAlbumPage());
                App.Navigator.AddPage(new CollectionArtistPage());
                App.Navigator.AddPage(new CollectionPlaylistPage());
                App.Navigator.AddPage(new DownloadManager());
                App.Navigator.AddPage(new NowPlayingPage());
                App.Navigator.AddPage(new SettingsPage());
                App.Navigator.AddPage(new VideoInformationPage());
                App.Navigator.AddPage(new SpotifyAlbumPage());
                App.Navigator.AddPage(new SpotifyArtistPage());
                App.Navigator.AddPage(new DeezerAlbumPage());
                App.Navigator.AddPage(new SearchPage());
                App.Navigator.AddPage(new CollectionPlaylistsPage());
                App.Navigator.AddPage(new NewTrackAlbumPage());
            }
        }
Beispiel #2
0
 private void ColorListViewClicked(object sender, ItemClickEventArgs e)
 {
     _colorPicker.ChangeColor(e.ClickedItem as ColorName);
     SheetUtility.CloseColorViewPage();
 }