private void ShowSingleChannelGuide(IChannel channel)
        {
            if (channel == null || CurrentChannelGroup == null)
            {
                return;
            }

            int channelId = channel.ChannelId;
            int groupId   = CurrentChannelGroup.ChannelGroupId;
            IWorkflowManager        workflowManager         = ServiceRegistration.Get <IWorkflowManager>();
            NavigationContextConfig navigationContextConfig = new NavigationContextConfig();

            navigationContextConfig.AdditionalContextVariables = new Dictionary <string, object>();
            navigationContextConfig.AdditionalContextVariables[SlimTvClientModel.KEY_CHANNEL_ID] = channelId;
            navigationContextConfig.AdditionalContextVariables[SlimTvClientModel.KEY_GROUP_ID]   = groupId;
            Guid stateId = new Guid("A40F05BB-022E-4247-8BEE-16EB3E0B39C5");

            if (workflowManager.IsAnyStateContainedInNavigationStack(new Guid[] { stateId }))
            {
                workflowManager.NavigatePopToState(stateId, false);
            }
            else
            {
                workflowManager.NavigatePush(stateId, navigationContextConfig);
            }
        }
Ejemplo n.º 2
0
        protected override void Update()
        {
            base.Update();
            IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();

            // Playlists should appear only inside home and all derived media browsing models
            _insideMedia = workflowManager.CurrentNavigationContext.WorkflowState.StateId == WF_HOME_ID ||
                           workflowManager.IsAnyStateContainedInNavigationStack(Consts.WF_STATE_IDS_MEDIA_ROOTS) &&
                           MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false) != null;
        }
        protected override void Update()
        {
            base.Update();
            IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();

            _displayTitle = LocalizationHelper.CreateResourceString(workflowManager.IsStateContainedInNavigationStack(Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT) ?
                                                                    Consts.RES_SWITCH_TO_BROWSE_ML_VIEW : Consts.RES_SWITCH_TO_LOCAL_MEDIA_VIEW);
            _isInBrowseState = workflowManager.IsAnyStateContainedInNavigationStack(new Guid[]
            {
                Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT,
                Consts.WF_STATE_ID_BROWSE_MEDIA_NAVIGATION_ROOT,
            }) && MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false) != null;
        }
Ejemplo n.º 4
0
        private static void Show(NavigationContextConfig context)
        {
            IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();
            Guid             stateId         = new Guid("3C6081CB-88DC-44A7-9E17-8D7BFE006EE5");

            if (workflowManager.IsAnyStateContainedInNavigationStack(new Guid[] { stateId }))
            {
                workflowManager.NavigatePopToState(stateId, false);
            }
            else
            {
                workflowManager.NavigatePush(stateId, context);
            }
        }
        protected override void Update()
        {
            base.Update();
            bool   isBrowseMode;
            string screenName;
            Guid   currentWorkflowState;

            if (!GetRootState(out screenName, out isBrowseMode, out currentWorkflowState))
            {
                _notInBrowsing = false;
                return;
            }

            IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();

            _displayTitle  = LocalizationHelper.CreateResourceString(isBrowseMode ? Consts.RES_SWITCH_TO_MEDIALIBRARY_VIEW : Consts.RES_SWITCH_TO_BROWSE_SHARE_VIEW);
            _notInBrowsing = !workflowManager.IsAnyStateContainedInNavigationStack(new Guid[]
            {
                Consts.WF_STATE_ID_LOCAL_MEDIA_NAVIGATION_ROOT,
                Consts.WF_STATE_ID_BROWSE_MEDIA_NAVIGATION_ROOT,
            }) && MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false) != null;
        }