Example #1
0
        protected override void Execute(object parameter)
        {
            if (parameter is Models.Subscription.SubscriptionSource source)
            {
                switch (source.SourceType)
                {
                case Models.Subscription.SubscriptionSourceType.User:
                    PageManager.OpenPage(HohoemaPageType.UserVideo, source.Parameter);
                    break;

                case Models.Subscription.SubscriptionSourceType.Channel:
                    PageManager.OpenPage(HohoemaPageType.ChannelVideo, source.Parameter);
                    break;

                case Models.Subscription.SubscriptionSourceType.Mylist:
                    var mylistPagePayload = new MylistPagePayload(source.Parameter)
                    {
                        Origin = Services.PlaylistOrigin.OtherUser
                    };
                    PageManager.OpenPage(HohoemaPageType.Mylist, mylistPagePayload.ToParameterString());
                    break;

                case Models.Subscription.SubscriptionSourceType.TagSearch:
                    PageManager.SearchTag(source.Parameter, Mntone.Nico2.Order.Descending, Mntone.Nico2.Sort.FirstRetrieve);
                    break;

                case Models.Subscription.SubscriptionSourceType.KeywordSearch:
                    PageManager.SearchKeyword(source.Parameter, Mntone.Nico2.Order.Descending, Mntone.Nico2.Sort.FirstRetrieve);
                    break;

                default:
                    break;
                }
            }
        }
 protected override void Execute(object parameter)
 {
     if (parameter is Models.Subscription.SubscriptionDestination dest)
     {
         var mylistPagePayload = new MylistPagePayload(dest.PlaylistId)
         {
             Origin = dest.Target == Models.Subscription.SubscriptionDestinationTarget.LocalPlaylist
             ? Services.PlaylistOrigin.Local
             : Services.PlaylistOrigin.LoginUser
         };
         PageManager.OpenPage(HohoemaPageType.Mylist, mylistPagePayload.ToParameterString());
     }
 }
Example #3
0
 protected override void Execute(object parameter)
 {
     if (parameter is Models.Subscription.SubscriptionDestination dest)
     {
         if (dest.Target == Models.Subscription.SubscriptionDestinationTarget.LoginUserMylist)
         {
             var mylistPagePayload = new MylistPagePayload(dest.PlaylistId);
             PageManager.OpenPage(HohoemaPageType.Mylist, mylistPagePayload.ToParameterString());
         }
         else if (dest.Target == Models.Subscription.SubscriptionDestinationTarget.LocalPlaylist)
         {
             PageManager.OpenPage(HohoemaPageType.LocalPlaylist, "id=" + dest.PlaylistId);
         }
     }
 }