示例#1
0
        EditorPartCollection IWebEditable.CreateEditorParts()
        {
            List <EditorPart>     editors    = new List <EditorPart>();
            MediaPlayerEditorPart editorPart = new MediaPlayerEditorPart();

            editorPart.ID = this.ID + "_editorPart";
            Hashtable hs     = new Hashtable();
            int       result = LoginEntity.LoadConfiguration(SPContext.Current.Web.CurrentUser.LoginName, ref hs);

            if (result == 1)
            {
                if (hs != null)
                {
                    if (hs.Contains("APIKey"))
                    {
                        editorPart.APIKey = hs["APIKey"].ToString();
                    }
                    if (hs.Contains("SecretKey"))
                    {
                        editorPart.SecretKey = hs["SecretKey"].ToString();
                    }
                }
                editors.Add(editorPart);
                return(new EditorPartCollection(editors));
            }
            else
            {
                return(null);
            }
        }
 EditorPartCollection IWebEditable.CreateEditorParts()
 {
     List<EditorPart> editors = new List<EditorPart>();
     MediaPlayerEditorPart editorPart = new MediaPlayerEditorPart();
     editorPart.ID = this.ID + "_editorPart";
     Hashtable hs = new Hashtable();
     int result = LoginEntity.LoadConfiguration(SPContext.Current.Web.CurrentUser.LoginName, ref hs);
     if (result == 1)
     {
         if (hs != null)
         {
             if (hs.Contains("APIKey"))
             {
                 editorPart.APIKey = hs["APIKey"].ToString();
             }
             if (hs.Contains("SecretKey"))
             {
                 editorPart.SecretKey = hs["SecretKey"].ToString();
             }
         }
         editors.Add(editorPart);
         return new EditorPartCollection(editors);
     }
     else
     {
         return null;
     }
 }