Exemplo n.º 1
0
 public void NewCategoryAdded(BlogPostCategory category)
 {
 }
        public void CopyFrom(TemporaryBlogSettings sourceSettings)
        {
            // simple members
            _id                   = sourceSettings._id;
            _switchToWeblog       = sourceSettings._switchToWeblog;
            _isNewWeblog          = sourceSettings._isNewWeblog;
            _savePassword         = sourceSettings._savePassword;
            _isSpacesBlog         = sourceSettings._isSpacesBlog;
            _isSharePointBlog     = sourceSettings._isSharePointBlog;
            _isGoogleBloggerBlog  = sourceSettings._isGoogleBloggerBlog;
            _isStaticSiteBlog     = sourceSettings._isStaticSiteBlog;
            _hostBlogId           = sourceSettings._hostBlogId;
            _blogName             = sourceSettings._blogName;
            _homePageUrl          = sourceSettings._homePageUrl;
            _manifestDownloadInfo = sourceSettings._manifestDownloadInfo;
            _providerId           = sourceSettings._providerId;
            _serviceName          = sourceSettings._serviceName;
            _clientType           = sourceSettings._clientType;
            _postApiUrl           = sourceSettings._postApiUrl;
            _lastPublishFailed    = sourceSettings._lastPublishFailed;
            _fileUploadSupport    = sourceSettings._fileUploadSupport;
            _instrumentationOptIn = sourceSettings._instrumentationOptIn;

            if (sourceSettings._availableImageEndpoints == null)
            {
                _availableImageEndpoints = null;
            }
            else
            {
                // Good thing BlogInfo is immutable!
                _availableImageEndpoints = (BlogInfo[])sourceSettings._availableImageEndpoints.Clone();
            }

            // credentials
            BlogCredentialsHelper.Copy(sourceSettings._credentials, _credentials);

            // template files
            _templateFiles = new BlogEditingTemplateFile[sourceSettings._templateFiles.Length];
            for (int i = 0; i < sourceSettings._templateFiles.Length; i++)
            {
                BlogEditingTemplateFile sourceFile = sourceSettings._templateFiles[i];
                _templateFiles[i] = new BlogEditingTemplateFile(sourceFile.TemplateType, sourceFile.TemplateFile);
            }

            // option overrides
            if (sourceSettings._optionOverrides != null)
            {
                _optionOverrides.Clear();
                foreach (DictionaryEntry entry in sourceSettings._optionOverrides)
                {
                    _optionOverrides.Add(entry.Key, entry.Value);
                }
            }

            // user option overrides
            if (sourceSettings._userOptionOverrides != null)
            {
                _userOptionOverrides.Clear();
                foreach (DictionaryEntry entry in sourceSettings._userOptionOverrides)
                {
                    _userOptionOverrides.Add(entry.Key, entry.Value);
                }
            }

            // homepage overrides
            if (sourceSettings._homepageOptionOverrides != null)
            {
                _homepageOptionOverrides.Clear();
                foreach (DictionaryEntry entry in sourceSettings._homepageOptionOverrides)
                {
                    _homepageOptionOverrides.Add(entry.Key, entry.Value);
                }
            }

            // categories
            if (sourceSettings._categories != null)
            {
                _categories = new BlogPostCategory[sourceSettings._categories.Length];
                for (int i = 0; i < sourceSettings._categories.Length; i++)
                {
                    BlogPostCategory sourceCategory = sourceSettings._categories[i];
                    _categories[i] = sourceCategory.Clone() as BlogPostCategory;
                }
            }
            else
            {
                _categories = null;
            }

            if (sourceSettings._keywords != null)
            {
                _keywords = new BlogPostKeyword[sourceSettings._keywords.Length];
                for (int i = 0; i < sourceSettings._keywords.Length; i++)
                {
                    BlogPostKeyword sourceKeyword = sourceSettings._keywords[i];
                    _keywords[i] = sourceKeyword.Clone() as BlogPostKeyword;
                }
            }
            else
            {
                _keywords = null;
            }

            // authors and pages
            _authors = sourceSettings._authors.Clone() as AuthorInfo[];
            _pages   = sourceSettings._pages.Clone() as PageInfo[];

            // buttons
            if (sourceSettings._buttonDescriptions != null)
            {
                _buttonDescriptions = new BlogProviderButtonDescription[sourceSettings._buttonDescriptions.Length];
                for (int i = 0; i < sourceSettings._buttonDescriptions.Length; i++)
                {
                    _buttonDescriptions[i] = sourceSettings._buttonDescriptions[i].Clone() as BlogProviderButtonDescription;
                }
            }
            else
            {
                _buttonDescriptions = null;
            }

            // favicon
            _favIcon = sourceSettings._favIcon;

            // images
            _image          = sourceSettings._image;
            _watermarkImage = sourceSettings._watermarkImage;

            // host blogs
            _hostBlogs = new BlogInfo[sourceSettings._hostBlogs.Length];
            for (int i = 0; i < sourceSettings._hostBlogs.Length; i++)
            {
                BlogInfo sourceBlog = sourceSettings._hostBlogs[i];
                _hostBlogs[i] = new BlogInfo(sourceBlog.Id, sourceBlog.Name, sourceBlog.HomepageUrl);
            }

            // file upload settings
            _fileUploadSettings = sourceSettings._fileUploadSettings.Clone() as TemporaryFileUploadSettings;

            _pluginSettings = new SettingsPersisterHelper(new MemorySettingsPersister());
            _pluginSettings.CopyFrom(sourceSettings._pluginSettings, true, true);
        }
Exemplo n.º 3
0
        public void AddCategory(BlogPostCategory category)
        {
            XmlElement catEl = _atomVer.CreateCategoryElement(_entryNode.OwnerDocument, category.Id, _categoryScheme, category.Name);

            _entryNode.AppendChild(catEl);
        }
Exemplo n.º 4
0
 public ParentCategoryComboItem(ComboBox parentCombo, BlogPostCategory category, int indentLevel)
 {
     _parentCombo = parentCombo;
     _category    = category;
     _indentLevel = indentLevel;
 }
Exemplo n.º 5
0
 public void NewCategoryAdded(BlogPostCategory category)
 {
     controller.NewCategoryAdded(category);
 }
 public virtual string AddCategory(string blogId, BlogPostCategory category)
 {
     throw new BlogClientMethodUnsupportedException("AddCategory");
 }
Exemplo n.º 7
0
 void INewCategoryContext.NewCategoryAdded(BlogPostCategory category)
 {
     _categoryContext.CommitNewCategory(category);
     _isDirty = false;
 }
Exemplo n.º 8
0
 void INewCategoryContext.NewCategoryAdded(BlogPostCategory newCategory)
 {
     (_postPropertyEditor as INewCategoryContext).NewCategoryAdded(newCategory);
 }
Exemplo n.º 9
0
 public BlogPostCategoryListItem(BlogPostCategory category, int indentLevel, ArrayList children)
 {
     _category    = category;
     _indentLevel = indentLevel;
     _children    = children;
 }
Exemplo n.º 10
0
 public BlogPostCategoryListItem(BlogPostCategory category, int indentLevel)
     : this(category, indentLevel, new ArrayList())
 {
 }
 public CategoryRadioSelectorControl(BlogPostCategory category) : base()
 {
     FlatStyle = FlatStyle.System;
     _category = category;
 }
Exemplo n.º 12
0
 public void NewCategoryAdded(BlogPostCategory category)
 {
 }