Example #1
0
        public void Update()
        {
            MediaNavigationModel model          = MediaNavigationModel.GetCurrentInstance();
            NavigationData       navigationData = model.NavigationData;

            if (navigationData == null)
            {
                return;
            }

            LayoutType = navigationData.LayoutType;
            LayoutSize = navigationData.LayoutSize;
        }
Example #2
0
        protected void SetViewMode(LayoutType layoutType, LayoutSize layoutSize)
        {
            LayoutType = layoutType;
            LayoutSize = layoutSize;

            MediaNavigationModel model          = MediaNavigationModel.GetCurrentInstance();
            NavigationData       navigationData = model.NavigationData;

            if (navigationData == null)
            {
                return;
            }

            navigationData.LayoutType = layoutType;
            navigationData.LayoutSize = layoutSize;
        }
Example #3
0
        /// <summary>
        /// Adds the current view to the playlist of the current player.
        /// </summary>
        /// <remarks>
        /// This action can be called from outside when there is an enabled navigation data present (<see cref="IsNavigationDataEnabled"/>.
        /// </remarks>
        public static void AddCurrentViewToPlaylist()
        {
            MediaNavigationModel model          = GetCurrentInstance();
            NavigationData       navigationData = model.NavigationData;

            if (navigationData == null || !navigationData.IsEnabled)
            {
                ServiceRegistration.Get <ILogger>().Error("MediaNavigationModel.AddCurrentViewToPlaylist: No enabled navigation data present");
                return;
            }
            if (navigationData.CurrentScreenData.IsItemsEmpty)
            {
                ServiceRegistration.Get <IDialogManager>().ShowDialog(Consts.RES_NO_ITEMS_TO_ADD_HEADER, Consts.RES_NO_ITEMS_TO_ADD_TEXT, DialogType.OkDialog, false, DialogButtonType.Ok);
                return;
            }
            model.AddCurrentViewToPlaylistInternal();
        }
        protected NavigationData GetCurrentNavigationData()
        {
            IWorkflowManager workflowManager = ServiceRegistration.Get <IWorkflowManager>();

            return(MediaNavigationModel.GetNavigationData(workflowManager.CurrentNavigationContext, false));
        }