예제 #1
0
        public override void SyncChanges()
        {
            EnsureChildControls();

            string _ascxPathAPI            = @"~/_CONTROLTEMPLATES/OoyalaPlugin/AssetsDetailsView/AssetsDetailsViewUserControl.ascx";
            APISettingsUserControl control = (APISettingsUserControl)Page.LoadControl(_ascxPathAPI);

            if (control != null)
            {
            }
        }
예제 #2
0
        protected override void CreateChildControls()
        {
            Hashtable hs     = new Hashtable();
            int       result = LoginEntity.LoadConfiguration(SPContext.Current.Web.CurrentUser.LoginName, ref hs);

            if (result == 1)
            {
                AssetsDetailsViewUserControl control = (AssetsDetailsViewUserControl)Page.LoadControl(_ascxPath);
                control.PageLimit          = WP_PageSize;
                control.ShowSearch         = WP_ShowSearch;
                control.ShowCustomMetadata = WP_ShowCustomMetadata;
                control.ShowLabels         = WP_ShowLabels;
                control.AllowDelete        = WP_AllowDelete;
                control.AllowEdit          = WP_AllowEdit;
                if (hs != null)
                {
                    if (hs.Contains("APIKey"))
                    {
                        control.APIKey = hs["APIKey"].ToString();
                    }
                    if (hs.Contains("SecretKey"))
                    {
                        control.SecretKey = hs["SecretKey"].ToString();
                    }
                }
                Controls.Add(control);
            }
            else
            {
                string _ascxPathAPI            = @"~/_CONTROLTEMPLATES/OoyalaPlugin.WP_API_Settings/APISettings/APISettingsUserControl.ascx";
                APISettingsUserControl control = (APISettingsUserControl)Page.LoadControl(_ascxPathAPI);
                if (hs != null)
                {
                    if (hs.Contains("APIKey"))
                    {
                        control.APIKey = hs["APIKey"].ToString();
                    }
                    if (hs.Contains("SecretKey"))
                    {
                        control.SecretKey = hs["SecretKey"].ToString();
                    }
                    if (hs.Contains("PartnerCode"))
                    {
                        control.PartnerCode = hs["PartnerCode"].ToString();
                    }
                }
                control.APIErrorMessage = "API Settings are not configured properly";
                Controls.Add(control);
                return;
            }
        }
예제 #3
0
        protected override void CreateChildControls()
        {
            Hashtable hs     = new Hashtable();
            int       result = LoginEntity.LoadConfiguration(SPContext.Current.Web.CurrentUser.LoginName, ref hs);

            if (result == 1)
            {
                MediaPlayerSettingsUserControl control = (MediaPlayerSettingsUserControl)Page.LoadControl(_ascxPath);
                control.IsAllowAdd    = WP_AllowAddNew;
                control.IsAllowDelete = WP_AllowDelete;
                control.IsAllowUpdate = WP_AllowEdit;
                if (hs != null)
                {
                    if (hs.Contains("APIKey"))
                    {
                        control.APIKey = hs["APIKey"].ToString();
                    }
                    if (hs.Contains("SecretKey"))
                    {
                        control.SecretKey = hs["SecretKey"].ToString();
                    }
                }
                Controls.Add(control);
            }
            else
            {
                string _ascxPathAPI            = @"~/_CONTROLTEMPLATES/OoyalaPlugin.WP_API_Settings/APISettings/APISettingsUserControl.ascx";
                APISettingsUserControl control = (APISettingsUserControl)Page.LoadControl(_ascxPathAPI);
                if (hs != null)
                {
                    if (hs.Contains("APIKey"))
                    {
                        control.APIKey = hs["APIKey"].ToString();
                    }
                    if (hs.Contains("SecretKey"))
                    {
                        control.SecretKey = hs["SecretKey"].ToString();
                    }
                    if (hs.Contains("PartnerCode"))
                    {
                        control.PartnerCode = hs["PartnerCode"].ToString();
                    }
                }
                control.APIErrorMessage = "API Settings are not configured properly";
                Controls.Add(control);
                return;
            }
        }
예제 #4
0
        protected override void CreateChildControls()
        {
            Hashtable hs     = new Hashtable();
            int       result = LoginEntity.LoadConfiguration(SPContext.Current.Web.CurrentUser.LoginName, ref hs);

            if (result != 1)
            {
                string _ascxPathAPI            = @"~/_CONTROLTEMPLATES/OoyalaPlugin.WP_API_Settings/APISettings/APISettingsUserControl.ascx";
                APISettingsUserControl control = (APISettingsUserControl)Page.LoadControl(_ascxPathAPI);
                if (hs != null)
                {
                    if (hs.Contains("APIKey"))
                    {
                        APIKey         = hs["APIKey"].ToString();
                        control.APIKey = APIKey;
                    }
                    if (hs.Contains("SecretKey"))
                    {
                        SecretKey         = hs["SecretKey"].ToString();
                        control.SecretKey = SecretKey;
                    }
                    if (hs.Contains("PartnerCode"))
                    {
                        control.PartnerCode = hs["PartnerCode"].ToString();
                    }
                }
                control.APIErrorMessage = "API Settings are not configured properly";
                Controls.Add(control);
                return;
            }

            if (!string.IsNullOrEmpty(this.EmbedCode))
            {
                StringBuilder scriptTagBuilder = new StringBuilder();
                scriptTagBuilder.Append("<script src=\"https://player.ooyala.com/player.js?embedCode=");
                scriptTagBuilder.Append(this.EmbedCode);
                scriptTagBuilder.AppendFormat("&alwaysShowScrubber={0}", (this.AlwaysShowScrubber ? "true" : "false"));
                scriptTagBuilder.AppendFormat("&autoplay={0}", (this.Autoplay ? 1 : 0));
                scriptTagBuilder.AppendFormat("&loop={0}", (this.Replay ? 1 : 0));
                if (!string.IsNullOrEmpty(this.PlayerID))
                {
                    scriptTagBuilder.AppendFormat("&playerId={0}", this.PlayerID);
                }
                scriptTagBuilder.Append("&width=675\"></script>");
                this.Controls.Add(new LiteralControl(scriptTagBuilder.ToString()));
            }
        }