Пример #1
0
 protected void StoreTokenInfo()
 {
     Storager.AddObject(LoginDataKey, TokenInfo);
 }
Пример #2
0
 public virtual void Logout()
 {
     Storager.Remove(LoginDataKey);
     TokenInfo = null;
 }
Пример #3
0
 private void NightModeBtn_Toggled(object sender, RoutedEventArgs e)
 {
     Storager.UpdateStorageInfo();
     NavigationManager.Instance.UpdateGoBackBtnVisibility();
 }
Пример #4
0
 private void LazyModeBtn_Toggled(object sender, RoutedEventArgs e)
 {
     Storager.UpdateStorageInfo();
 }
Пример #5
0
        private void Subscriber(StoryEvent param)
        {
            switch (param.Type)
            {
            case StoryEventType.Comment:
                if (!Config.IsSinglePage)
                {
                    StoryContentView.IsPaneOpen = !StoryContentView.IsPaneOpen;
                }

                if (Config.UIStatus == AppUIStatus.All)
                {
                    Storager.SetCommentPanelStatus(StoryContentView.IsPaneOpen);
                }
                break;

            case StoryEventType.Search:
                ShowSearcher();
                break;

            case StoryEventType.DisplayStory:
                DisplayStory(param.Content);
                break;

            case StoryEventType.Circle:
                Navigate(typeof(CircleStoryPage), param.Content);
                break;

            case StoryEventType.HotCircle:
                Navigate(typeof(HotCirclesPage), null);
                break;

            case StoryEventType.HotStory:
                Navigate(typeof(HotStoriesPage), null);
                break;

            case StoryEventType.FavPage:
                Navigate(typeof(FavoritePage), null);
                break;

            case StoryEventType.Setting:
                if (TimeLineFrame.Content is SettingPage)
                {
                    return;
                }
                Navigate(typeof(SettingPage), null);
                break;

            case StoryEventType.CreateCircle:
                Navigate(typeof(CreateCirclePage), null);
                break;

            case StoryEventType.PostToCircle:
                if (TimeLineFrame.Content is PostToCirclePage)
                {
                    return;
                }
                Navigate(typeof(PostToCirclePage), null);
                break;

            case StoryEventType.Night:
                InitUI();
                break;
            }
        }