Пример #1
0
 public void SetActiveButton(HamburgerButtons val)
 {
     ResetActiveButton();
     TxtForegroundBrushes[val.ToString()] =
         Application.Current.Resources["SystemControlBackgroundAccentBrush"] as Brush;
     TxtBorderBrushThicknesses[val.ToString()] = new Thickness(3, 0, 0, 0);
     RaisePropertyChanged(() => TxtForegroundBrushes);
     RaisePropertyChanged(() => TxtBorderBrushThicknesses);
 }
Пример #2
0
 public void SetActiveButton(HamburgerButtons val)
 {
     ResetActiveButton();
     if (val != HamburgerButtons.TopAnime)
     {
         ResetTopCategoryButtons();
         RaisePropertyChanged(() => TopCategoriesForegorundBrushes);
     }
     if (TxtForegroundBrushes.ContainsKey(val.ToString()))
     {
         TxtForegroundBrushes[val.ToString()] =
             Application.Current.Resources["SystemControlBackgroundAccentBrush"] as Brush;
         TxtBorderBrushThicknesses[val.ToString()] = new Thickness(4, 0, 0, 0);
     }
     RaisePropertyChanged(() => TxtForegroundBrushes);
     RaisePropertyChanged(() => TxtBorderBrushThicknesses);
 }
 public void SetActiveButton(HamburgerButtons val)
 {
     ResetActiveButton();
     if (val != HamburgerButtons.TopAnime)
     {
         ResetTopCategoryButtons();
         RaisePropertyChanged(() => TopCategoriesForegorundBrushes);
     }
     TxtForegroundBrushes[val.ToString()] =
         Application.Current.Resources["SystemControlBackgroundAccentBrush"] as Brush;
     TxtBorderBrushThicknesses[val.ToString()] = new Thickness(4, 0, 0, 0);
     RaisePropertyChanged(() => TxtForegroundBrushes);
     RaisePropertyChanged(() => TxtBorderBrushThicknesses);
 }
Пример #4
0
        public void SetActiveButton(HamburgerButtons val)
        {
            if (_footerView != null)
            {
                if (_selectedProfileItem)
                {
                    if (val == HamburgerButtons.Profile)
                    {
                        return;
                    }

                    _accountHamburgerView.SetBackgroundColor(Color.Transparent);
                    _accountHamburgerView.FindViewById <TextView>(Resource.Id.HamburgerProfileItemLabel).SetTextColor(new Color(ResourceExtension.BrushText));
                    _selectedProfileItem = false;
                }
                if (_selectedSettingsItem)
                {
                    if (val == HamburgerButtons.Settings)
                    {
                        return;
                    }

                    _settingsHamburgerView.SetBackgroundColor(Color.Transparent);
                    _settingsHamburgerView.FindViewById <TextView>(Resource.Id.HamburgerSettingsItemLabel).SetTextColor(new Color(ResourceExtension.BrushText));
                    _settingsHamburgerView.FindViewById <ImageView>(Resource.Id.HamburgerSettingsItemIcon).ImageTintList = ColorStateList.ValueOf(new Color(ResourceExtension.BrushText));
                    _selectedSettingsItem = false;
                }
            }
            long id;

            switch (val)
            {
            case HamburgerButtons.AnimeList:
                id = (long)PageIndex.PageAnimeList;
                break;

            case HamburgerButtons.AnimeSearch:
                id = (long)PageIndex.PageSearch;
                break;

            case HamburgerButtons.LogIn:
                id = (long)PageIndex.PageLogIn;
                break;

            case HamburgerButtons.Settings:
                if (_settingsHamburgerView != null)
                {
                    _settingsHamburgerView.SetBackgroundColor(Settings.SelectedTheme == 1
                            ? new Color(ResourceExtension.BrushAnimeItemBackground)
                            : Color.White);
                    _settingsHamburgerView.FindViewById <TextView>(Resource.Id.HamburgerSettingsItemLabel).SetTextColor(new Color(ResourceExtension.AccentColour));
                    _settingsHamburgerView.FindViewById <ImageView>(Resource.Id.HamburgerSettingsItemIcon).ImageTintList = ColorStateList.ValueOf(new Color(ResourceExtension.AccentColour));
                    _selectedSettingsItem = true;
                }
                _drawer.SetSelectionAtPosition(-1);
                return;

            case HamburgerButtons.Profile:
                _accountHamburgerView.SetBackgroundColor(Settings.SelectedTheme == 1
                        ? new Color(ResourceExtension.BrushAnimeItemBackground)
                        : Color.White);
                _accountHamburgerView.FindViewById <TextView>(Resource.Id.HamburgerProfileItemLabel).SetTextColor(new Color(ResourceExtension.AccentColour));
                _selectedProfileItem = true;
                _drawer.SetSelectionAtPosition(-1);
                return;

            case HamburgerButtons.Seasonal:
                id = (long)PageIndex.PageSeasonal;
                break;

            case HamburgerButtons.About:
                return;

            case HamburgerButtons.Recommendations:
                id = (long)PageIndex.PageRecomendations;
                break;

            case HamburgerButtons.MangaList:
                id = (long)PageIndex.PageMangaList;
                break;

            case HamburgerButtons.MangaSearch:
                id = (long)PageIndex.PageSearch;
                break;

            case HamburgerButtons.TopAnime:
                id = (long)PageIndex.PageTopAnime;
                break;

            case HamburgerButtons.TopManga:
                id = (long)PageIndex.PageTopManga;
                break;

            case HamburgerButtons.Calendar:
                id = (long)PageIndex.PageCalendar;
                break;

            case HamburgerButtons.Articles:
                id = (long)PageIndex.PageArticles;
                break;

            case HamburgerButtons.News:
                id = (long)PageIndex.PageArticles;
                break;

            case HamburgerButtons.Messanging:
                _drawer.SetSelectionAtPosition(-1);
                return;

            case HamburgerButtons.Forums:
                id = (long)PageIndex.PageForumIndex;
                break;

            case HamburgerButtons.History:
                id = (long)PageIndex.PageHistory;
                break;

            case HamburgerButtons.CharacterSearch:
                id = (long)PageIndex.PageSearch;
                break;

            case HamburgerButtons.Wallpapers:
                id = (long)PageIndex.PageWallpapers;
                break;

            case HamburgerButtons.PopularVideos:
                id = (long)PageIndex.PagePopularVideos;
                break;

            case HamburgerButtons.Feeds:
                id = (long)PageIndex.PageFeeds;
                break;

            case HamburgerButtons.Notifications:
                _drawer.SetSelectionAtPosition(-1);
                return;

            case HamburgerButtons.Clubs:
                id = (long)PageIndex.PageClubIndex;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(val), val, null);
            }
            _allowHamburgerNavigation = false;
            _drawer.SetSelection(id);
            _allowHamburgerNavigation = true;
        }
 public void SetActiveButton(HamburgerButtons val)
 {
 }
Пример #6
0
 public void SetActiveButton(HamburgerButtons val)
 {
     //throw new NotImplementedException();
 }
 public void SetActiveButton(HamburgerButtons val)
 {
    
 }
Пример #8
0
		public void SetActiveButton(HamburgerButtons val)
		{
			//throw new NotImplementedException();
		}