예제 #1
0
 private static void AddItems(CommandBarEntryCollection entries, object[] items)
 {
     foreach (object item in items)
     {
         if (item is string || item is CommandId)
         {
             string commandIdentifier = item.ToString();
             if (commandIdentifier == "-")
             {
                 entries.Add(new CommandBarSeparatorEntry());
             }
             else if (commandIdentifier == " ")
             {
                 entries.Add(new CommandBarSpacerEntry());
             }
             else
             {
                 CommandBarButtonEntry cbbe = new CommandBarButtonEntry();
                 cbbe.CommandIdentifier = commandIdentifier;
                 entries.Add(cbbe);
             }
         }
         else if (item is CommandBarEntry)
         {
             entries.Add((CommandBarEntry)item);
         }
         else
         {
             Trace.Fail("Unexpected command bar definition item");
             throw new ArgumentException("Unexpected command bar definition item");
         }
     }
 }
예제 #2
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.commandBarButtonEntryPostAndPublish = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
     this.commandBarButtonEntrySavePost       = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
     this.commandBarButtonEntryNewPost        = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
     this.commandBarButtonEntryOpenPost       = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
     this.commandBarButtonEntryWeblogMenu     = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
     this.commandBarSeparatorEntry3           = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
     this.commandBarSeparatorEntry4           = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
     this.commandBarButtonEntryHtmlView       = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
     //
     // commandBarButtonEntryPostAndPublish
     //
     this.commandBarButtonEntryPostAndPublish.CommandIdentifier = "OpenLiveWriter.PostAndPublish";
     //
     // commandBarButtonEntrySavePost
     //
     this.commandBarButtonEntrySavePost.CommandIdentifier = "OpenLiveWriter.PostEditor.SavePost";
     //
     // commandBarButtonEntryNewPost
     //
     this.commandBarButtonEntryNewPost.CommandIdentifier = "OpenLiveWriter.PostEditor.NewPost";
     //
     // commandBarButtonEntryOpenPost
     //
     this.commandBarButtonEntryOpenPost.CommandIdentifier = "OpenLiveWriter.PostEditor.OpenPost";
     //
     // commandBarButtonEntryWeblogMenu
     //
     this.commandBarButtonEntryWeblogMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.WeblogMenu";
     //
     // commandBarButtonEntryHtmlView
     //
     this.commandBarButtonEntryHtmlView.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.HtmlViewMenu";
     //
     // PostEditorFormCommandBarDefinition
     //
     this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
         this.commandBarButtonEntryNewPost,
         //this.commandBarSeparatorEntry1,
         this.commandBarButtonEntryOpenPost,
         //this.commandBarSeparatorEntry2,
         this.commandBarButtonEntrySavePost,
         this.commandBarSeparatorEntry3,
         this.commandBarButtonEntryHtmlView,
         this.commandBarSeparatorEntry4,
         this.commandBarButtonEntryPostAndPublish
     });
     this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
         this.commandBarButtonEntryWeblogMenu
     });
 }
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.commandBarButtonEntryPostAndPublish = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntrySavePost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryNewPost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryOpenPost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryWeblogMenu = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry3 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarSeparatorEntry4 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarButtonEntryHtmlView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            //
            // commandBarButtonEntryPostAndPublish
            //
            this.commandBarButtonEntryPostAndPublish.CommandIdentifier = "OpenLiveWriter.PostAndPublish";
            //
            // commandBarButtonEntrySavePost
            //
            this.commandBarButtonEntrySavePost.CommandIdentifier = "OpenLiveWriter.PostEditor.SavePost";
            //
            // commandBarButtonEntryNewPost
            //
            this.commandBarButtonEntryNewPost.CommandIdentifier = "OpenLiveWriter.PostEditor.NewPost";
            //
            // commandBarButtonEntryOpenPost
            //
            this.commandBarButtonEntryOpenPost.CommandIdentifier = "OpenLiveWriter.PostEditor.OpenPost";
            //
            // commandBarButtonEntryWeblogMenu
            //
            this.commandBarButtonEntryWeblogMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.WeblogMenu";
            //
            // commandBarButtonEntryHtmlView
            //
            this.commandBarButtonEntryHtmlView.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.HtmlViewMenu";
            //
            // PostEditorFormCommandBarDefinition
            //
            this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
                                                                                                                  this.commandBarButtonEntryNewPost,
                                                                                                                  //this.commandBarSeparatorEntry1,
                                                                                                                  this.commandBarButtonEntryOpenPost,
                                                                                                                  //this.commandBarSeparatorEntry2,
                                                                                                                  this.commandBarButtonEntrySavePost,
                                                                                                                  this.commandBarSeparatorEntry3,
                                                                                                                  this.commandBarButtonEntryHtmlView,
                                                                                                                  this.commandBarSeparatorEntry4,
                                                                                                                  this.commandBarButtonEntryPostAndPublish});
            this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
                                                                                                                   this.commandBarButtonEntryWeblogMenu});

        }
예제 #4
0
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.commandBarButtonEntryBold       = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryItalic     = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryUnderline  = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry1       = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarButtonEntryBullets    = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryNumbers    = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryBlockquote = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry3       = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
//			this.commandBarButtonEntryFontColor = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryInsertLink = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryNormalView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryCodeView   = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
//			this.commandBarButtonEntryPostProperties = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry2 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarSeparatorEntry4 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarSeparatorEntry5 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
//			this.commandBarControlEntryCategories = new OpenLiveWriter.ApplicationFramework.CommandBarControlEntry(this.components);
            this.commandBarControlEntryStyle = new OpenLiveWriter.ApplicationFramework.CommandBarControlEntry(this.components);
//			this.commandBarButtonEntryInsertPicture = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryStrikethrough = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryRemoveLink    = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntrySpellCheck    = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
//			this.commandBarSeparatorEntry6 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarButtonEntryTableMenu = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry7      = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            //
            // commandBarButtonEntryBold
            //
            this.commandBarButtonEntryBold.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bold";
            //
            // commandBarButtonEntryItalic
            //
            this.commandBarButtonEntryItalic.CommandIdentifier = "MindShare.ApplicationCore.Commands.Italic";
            //
            // commandBarButtonEntryUnderline
            //
            this.commandBarButtonEntryUnderline.CommandIdentifier = "MindShare.ApplicationCore.Commands.Underline";
            //
            // commandBarButtonEntryBullets
            //
            this.commandBarButtonEntryBullets.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bullets";
            //
            // commandBarButtonEntryNumbers
            //
            this.commandBarButtonEntryNumbers.CommandIdentifier = "MindShare.ApplicationCore.Commands.Numbers";
            //
            // commandBarButtonEntryBlockquote
            //
            this.commandBarButtonEntryBlockquote.CommandIdentifier = "MindShare.ApplicationCore.Commands.Blockquote";
            //
            // commandBarButtonEntryFontColor
            //
//			this.commandBarButtonEntryFontColor.CommandIdentifier = "MindShare.ApplicationCore.Commands.FontColor";
            //
            // commandBarButtonEntryInsertLink
            //
            this.commandBarButtonEntryInsertLink.CommandIdentifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
            //
            // commandBarButtonEntryNormalView
            //
            this.commandBarButtonEntryNormalView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewNormal";
            //
            // commandBarButtonEntryCodeView
            //
            this.commandBarButtonEntryCodeView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewCode";
            //
            // commandBarButtonEntryPostProperties
            //
//			this.commandBarButtonEntryPostProperties.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostProperties";
            //
            // commandBarControlEntryCategories
            //
//			this.commandBarControlEntryCategories.Control = null;
            //
            // commandBarControlEntryStyle
            //
            this.commandBarControlEntryStyle.Control = null;
            //
            // commandBarButtonEntryInsertPicture
            //
//			this.commandBarButtonEntryInsertPicture.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertPicture";
            //
            // commandBarButtonEntryStrikethrough
            //
            this.commandBarButtonEntryStrikethrough.CommandIdentifier = "MindShare.ApplicationCore.Commands.Strikethrough";
            //
            // commandBarButtonEntryRemoveLink
            //
            this.commandBarButtonEntryRemoveLink.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandRemoveLink";
            //
            // commandBarButtonEntrySpellCheck
            //
            this.commandBarButtonEntrySpellCheck.CommandIdentifier = "MindShare.ApplicationCore.Commands.CheckSpelling";
            //
            // commandBarButtonEntryTableMenu
            //
            this.commandBarButtonEntryTableMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableMenu";
            //
            // PostEditorFormCommandBarDefinition2
            //
            this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
                this.commandBarControlEntryStyle,
                this.commandBarButtonEntryBold,
                this.commandBarButtonEntryItalic,
                this.commandBarButtonEntryUnderline,
                this.commandBarButtonEntryStrikethrough,
//																												  this.commandBarButtonEntryFontColor,
                this.commandBarSeparatorEntry1,
                this.commandBarButtonEntryNumbers,
                this.commandBarButtonEntryBullets,
                this.commandBarSeparatorEntry2,
                this.commandBarButtonEntryBlockquote,
                this.commandBarSeparatorEntry3,
                this.commandBarButtonEntryInsertLink,
                this.commandBarButtonEntryRemoveLink,
//																												  this.commandBarButtonEntryInsertPicture,
                this.commandBarSeparatorEntry7,
                this.commandBarButtonEntryTableMenu,
                this.commandBarSeparatorEntry5,
                this.commandBarButtonEntrySpellCheck,
//																												  this.commandBarSeparatorEntry6,
//																												  this.commandBarButtonEntryPostProperties,
            });

/*
 *                      this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
 *                                                                                                                                                                                                                                 this.commandBarControlEntryCategories});
 */
        }
        private void InitializeToolbar()
        {
            commandBarButtonEntryAddMenu = new CommandBarButtonEntry(components);
            commandBarButtonEntryAddMenu.CommandIdentifier = commandAddMenu.Identifier;

            commandBarButtonEntryRemoveMenu = new CommandBarButtonEntry(components);
            commandBarButtonEntryRemoveMenu.CommandIdentifier = commandImageRemove.Identifier;

            commandBarLabel = new CommandBarLabelEntry(components);
            commandBarLabel.Text = Res.Get(StringId.ImgSBEffectsLabel);

            commandBarDefinition = new CommandBarDefinition(components);
            commandBarDefinition.RightCommandBarEntries.Add(commandBarButtonEntryAddMenu);
            commandBarDefinition.RightCommandBarEntries.Add(commandBarButtonEntryRemoveMenu);

            commandBarDefinition.LeftCommandBarEntries.Add(commandBarLabel);

            commandBarLightweightControl = new ImageDecoratorsCommandBarLightweightControl(components);
            commandBarLightweightControl.LightweightControlContainerControl = this;

            commandAddMenu.CommandBarButtonContextMenuDefinition = addCommandContextMenuDefinition;

            commandBarLightweightControl.CommandManager = _decoratorsManager.CommandManager;
            commandBarLightweightControl.CommandBarDefinition = commandBarDefinition;

            InitFocusAndAccessibility();
        }
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.listViewDecoratorsTable = new System.Windows.Forms.ListView();
            this.columnHeaderDecorators = new System.Windows.Forms.ColumnHeader();
            this.commandBarButtonEntryAdd = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            //
            // listViewDecoratorsTable
            //
            this.listViewDecoratorsTable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.listViewDecoratorsTable.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                                                                                                      this.columnHeaderDecorators});
            this.listViewDecoratorsTable.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
            this.listViewDecoratorsTable.HideSelection = false;
            this.listViewDecoratorsTable.Location = new System.Drawing.Point(0, 25);
            this.listViewDecoratorsTable.MultiSelect = false;
            this.listViewDecoratorsTable.Name = "listViewDecoratorsTable";
            this.listViewDecoratorsTable.RightToLeftLayout = BidiHelper.IsRightToLeft;
            this.listViewDecoratorsTable.Size = new System.Drawing.Size(156, 75);
            this.listViewDecoratorsTable.TabIndex = 0;
            this.listViewDecoratorsTable.View = System.Windows.Forms.View.Details;
            this.listViewDecoratorsTable.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewDecoratorsTable_KeyDown);
            this.listViewDecoratorsTable.SelectedIndexChanged += new System.EventHandler(this.listViewDecoratorsTable_SelectedIndexChanged);
            //
            // columnHeaderDecorators
            //
            this.columnHeaderDecorators.Text = "Effect";
            this.columnHeaderDecorators.Width = 135;
            //
            // commandBarButtonEntryAdd
            //
            this.commandBarButtonEntryAdd.CommandIdentifier = "AddDecorator";
            //
            // ImageDecoratorsControl
            //
            this.Controls.Add(this.listViewDecoratorsTable);
            this.Name = "ImageDecoratorsControl";
            this.Size = new System.Drawing.Size(156, 108);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);

        }
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.commandBarButtonEntryBold = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryItalic = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryUnderline = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry1 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarButtonEntryBullets = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryNumbers = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryBlockquote = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry3 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
//			this.commandBarButtonEntryFontColor = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryInsertLink = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryNormalView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryCodeView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
//			this.commandBarButtonEntryPostProperties = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry2 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarSeparatorEntry4 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarSeparatorEntry5 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
//			this.commandBarControlEntryCategories = new OpenLiveWriter.ApplicationFramework.CommandBarControlEntry(this.components);
            this.commandBarControlEntryStyle = new OpenLiveWriter.ApplicationFramework.CommandBarControlEntry(this.components);
//			this.commandBarButtonEntryInsertPicture = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryStrikethrough = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntryRemoveLink = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarButtonEntrySpellCheck = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
//			this.commandBarSeparatorEntry6 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            this.commandBarButtonEntryTableMenu = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
            this.commandBarSeparatorEntry7 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
            //
            // commandBarButtonEntryBold
            //
            this.commandBarButtonEntryBold.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bold";
            //
            // commandBarButtonEntryItalic
            //
            this.commandBarButtonEntryItalic.CommandIdentifier = "MindShare.ApplicationCore.Commands.Italic";
            //
            // commandBarButtonEntryUnderline
            //
            this.commandBarButtonEntryUnderline.CommandIdentifier = "MindShare.ApplicationCore.Commands.Underline";
            //
            // commandBarButtonEntryBullets
            //
            this.commandBarButtonEntryBullets.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bullets";
            //
            // commandBarButtonEntryNumbers
            //
            this.commandBarButtonEntryNumbers.CommandIdentifier = "MindShare.ApplicationCore.Commands.Numbers";
            //
            // commandBarButtonEntryBlockquote
            //
            this.commandBarButtonEntryBlockquote.CommandIdentifier = "MindShare.ApplicationCore.Commands.Blockquote";
            //
            // commandBarButtonEntryFontColor
            //
//			this.commandBarButtonEntryFontColor.CommandIdentifier = "MindShare.ApplicationCore.Commands.FontColor";
            //
            // commandBarButtonEntryInsertLink
            //
            this.commandBarButtonEntryInsertLink.CommandIdentifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
            //
            // commandBarButtonEntryNormalView
            //
            this.commandBarButtonEntryNormalView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewNormal";
            //
            // commandBarButtonEntryCodeView
            //
            this.commandBarButtonEntryCodeView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewCode";
            //
            // commandBarButtonEntryPostProperties
            //
//			this.commandBarButtonEntryPostProperties.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostProperties";
            //
            // commandBarControlEntryCategories
            //
//			this.commandBarControlEntryCategories.Control = null;
            //
            // commandBarControlEntryStyle
            //
            this.commandBarControlEntryStyle.Control = null;
            //
            // commandBarButtonEntryInsertPicture
            //
//			this.commandBarButtonEntryInsertPicture.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertPicture";
            //
            // commandBarButtonEntryStrikethrough
            //
            this.commandBarButtonEntryStrikethrough.CommandIdentifier = "MindShare.ApplicationCore.Commands.Strikethrough";
            //
            // commandBarButtonEntryRemoveLink
            //
            this.commandBarButtonEntryRemoveLink.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandRemoveLink";
            //
            // commandBarButtonEntrySpellCheck
            //
            this.commandBarButtonEntrySpellCheck.CommandIdentifier = "MindShare.ApplicationCore.Commands.CheckSpelling";
            //
            // commandBarButtonEntryTableMenu
            //
            this.commandBarButtonEntryTableMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableMenu";
            //
            // PostEditorFormCommandBarDefinition2
            //
            this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
                                                                                                                  this.commandBarControlEntryStyle,
                                                                                                                  this.commandBarButtonEntryBold,
                                                                                                                  this.commandBarButtonEntryItalic,
                                                                                                                  this.commandBarButtonEntryUnderline,
                                                                                                                  this.commandBarButtonEntryStrikethrough,
//																												  this.commandBarButtonEntryFontColor,
                                                                                                                  this.commandBarSeparatorEntry1,
                                                                                                                  this.commandBarButtonEntryNumbers,
                                                                                                                  this.commandBarButtonEntryBullets,
                                                                                                                  this.commandBarSeparatorEntry2,
                                                                                                                  this.commandBarButtonEntryBlockquote,
                                                                                                                  this.commandBarSeparatorEntry3,
                                                                                                                  this.commandBarButtonEntryInsertLink,
                                                                                                                  this.commandBarButtonEntryRemoveLink,
//																												  this.commandBarButtonEntryInsertPicture,
                                                                                                                  this.commandBarSeparatorEntry7,
                                                                                                                  this.commandBarButtonEntryTableMenu,
                                                                                                                  this.commandBarSeparatorEntry5,
                                                                                                                  this.commandBarButtonEntrySpellCheck,
//																												  this.commandBarSeparatorEntry6,
//																												  this.commandBarButtonEntryPostProperties,
                                                                                                              });
/*
            this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
                                                                                                                   this.commandBarControlEntryCategories});
*/

        }
        private void InitializeToolbar()
        {
            CommandBarButtonEntry commandBarButtonEntryImageBrightness = new CommandBarButtonEntry(components) ;
            commandBarButtonEntryImageBrightness.CommandIdentifier = commandImageBrightness.Identifier ;

            CommandBarButtonEntry commandBarButtonEntryImageRotate = new CommandBarButtonEntry(components) ;
            commandBarButtonEntryImageRotate.CommandIdentifier = commandImageRotate.Identifier ;

            CommandBarButtonEntry commandBarButtonEntryImageReset = new CommandBarButtonEntry(components) ;
            commandBarButtonEntryImageReset.CommandIdentifier = commandImageReset.Identifier ;

            CommandBarButtonEntry commandBarButtonEntryImageSaveDefaults = new CommandBarButtonEntry(components) ;
            commandBarButtonEntryImageSaveDefaults.CommandIdentifier = commandImageSaveDefaults.Identifier ;

            CommandBarDefinition commandBarDefinition = new CommandBarDefinition(components) ;
            commandBarDefinition.LeftCommandBarEntries.Add( commandBarButtonEntryImageRotate ) ;
            commandBarDefinition.LeftCommandBarEntries.Add( commandBarButtonEntryImageBrightness ) ;

            commandBarDefinition.RightCommandBarEntries.Add( commandBarButtonEntryImageReset ) ;
            commandBarDefinition.RightCommandBarEntries.Add( commandBarButtonEntryImageSaveDefaults ) ;

            commandBarLightweightControl = new PrimaryWorkspaceWorkspaceCommandBarLightweightControl(components) ;
            commandBarLightweightControl.LightweightControlContainerControl = this ;

            commandBarLightweightControl.CommandManager = ApplicationManager.CommandManager ;
            commandBarLightweightControl.CommandBarDefinition = commandBarDefinition ;
        }
 private static void AddItems(CommandBarEntryCollection entries, object[] items)
 {
     foreach (object item in items)
     {
         if (item is string || item is CommandId)
         {
             string commandIdentifier = item.ToString();
             if (commandIdentifier == "-")
             {
                 entries.Add(new CommandBarSeparatorEntry());
             }
             else if (commandIdentifier == " ")
             {
                 entries.Add(new CommandBarSpacerEntry());
             }
             else
             {
                 CommandBarButtonEntry cbbe = new CommandBarButtonEntry();
                 cbbe.CommandIdentifier = commandIdentifier;
                 entries.Add(cbbe);
             }
         }
         else if (item is CommandBarEntry)
         {
             entries.Add((CommandBarEntry)item);
         }
         else
         {
             Trace.Fail("Unexpected command bar definition item");
             throw new ArgumentException("Unexpected command bar definition item");
         }
     }
 }