Exemplo n.º 1
0
        /// <summary>
        /// Loads needed settings from their repository.
        /// </summary>
        private void LoadSettings()
        {
            //Load the player.
            thePlayer = MediaPlayer.GetForModule(ModuleId);
            if (thePlayer == null)
            {
                thePlayer            = new MediaPlayer();
                thePlayer.ModuleGuid = ModuleGuid;
                thePlayer.ModuleId   = ModuleId;
                thePlayer.PlayerType = MediaType.Audio;
                if (IsEditable)
                {
                    SiteUser currentUser = SiteUtils.GetCurrentSiteUser();
                    if (currentUser != null)
                    {
                        thePlayer.UserGuid = currentUser.UserGuid;
                        MediaPlayer.Add(thePlayer);
                    }
                }
            }

            config = new AudioPlayerConfiguration(Settings);

            if (config.DisableShuffle)
            {
                ShuffleControl.Visible    = false;
                ShuffleOffControl.Visible = false;
            }

            if (config.InstanceCssClass.Length > 0)
            {
                pnlOuterWrap.SetOrAppendCss(config.InstanceCssClass);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads needed settings from their repository.
        /// </summary>
        private void LoadSettings()
        {
            //Load the player.
            thePlayer = MediaPlayer.GetForModule(ModuleId);
            if (thePlayer == null)
            {
                thePlayer = new MediaPlayer();
                thePlayer.ModuleGuid = ModuleGuid;
                thePlayer.ModuleId = ModuleId;
                thePlayer.PlayerType = MediaType.Audio;
                if (IsEditable)
                {
                    SiteUser currentUser = SiteUtils.GetCurrentSiteUser();
                    if (currentUser != null)
                    {
                        thePlayer.UserGuid = currentUser.UserGuid;
                        MediaPlayer.Add(thePlayer);
                    }
                }
            }

            config = new AudioPlayerConfiguration(Settings);

            if (config.DisableShuffle)
            {
                ShuffleControl.Visible = false;
                ShuffleOffControl.Visible = false;
            }

            if (config.InstanceCssClass.Length > 0)
            {
                pnlOuterWrap.SetOrAppendCss(config.InstanceCssClass);
            }
        }