Ejemplo n.º 1
0
        public IGalleryCommand AddGalleryCommand(string id)
        {
            var cmd = new GalleryCommand();

            commands.Add(id, cmd);
            return(cmd);
        }
Ejemplo n.º 2
0
 public IGalleryCommand AddGalleryCommand(string id)
 {
     var cmd = new GalleryCommand();
     commands.Add(id, cmd);
     return cmd;
 }
        private void InitializeEditingManager()
        {
            _editingManager = new BlogPostEditingManager(
                this,
                new IBlogPostEditor[] { _htmlEditor, this },
                _htmlEditor
                );

            commandPluginsGallery = (GalleryCommand<string>)CommandManager.Get(CommandId.PluginsGallery);
            commandPluginsGallery.StateChanged += new EventHandler(commandPluginsGallery_StateChanged);
            _editingManager.BlogChanged += new EventHandler(_editingManager_BlogChanged);
            _editingManager.BlogSettingsChanged += new WeblogSettingsChangedHandler(_editingManager_BlogSettingsChanged);
            _editingManager.EditingStatusChanged += new EventHandler(_editingManager_EditingStatusChanged);
            _editingManager.UserSavedPost += new EventHandler(_editingManager_UserSavedPost);
            _editingManager.UserPublishedPost += new EventHandler(_editingManager_UserPublishedPost);
            _editingManager.UserDeletedPost += new EventHandler(_editingManager_UserDeletedPost);

            // initialize auto-save timer
            _autoSaveTimer = new System.Windows.Forms.Timer(this.components);
            _autoSaveTimer.Interval = 5000;
            _autoSaveTimer.Tick += new EventHandler(_autoSaveTimer_Tick);

            _autoSaveMessageDismissTimer = new Timer(components);
            _autoSaveMessageDismissTimer.Interval = 450;
            _autoSaveMessageDismissTimer.Tick += _autoSaveMessageDismissTimer_Tick;
        }