private void Subscriber(StoryEvent param) { switch (param.Type) { case StoryEventType.Comment: if (Config.IsSinglePageStatus(CurrentUIStatus)) { Frame rootFrame = App.GetWindowFrame(); if (rootFrame == null) return; rootFrame.Navigate(typeof(CommentPage)); } break; case StoryEventType.ShareToWeiBo: if (WeiboSharePopup.IsOpen) break; WeiboSharePopup.IsOpen = true; PostMsg.Text = string.Format($"{VM.MainHtmlContent.title} {VM.MainHtmlContent.share_url}"); Animator.Use(AnimationType.ZoomInDown).SetDuration(TimeSpan.FromMilliseconds(800)).PlayOn(WeiboSharePopup, ()=> { var transform = (CompositeTransform)PrepareTransform(WeiboSharePopup, typeof(CompositeTransform)); transform.CenterX = transform.CenterY = 0; }); break; } }
private void Subscriber(StoryEvent param) { switch (param.Type) { case StoryEventType.Comment: if (Config.IsSinglePageStatus(CurrentUIStatus)) { Frame rootFrame = App.GetWindowFrame(); if (rootFrame == null) return; rootFrame.Navigate(typeof(CommentPage)); } break; } }
private void Subscriber(StoryEvent param) { switch(param.Type) { case StoryEventType.Menu: ResetCategoryPanel(); break; case StoryEventType.Comment: if (!Config.IsSinglePage) { StoryContentView.IsPaneOpen = !StoryContentView.IsPaneOpen; } if(Config.UIStatus == AppUIStatus.All) { StorageUtil.SetCommentPanelStatus(StoryContentView.IsPaneOpen); } break; } }
private void Subscriber(StoryEvent param) { switch (param.Type) { case StoryEventType.Fav: DataRequester.SetStoryFavorite(CurrentStoryId, param.IsChecked); break; case StoryEventType.Like: DataRequester.SetStoryLike(CurrentStoryId, param.IsChecked); break; } }