protected override void Execute(object parameter)
        {
            if (parameter is ViewModels.FeedSourceBookmark)
            {
                var bookmark    = (parameter as ViewModels.FeedSourceBookmark).Bookmark;
                var pageManager = App.Current.Container.Resolve <PageManager>();
                switch (bookmark.BookmarkType)
                {
                case Database.BookmarkType.SearchWithTag:
                {
                    var searchPayload = SearchPagePayloadContentHelper.CreateDefault(SearchTarget.Tag, bookmark.Content);
                    pageManager.OpenPage(HohoemaPageType.SearchResultTag, searchPayload.ToParameterString());
                }
                break;

                case Database.BookmarkType.SearchWithKeyword:
                {
                    var searchPayload = SearchPagePayloadContentHelper.CreateDefault(SearchTarget.Keyword, bookmark.Content);
                    pageManager.OpenPage(HohoemaPageType.SearchResultTag, searchPayload.ToParameterString());
                }
                break;

                case Database.BookmarkType.Mylist:
                    pageManager.OpenPage(HohoemaPageType.Mylist,
                                         new MylistPagePayload(bookmark.Content).ToParameterString()
                                         );
                    break;

                case Database.BookmarkType.User:
                    pageManager.OpenPage(HohoemaPageType.UserVideo, bookmark.Content);
                    break;

                default:
                    break;
                }
            }
        }
Exemple #2
0
        public MenuNavigatePageBaseViewModel(
            HohoemaApp hohoemaApp,
            PageManager pageManager
            )
        {
            PageManager = pageManager;
            HohoemaApp  = hohoemaApp;

            // TV Mode
            if (Util.DeviceTypeHelper.IsXbox)
            {
                IsTVModeEnable = new ReactiveProperty <bool>(true);
            }
            else
            {
                IsTVModeEnable = HohoemaApp.UserSettings
                                 .AppearanceSettings.ObserveProperty(x => x.IsForceTVModeEnable)
                                 .ToReactiveProperty();
            }

            ServiceLevel = HohoemaApp.ObserveProperty(x => x.ServiceStatus)
                           .ToReadOnlyReactiveProperty();

            IsNeedFullScreenToggleHelp
                = ApplicationView.PreferredLaunchWindowingMode == ApplicationViewWindowingMode.FullScreen;

            IsOpenPane = new ReactiveProperty <bool>(false);

            MenuItems = new List <PageTypeSelectableItem>()
            {
                new PageTypeSelectableItem(HohoemaPageType.Search, OnMenuItemSelected, "検索", Symbol.Find),
                new PageTypeSelectableItem(HohoemaPageType.RankingCategoryList, OnMenuItemSelected, "ランキング", Symbol.Flag),
                new PageTypeSelectableItem(HohoemaPageType.UserMylist, OnMenuItemSelected, "マイリスト", Symbol.Bookmarks),
                new PageTypeSelectableItem(HohoemaPageType.FollowManage, OnMenuItemSelected, "フォロー", Symbol.OutlineStar),
                new PageTypeSelectableItem(HohoemaPageType.FeedGroupManage, OnMenuItemSelected, "フィード", Symbol.List),
            };

            SubMenuItems = new List <PageTypeSelectableItem>()
            {
                new PageTypeSelectableItem(HohoemaPageType.History, OnMenuItemSelected, "視聴履歴", Symbol.Clock),
                new PageTypeSelectableItem(HohoemaPageType.CacheManagement, OnMenuItemSelected, "キャッシュ管理", Symbol.Download),
                new PageTypeSelectableItem(HohoemaPageType.Settings, OnMenuItemSelected, "設定", Symbol.Setting),
                new PageTypeSelectableItem(HohoemaPageType.UserInfo, OnAccountMenuItemSelected, "アカウント", Symbol.Account),
            };

            AllMenuItems = MenuItems.Concat(SubMenuItems).ToList();

            MainSelectedItem = new ReactiveProperty <PageTypeSelectableItem>(MenuItems[0], ReactivePropertyMode.DistinctUntilChanged);
            SubSelectedItem  = new ReactiveProperty <PageTypeSelectableItem>(null, ReactivePropertyMode.DistinctUntilChanged);

            Observable.Merge(
                MainSelectedItem,
                SubSelectedItem
                )
            .Where(x => x != null)
            .Subscribe(x => x.SelectedAction(x.Source));

            PageManager.ObserveProperty(x => x.CurrentPageType)
            .Subscribe(pageType =>
            {
//                    IsOpenPane.Value = false;

                bool isMenuItemOpened = false;
                foreach (var item in MenuItems)
                {
                    if (item.Source == pageType)
                    {
                        MainSelectedItem.Value = item;
                        SubSelectedItem.Value  = null;
                        isMenuItemOpened       = true;
                        break;
                    }
                }

                foreach (var item in SubMenuItems)
                {
                    if (item.Source == pageType)
                    {
                        SubSelectedItem.Value  = item;
                        MainSelectedItem.Value = null;
                        isMenuItemOpened       = true;
                        break;
                    }
                }

                if (!isMenuItemOpened)
                {
                    MainSelectedItem.Value = null;
                    SubSelectedItem.Value  = null;
                }
            });

            IsSubMenuItemPage = PageManager.ObserveProperty(x => x.CurrentPageType)
                                .Select(x => SubMenuItems.Any(y => y.Source == x))
                                .ToReactiveProperty();



            PageManager.ObserveProperty(x => x.PageTitle)
            .Subscribe(x =>
            {
                TitleText = x;
            });


            IsVisibleMenu = PageManager.ObserveProperty(x => x.CurrentPageType)
                            .Select(x =>
            {
                return(PageManager.DontNeedMenuPageTypes.All(dontNeedMenuPageType => x != dontNeedMenuPageType));
            })
                            .ToReactiveProperty();

            NowNavigating = PageManager.ObserveProperty(x => x.PageNavigating)
                            .ToReactiveProperty();


            PageManager.StartWork    += PageManager_StartWork;
            PageManager.ProgressWork += PageManager_ProgressWork;
            PageManager.CompleteWork += PageManager_CompleteWork;
            PageManager.CancelWork   += PageManager_CancelWork;



            var updater = HohoemaApp.BackgroundUpdater;

            var bgUpdateStartedObserver = Observable.FromEventPattern <BackgroundUpdateScheduleHandler>(
                handler => updater.BackgroundUpdateStartedEvent += handler,
                handler => updater.BackgroundUpdateStartedEvent -= handler
                );

            var bgUpdateCompletedObserver = Observable.FromEventPattern <BackgroundUpdateScheduleHandler>(
                handler => updater.BackgroundUpdateCompletedEvent += handler,
                handler => updater.BackgroundUpdateCompletedEvent -= handler
                );


            var bgUpdateCanceledObserver = Observable.FromEventPattern <BackgroundUpdateScheduleHandler>(
                handler => updater.BackgroundUpdateCanceledEvent += handler,
                handler => updater.BackgroundUpdateCanceledEvent -= handler
                );

            BGUpdateText    = new ReactiveProperty <string>();
            HasBGUpdateText = BGUpdateText.Select(x => !string.IsNullOrEmpty(x))
                              .ToReactiveProperty();
            bgUpdateStartedObserver.Subscribe(x =>
            {
                if (!string.IsNullOrEmpty(x.EventArgs.Label))
                {
                    BGUpdateText.Value = $"{x.EventArgs.Label} を処理中...";
                }
                else
                {
                    BGUpdateText.Value = $"{x.EventArgs.Id} を処理中...";
                }
            });


            Observable.Merge(
                bgUpdateCompletedObserver,
                bgUpdateCanceledObserver
                )
            .Throttle(TimeSpan.FromSeconds(2))
            .Subscribe(x =>
            {
                BGUpdateText.Value = null;
            });

            HohoemaApp.ObserveProperty(x => x.IsLoggedIn)
            .Subscribe(x => IsLoggedIn = x);

            HohoemaApp.ObserveProperty(x => x.LoginUserName)
            .Subscribe(x =>
            {
                UserName = x;
                UserMail = AccountManager.GetPrimaryAccountId();
            });

            HohoemaApp.ObserveProperty(x => x.UserIconUrl)
            .Subscribe(x => UserIconUrl = x);



            // 検索
            SearchKeyword = new ReactiveProperty <string>("");
            SearchTarget  = new ReactiveProperty <Models.SearchTarget>(Models.SearchTarget.Keyword);

            SearchCommand = SearchKeyword
                            .Select(x => !string.IsNullOrWhiteSpace(x))
                            .ToReactiveCommand();
            SearchCommand.Subscribe(_ =>
            {
                ISearchPagePayloadContent searchContent =
                    SearchPagePayloadContentHelper.CreateDefault(SearchTarget.Value, SearchKeyword.Value);
                PageManager.Search(searchContent);

                IsMobileNowSearching = false;
            });
        }
Exemple #3
0
        public MenuNavigatePageBaseViewModel(
            IUnityContainer container,
            IScheduler scheduler,
            AppearanceSettings appearanceSettings,
            PinSettings pinSettings,
            NiconicoSession niconicoSession,
            LocalMylistManager localMylistManager,
            UserMylistManager userMylistManager,
            VideoCacheManager videoCacheManager,
            PageManager pageManager,
            Services.NiconicoLoginService niconicoLoginService,
            Commands.LogoutFromNiconicoCommand logoutFromNiconicoCommand
            )
        {
            PageManager               = pageManager;
            NiconicoLoginService      = niconicoLoginService;
            LogoutFromNiconicoCommand = logoutFromNiconicoCommand;
            Container          = container;
            Scheduler          = scheduler;
            AppearanceSettings = appearanceSettings;
            PinSettings        = pinSettings;
            NiconicoSession    = niconicoSession;
            LocalMylistManager = localMylistManager;
            UserMylistManager  = userMylistManager;
            VideoCacheManager  = videoCacheManager;

            NiconicoSession.LogIn  += (sender, e) => ResetMenuItems();
            NiconicoSession.LogOut += (sender, e) => ResetMenuItems();

            CurrentMenuType = new ReactiveProperty <ViewModelBase>();
            VideoMenu       = App.Current.Container.Resolve <VideoMenuSubPageContent>();
            LiveMenu        = App.Current.Container.Resolve <LiveMenuSubPageContent>();

            // Back Navigation
            CanGoBackNavigation     = new ReactivePropertySlim <bool>();
            GoBackNavigationCommand = CanGoBackNavigation
                                      .ToReactiveCommand();

            GoBackNavigationCommand.Subscribe(_ =>
            {
                PageManager.NavigationService.GoBack();
            });

            // TV Mode
            if (Services.Helpers.DeviceTypeHelper.IsXbox)
            {
                IsTVModeEnable = new ReactiveProperty <bool>(true);
            }
            else
            {
                IsTVModeEnable = AppearanceSettings.ObserveProperty(x => x.IsForceTVModeEnable)
                                 .ToReactiveProperty();
            }


            ServiceLevel = NiconicoSession.ObserveProperty(x => x.ServiceStatus)
                           .ToReadOnlyReactiveProperty();

            IsNeedFullScreenToggleHelp
                = ApplicationView.PreferredLaunchWindowingMode == ApplicationViewWindowingMode.FullScreen;

            IsOpenPane = new ReactiveProperty <bool>(false);

            MainSelectedItem = new ReactiveProperty <HohoemaListingPageItemBase>(null, ReactivePropertyMode.DistinctUntilChanged);


            PinItems = new ObservableCollection <PinItemViewModel>(
                PinSettings.Pins.Select(x => Container.Resolve <PinItemViewModel>(new ParameterOverride("pin", x)))
                );
            PinSettings.Pins.CollectionChangedAsObservable()
            .Subscribe(args =>
            {
                if (args.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
                {
                    foreach (var item in args.NewItems)
                    {
                        PinItems.Add(Container.Resolve <PinItemViewModel>(new ParameterOverride("pin", item as HohoemaPin)));
                    }
                }
                else if (args.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
                {
                    foreach (var item in args.OldItems)
                    {
                        var removedPin = item as HohoemaPin;
                        var pinVM      = PinItems.FirstOrDefault(x => x.Pin == removedPin);
                        if (pinVM != null)
                        {
                            PinItems.Remove(pinVM);
                        }
                    }
                }
            });

            ResetMenuItems();

            // TODO; PinSettings側で自動保存するようにしたい
            PinItems.CollectionChangedAsObservable()
            .Subscribe(async _ =>
            {
                await PinSettings.Save();
            });

            /*
             * Observable.Merge(
             *  MainSelectedItem,
             *  SubSelectedItem
             *  )
             *  .Where(x => x != null)
             *  .Subscribe(x => x.SelectedAction(x.Source));
             */
            PageManager.ObserveProperty(x => x.CurrentPageType)
            .Subscribe(pageType =>
            {
                //                    IsOpenPane.Value = false;

                bool isMenuItemOpened = false;
                foreach (var item in MenuItems)
                {
                    if ((item as MenuItemViewModel)?.PageType == pageType)
                    {
                        MainSelectedItem.Value = item;
                        isMenuItemOpened       = true;
                        break;
                    }
                }


                if (!isMenuItemOpened)
                {
                    MainSelectedItem.Value = null;
                }

                if (Services.Helpers.DeviceTypeHelper.IsXbox || AppearanceSettings.IsForceTVModeEnable ||
                    Services.Helpers.DeviceTypeHelper.IsMobile
                    )
                {
                    IsOpenPane.Value = false;
                }
            });


            PageManager.ObserveProperty(x => x.PageTitle)
            .Subscribe(x =>
            {
                TitleText = x;
                AddPinToCurrentPageCommand.RaiseCanExecuteChanged();
            });

            PageManager.ObserveProperty(x => x.CurrentPageType)
            .Subscribe(_ => UpdateCanGoBackNavigation());



            IsVisibleMenu = PageManager.ObserveProperty(x => x.CurrentPageType)
                            .Select(x =>
            {
                return(!PageManager.IsHiddenMenuPage(x));
            })
                            .ToReactiveProperty(false);

            NowNavigating = PageManager.ObserveProperty(x => x.PageNavigating)
                            .ToReactiveProperty();


            PageManager.StartWork    += PageManager_StartWork;
            PageManager.ProgressWork += PageManager_ProgressWork;
            PageManager.CompleteWork += PageManager_CompleteWork;
            PageManager.CancelWork   += PageManager_CancelWork;

            NiconicoSession.ObserveProperty(x => x.IsLoggedIn)
            .Subscribe(x => IsLoggedIn = x);

            NiconicoSession.ObserveProperty(x => x.UserName)
            .Subscribe(x =>
            {
                UserName = x;
            });

            NiconicoSession.ObserveProperty(x => x.UserIconUrl)
            .Subscribe(x => UserIconUrl = x);



            // 検索
            SearchKeyword = new ReactiveProperty <string>("");

            SearchCommand = new ReactiveCommand();
            SearchCommand
            .Subscribe(async _ =>
            {
                await Task.Delay(50);
                var keyword = SearchKeyword.Value;

                if (string.IsNullOrWhiteSpace(keyword))
                {
                    return;
                }

                SearchTarget?searchType = CurrentMenuType.Value is LiveMenuSubPageContent ? SearchTarget.Niconama : SearchTarget.Keyword;
                var searched            = Database.SearchHistoryDb.LastSearchedTarget(keyword);
                if (searched != null)
                {
                    searchType = searched;
                }

                PageManager.Search(SearchPagePayloadContentHelper.CreateDefault(searchType.Value, keyword));

                ResetSearchHistoryItems();
            });

            SearchSuggestionWords = new ObservableCollection <string>();



            // InAppNotification
            IsShowInAppNotification = new ReactiveProperty <bool>(true);


            // 検索履歴アイテムを初期化
            ResetSearchHistoryItems();
        }
Exemple #4
0
        public MenuNavigatePageBaseViewModel(
            HohoemaApp hohoemaApp,
            PageManager pageManager,
            Models.Niconico.Live.NicoLiveSubscriber nicoLiveSubscriber
            )
        {
            PageManager        = pageManager;
            HohoemaApp         = hohoemaApp;
            NicoLiveSubscriber = nicoLiveSubscriber;

            HohoemaApp.OnSignin  += HohoemaApp_OnSignin;
            HohoemaApp.OnSignout += HohoemaApp_OnSignout;

            CurrentMenuType = new ReactiveProperty <ViewModelBase>();
            VideoMenu       = new VideoMenuSubPageContent(HohoemaApp, HohoemaApp.UserMylistManager, HohoemaApp.Playlist);
            LiveMenu        = new LiveMenuSubPageContent(NicoLiveSubscriber);

            // Back Navigation
            CanGoBackNavigation     = new ReactivePropertySlim <bool>();
            GoBackNavigationCommand = CanGoBackNavigation
                                      .ToReactiveCommand();

            GoBackNavigationCommand.Subscribe(_ =>
            {
                PageManager.NavigationService.GoBack();
            });

            // TV Mode
            if (Helpers.DeviceTypeHelper.IsXbox)
            {
                IsTVModeEnable = new ReactiveProperty <bool>(true);
            }
            else
            {
                IsTVModeEnable = HohoemaApp.UserSettings
                                 .AppearanceSettings.ObserveProperty(x => x.IsForceTVModeEnable)
                                 .ToReactiveProperty();
            }


            ServiceLevel = HohoemaApp.ObserveProperty(x => x.ServiceStatus)
                           .ToReadOnlyReactiveProperty();

            IsNeedFullScreenToggleHelp
                = ApplicationView.PreferredLaunchWindowingMode == ApplicationViewWindowingMode.FullScreen;

            IsOpenPane = new ReactiveProperty <bool>(false);

            MainSelectedItem = new ReactiveProperty <HohoemaListingPageItemBase>(null, ReactivePropertyMode.DistinctUntilChanged);


            PinItems = HohoemaApp.UserSettings.PinSettings.Pins;

            ResetMenuItems();

            PinItems.CollectionChangedAsObservable()
            .Subscribe(async _ =>
            {
                await HohoemaApp.UserSettings.PinSettings.Save();
            });

            /*
             * Observable.Merge(
             *  MainSelectedItem,
             *  SubSelectedItem
             *  )
             *  .Where(x => x != null)
             *  .Subscribe(x => x.SelectedAction(x.Source));
             */
            PageManager.ObserveProperty(x => x.CurrentPageType)
            .Subscribe(pageType =>
            {
                //                    IsOpenPane.Value = false;

                bool isMenuItemOpened = false;
                foreach (var item in MenuItems)
                {
                    if ((item as MenuItemViewModel)?.PageType == pageType)
                    {
                        MainSelectedItem.Value = item;
                        isMenuItemOpened       = true;
                        break;
                    }
                }


                if (!isMenuItemOpened)
                {
                    MainSelectedItem.Value = null;
                }

                if (Helpers.DeviceTypeHelper.IsXbox || HohoemaApp.UserSettings.AppearanceSettings.IsForceTVModeEnable)
                {
                    IsOpenPane.Value = false;
                }
            });


            PageManager.ObserveProperty(x => x.PageTitle)
            .Subscribe(x =>
            {
                TitleText = x;
                AddPinToCurrentPageCommand.RaiseCanExecuteChanged();
            });

            PageManager.ObserveProperty(x => x.CurrentPageType)
            .Subscribe(_ => UpdateCanGoBackNavigation());



            IsVisibleMenu = PageManager.ObserveProperty(x => x.CurrentPageType)
                            .Select(x =>
            {
                return(!PageManager.IsHiddenMenuPage(x));
            })
                            .ToReactiveProperty(false);

            NowNavigating = PageManager.ObserveProperty(x => x.PageNavigating)
                            .ToReactiveProperty();


            PageManager.StartWork    += PageManager_StartWork;
            PageManager.ProgressWork += PageManager_ProgressWork;
            PageManager.CompleteWork += PageManager_CompleteWork;
            PageManager.CancelWork   += PageManager_CancelWork;

            HohoemaApp.ObserveProperty(x => x.IsLoggedIn)
            .Subscribe(x => IsLoggedIn = x);

            HohoemaApp.ObserveProperty(x => x.LoginUserName)
            .Subscribe(x =>
            {
                UserName = x;
            });

            HohoemaApp.ObserveProperty(x => x.UserIconUrl)
            .Subscribe(x => UserIconUrl = x);



            // 検索
            SearchKeyword = new ReactiveProperty <string>("");

            SearchCommand = new ReactiveCommand();
            SearchCommand
            .Subscribe(async _ =>
            {
                await Task.Delay(50);
                var keyword = SearchKeyword.Value;

                if (string.IsNullOrWhiteSpace(keyword))
                {
                    return;
                }

                SearchTarget?searchType = CurrentMenuType.Value is LiveMenuSubPageContent ? SearchTarget.Niconama : SearchTarget.Keyword;
                var searched            = Database.SearchHistoryDb.LastSearchedTarget(keyword);
                if (searched != null)
                {
                    searchType = searched;
                }

                PageManager.Search(SearchPagePayloadContentHelper.CreateDefault(searchType.Value, keyword));

                ResetSearchHistoryItems();
            });

            SearchSuggestionWords = new ObservableCollection <string>();



            // InAppNotification
            IsShowInAppNotification = new ReactiveProperty <bool>(true);



            IsShowPlayerInFill = HohoemaApp.Playlist
                                 .ObserveProperty(x => x.IsPlayerFloatingModeEnable)
                                 .Select(x => !x)
                                 .ToReadOnlyReactiveProperty();

            IsShowPlayerInFill_DelayedRead = IsShowPlayerInFill
                                             .Delay(TimeSpan.FromMilliseconds(300))
                                             .ToReadOnlyReactiveProperty();


            IsShowPlayer = HohoemaApp.Playlist.ObserveProperty(x => x.IsDisplayMainViewPlayer)
                           .ToReactiveProperty(mode: ReactivePropertyMode.DistinctUntilChanged);

            IsContentDisplayFloating = Observable.CombineLatest(
                IsShowPlayerInFill.Select(x => !x),
                IsShowPlayer
                )
                                       .Select(x => x.All(y => y))
                                       .ToReactiveProperty();


            HohoemaApp.Playlist.OpenPlaylistItem += HohoemaPlaylist_OpenPlaylistItem;

            IsShowPlayer
            .Where(x => !x)
            .Subscribe(x =>
            {
                ClosePlayer();
            });

            if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4))
            {
                Observable.Merge(
                    IsShowPlayer.Where(x => !x),
                    IsContentDisplayFloating.Where(x => x)
                    )
                .Subscribe(async x =>
                {
                    var view = ApplicationView.GetForCurrentView();
                    if (view.IsViewModeSupported(ApplicationViewMode.CompactOverlay))
                    {
                        var result = await view.TryEnterViewModeAsync(ApplicationViewMode.Default);
                    }
                });
            }


            // 検索履歴アイテムを初期化
            ResetSearchHistoryItems();
        }
Exemple #5
0
        protected override void Execute(object parameter)
        {
            bool isPlayerShowWithSmallMode = true;

            if (parameter is Interfaces.IVideoContent)
            {
                var content = parameter as Interfaces.IVideoContent;

                var player = HohoemaCommnadHelper.GetHohoemaPlaylist();
                player.PlayVideo(content);

                isPlayerShowWithSmallMode = false;
            }
            else if (parameter is Interfaces.ILiveContent)
            {
                var content = parameter as Interfaces.ILiveContent;

                var player = HohoemaCommnadHelper.GetHohoemaPlaylist();
                player.PlayLiveVideo(content);

                isPlayerShowWithSmallMode = false;
            }
            else if (parameter is Interfaces.ICommunity)
            {
                var content     = parameter as Interfaces.ICommunity;
                var pageManager = HohoemaCommnadHelper.GetPageManager();
                pageManager.OpenPage(Models.HohoemaPageType.Community, content.Id);
            }
            else if (parameter is Interfaces.IMylist)
            {
                var content     = parameter as Interfaces.IMylist;
                var pageManager = HohoemaCommnadHelper.GetPageManager();
                pageManager.OpenPage(Models.HohoemaPageType.Mylist, new Models.MylistPagePayload(content.Id).ToParameterString());
            }
            else if (parameter is Interfaces.IUser)
            {
                var content     = parameter as Interfaces.IUser;
                var pageManager = HohoemaCommnadHelper.GetPageManager();
                pageManager.OpenPage(Models.HohoemaPageType.UserInfo, content.Id);
            }
            else if (parameter is Interfaces.ISearchWithtag)
            {
                var content     = parameter as Interfaces.ISearchWithtag;
                var pageManager = HohoemaCommnadHelper.GetPageManager();
                pageManager.Search(SearchPagePayloadContentHelper.CreateDefault(SearchTarget.Tag, content.Tag));
            }
            else if (parameter is Interfaces.IFeedGroup)
            {
                var content     = parameter as Interfaces.IFeedGroup;
                var pageManager = HohoemaCommnadHelper.GetPageManager();
                pageManager.OpenPage(Models.HohoemaPageType.FeedVideoList, content.Id);
            }
            else if (parameter is Interfaces.ISearchHistory)
            {
                var history     = parameter as Interfaces.ISearchHistory;
                var pageManager = HohoemaCommnadHelper.GetPageManager();
                pageManager.Search(SearchPagePayloadContentHelper.CreateDefault(history.Target, history.Keyword));
            }
            else if (parameter is Interfaces.IChannel)
            {
                var channel     = parameter as Interfaces.IChannel;
                var pageManager = HohoemaCommnadHelper.GetPageManager();
                pageManager.OpenPage(HohoemaPageType.ChannelVideo, channel.Id);
            }


            if (isPlayerShowWithSmallMode)
            {
                var playlist = HohoemaCommnadHelper.GetHohoemaPlaylist();
                if (playlist.IsDisplayMainViewPlayer)
                {
                    playlist.PlayerDisplayType = PlayerDisplayType.PrimaryWithSmall;
                }
            }
            // TODO: マイリストやユーザーIDを開けるように
        }