private void InitializeComponent() { this.header = new OpenLiveWriter.ApplicationFramework.SectionHeaderControl(); this.sidebarHeader = new OpenLiveWriter.ApplicationFramework.SidebarHeaderControl(); this.tagEditor = new OpenLiveWriter.PostEditor.Tagging.TagEditor(); this.SuspendLayout(); // // header // this.header.AccessibleName = "Options"; this.header.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this.header.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.header.HeaderText = "Options"; this.header.Location = new System.Drawing.Point(6, 88); this.header.Name = "header"; this.header.Size = new System.Drawing.Size(184, 14); this.header.TabIndex = 4; this.header.TabStop = false; // // sidebarHeader // this.sidebarHeader.AccessibleName = "SidebarHeader"; this.sidebarHeader.Location = new System.Drawing.Point(10, 2); this.sidebarHeader.Name = "sidebarHeader"; this.sidebarHeader.Size = new System.Drawing.Size(184, 89); this.sidebarHeader.TabIndex = 5; this.sidebarHeader.TabStop = false; // // tagEditor // this.tagEditor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tagEditor.Location = new System.Drawing.Point(10, 112); this.tagEditor.Name = "tagEditor"; this.tagEditor.Size = new System.Drawing.Size(184, 160); this.tagEditor.TabIndex = 0; this.tagEditor.TagProvider = null; this.tagEditor.Tags = new string[0]; // // TagSmartContentEditor // this.Controls.Add(this.tagEditor); this.Controls.Add(this.header); this.Controls.Add(this.sidebarHeader); this.Name = "TagSmartContentEditor"; this.ResumeLayout(false); }
public DefaultSidebarControl(ISidebarContext sidebarContext, IBlogPostEditingSite postEditingSite) { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // record the post management context and subscribe to the post list changed event _postEditingSite = postEditingSite ; // subscribe to changes that require us to re-layout the sidebar _postEditingSite.WeblogChanged +=new WeblogHandler(_postEditingSite_WeblogChanged); _postEditingSite.WeblogSettingsChanged +=new WeblogSettingsChangedHandler(_postEditingSite_WeblogSettingsChanged); _postEditingSite.FrameWindow.Layout +=new LayoutEventHandler(FrameWindow_Layout); _postEditingSite.PostListChanged +=new EventHandler(_postEditingSite_PostListChanged); ContentSourceManager.GlobalContentSourceListChanged +=new EventHandler(ContentSourceManager_GlobalContentSourceListChanged); // add the tooltip _toolTip = new ToolTip2(components); _toolTip.InitialDelay = 750 ; // set the caption Text = ApplicationEnvironment.ProductName; AccessibleName = Res.Get(StringId.SidebarPanel) ; // Turn on double buffered painting. SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); // initialize components //_weblogPanelHeader = new PanelHeader(this, WEBLOG_PANEL_CAPTION); // _weblogPanelBody = new PanelBody(); // _weblogHeader = new WeblogHeader(this, _weblogPanelBody) ; // _viewWeblogCommand = new LinkCommand(this, _toolTip, CommandId.ViewWeblog.ToString()); // _viewWeblogCommand.Name = "ViewWeblog"; // _viewWeblogAdminCommand = new LinkCommand(this, _toolTip, CommandId.ViewWeblogAdmin.ToString()); // _viewWeblogAdminCommand.Name = "ViewWeblogAdmin"; _headerControl = new SidebarHeaderControl(); _openPanelHeader = new PanelHeader(this, OPEN_PANEL_CAPTION) ; _openPanelBody = new PanelBody(); _draftsSectionHeader = new SectionHeader(this, DRAFTS_SECTION_CAPTION, SidebarColors.FirstSectionBottomColor ); _draftsPostList = new DraftPostList(this, _toolTip, DRAFTS_SECTION_CAPTION); _draftsPostList.PostSelected +=new PostEventHandler(_draftsPostList_PostSelected); _draftsPostList.PostDeleteRequested +=new PostEventHandler(_draftsPostList_PostDeleteRequested); _openDraftCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.OpenPost.png", MORE_DRAFTS_CAPTION, MORE_DRAFTS_ACCNAME, _toolTip, MORE_DRAFTS_TOOLTIP, CommandId.OpenDrafts.ToString()); _recentPostsSectionHeader = new SectionHeader(this, RECENT_POSTS_SECTION_CAPTION, SidebarColors.SecondSectionBottomColor ); _recentPostList = new RecentPostList(this, _toolTip, RECENT_POSTS_SECTION_CAPTION); _recentPostList.PostSelected +=new PostEventHandler(_recentPostList_PostSelected); _openPostCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.OpenPost.png", MORE_POSTS_CAPTION, MORE_POSTS_ACCNAME, _toolTip, MORE_POSTS_TOOLTIP, CommandId.OpenRecentPosts.ToString()); _insertPanelHeader = new PanelHeader(this, INSERT_PANEL_CAPTION); _insertPanelBody = new PanelBody(); _insertLinkCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.InsertLink.png", INSERT_LINK_CAPTION, INSERT_LINK_ACCNAME, _toolTip, INSERT_LINK_TOOLTIP, CommandId.InsertLink.ToString()); _insertPictureCommand = new LinkCommand(this, "BlogThis.ItemTypes.Images.ImageItem.png", INSERT_PICTURE_CAPTION, INSERT_PICTURE_ACCNAME, _toolTip, INSERT_PICTURE_TOOLTIP, CommandId.InsertPictureFromFile.ToString()); ContentSourceInfo csi = ContentSourceManager.GetContentSourceInfoById(PhotoAlbumContentSource.ID); if (csi != null) { _insertPhotoAlbumCommand = new LinkCommand(this, csi.Image, String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), csi.InsertableContentSourceSidebarText), String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), csi.InsertableContentSourceSidebarText), _toolTip, null, PhotoAlbumContentSource.ID); } ContentSourceInfo csi2 = ContentSourceManager.GetContentSourceInfoById(WebImageContentSource.ID); if (csi2 != null) { _insertWebImage = new LinkCommand(this, csi2.Image, String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), csi2.InsertableContentSourceSidebarText), String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), csi2.InsertableContentSourceSidebarText), _toolTip, null, WebImageContentSource.ID); } _insertTableCommand = new LinkCommand(this, "Tables.Commands.Images.CommandInsertTableCommandBarButtonBitmapEnabled.png", INSERT_TABLE_CAPTION, INSERT_TABLE_ACCNAME, _toolTip, INSERT_TABLE_TOOLTIP, CommandId.InsertTable.ToString()); _contentInsertCommands = new ContentInsertCommands(this, _toolTip, LINK_COMMAND_PADDING, int.MaxValue); _separator2 = new SeparatorControl(); Controls.Add(_separator2); Controls.Add(_headerControl); UpdatePostLists() ; }
/// <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.textBoxCaption = new System.Windows.Forms.TextBox(); this.labelCaption = new System.Windows.Forms.Label(); this.labelTextWrapping = new System.Windows.Forms.Label(); this.comboBoxTextWrapping = new OpenLiveWriter.InternalWriterPlugin.MapSidebarControl.HtmlContentAlignmentComboBox(); this.linkLabelCustomizeMap = new System.Windows.Forms.LinkLabel(); this.pictureBoxCustomizeMap = new System.Windows.Forms.PictureBox(); this.sidebarHeaderControl1 = new OpenLiveWriter.ApplicationFramework.SidebarHeaderControl(); this.headerLayout = new OpenLiveWriter.ApplicationFramework.SectionHeaderControl(); this.sectionHeaderControlOptions = new OpenLiveWriter.ApplicationFramework.SectionHeaderControl(); this.labelBottom = new System.Windows.Forms.Label(); this.labelLeft = new System.Windows.Forms.Label(); this.labelRight = new System.Windows.Forms.Label(); this.labelTop = new System.Windows.Forms.Label(); this.numericMarginLeft = new System.Windows.Forms.NumericUpDown(); this.numericMarginBottom = new System.Windows.Forms.NumericUpDown(); this.numericMarginRight = new System.Windows.Forms.NumericUpDown(); this.numericMarginTop = new System.Windows.Forms.NumericUpDown(); this.panelCustomMargins = new System.Windows.Forms.Panel(); this.comboBoxMargins = new OpenLiveWriter.InternalWriterPlugin.MapSidebarControl.MarginsComboBox(); this.labelMargins = new System.Windows.Forms.Label(); this.toolTip = new OpenLiveWriter.Controls.ToolTip2(this.components); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustomizeMap)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginLeft)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginBottom)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginRight)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginTop)).BeginInit(); this.panelCustomMargins.SuspendLayout(); this.SuspendLayout(); // // textBoxCaption // this.textBoxCaption.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBoxCaption.Location = new System.Drawing.Point(11, 159); this.textBoxCaption.Name = "textBoxCaption"; this.textBoxCaption.Size = new System.Drawing.Size(173, 20); this.textBoxCaption.TabIndex = 10; // // labelCaption // this.labelCaption.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.labelCaption.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelCaption.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelCaption.Location = new System.Drawing.Point(12, 141); this.labelCaption.Name = "labelCaption"; this.labelCaption.Size = new System.Drawing.Size(161, 16); this.labelCaption.TabIndex = 9; this.labelCaption.Text = "Caption:"; // // labelTextWrapping // this.labelTextWrapping.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.labelTextWrapping.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelTextWrapping.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelTextWrapping.Location = new System.Drawing.Point(12, 219); this.labelTextWrapping.Name = "labelTextWrapping"; this.labelTextWrapping.Size = new System.Drawing.Size(171, 15); this.labelTextWrapping.TabIndex = 14; this.labelTextWrapping.Text = "Text wrapping:"; // // comboBoxTextWrapping // this.comboBoxTextWrapping.AllowMirroring = true; this.comboBoxTextWrapping.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.comboBoxTextWrapping.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.comboBoxTextWrapping.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxTextWrapping.ItemHeight = 25; this.comboBoxTextWrapping.Location = new System.Drawing.Point(11, 237); this.comboBoxTextWrapping.Name = "comboBoxTextWrapping"; this.comboBoxTextWrapping.Size = new System.Drawing.Size(173, 31); this.comboBoxTextWrapping.TabIndex = 15; // // linkLabelCustomizeMap // this.linkLabelCustomizeMap.FlatStyle = System.Windows.Forms.FlatStyle.System; this.linkLabelCustomizeMap.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.linkLabelCustomizeMap.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabelCustomizeMap.LinkColor = System.Drawing.SystemColors.HotTrack; this.linkLabelCustomizeMap.Location = new System.Drawing.Point(36, 118); this.linkLabelCustomizeMap.Name = "linkLabelCustomizeMap"; this.linkLabelCustomizeMap.Size = new System.Drawing.Size(147, 17); this.linkLabelCustomizeMap.TabIndex = 5; this.linkLabelCustomizeMap.TabStop = true; this.linkLabelCustomizeMap.Text = "Customize Map..."; this.toolTip.SetToolTip(this.linkLabelCustomizeMap, "Edit the Map location, style, and pushpins"); this.linkLabelCustomizeMap.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelCustomizeMap_LinkClicked); // // pictureBoxCustomizeMap // this.pictureBoxCustomizeMap.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.pictureBoxCustomizeMap.Location = new System.Drawing.Point(11, 117); this.pictureBoxCustomizeMap.Name = "pictureBoxCustomizeMap"; this.pictureBoxCustomizeMap.Size = new System.Drawing.Size(23, 16); this.pictureBoxCustomizeMap.TabIndex = 3; this.pictureBoxCustomizeMap.TabStop = false; // // sidebarHeaderControl1 // this.sidebarHeaderControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.sidebarHeaderControl1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.sidebarHeaderControl1.Location = new System.Drawing.Point(10, 2); this.sidebarHeaderControl1.Name = "sidebarHeaderControl1"; this.sidebarHeaderControl1.Size = new System.Drawing.Size(184, 48); this.sidebarHeaderControl1.TabIndex = 31; // // headerLayout // this.headerLayout.AccessibleName = "Layout"; this.headerLayout.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this.headerLayout.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.headerLayout.HeaderText = "Layout"; this.headerLayout.Location = new System.Drawing.Point(7, 199); this.headerLayout.Name = "headerLayout"; this.headerLayout.Size = new System.Drawing.Size(184, 17); this.headerLayout.TabIndex = 3; this.headerLayout.TabStop = false; // // sectionHeaderControlOptions // this.sectionHeaderControlOptions.AccessibleName = "Options"; this.sectionHeaderControlOptions.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this.sectionHeaderControlOptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.sectionHeaderControlOptions.HeaderText = "Options"; this.sectionHeaderControlOptions.Location = new System.Drawing.Point(7, 93); this.sectionHeaderControlOptions.Name = "sectionHeaderControlOptions"; this.sectionHeaderControlOptions.Size = new System.Drawing.Size(184, 17); this.sectionHeaderControlOptions.TabIndex = 32; this.sectionHeaderControlOptions.TabStop = false; // // labelBottom // this.labelBottom.AutoSize = true; this.labelBottom.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelBottom.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelBottom.Location = new System.Drawing.Point(0, 40); this.labelBottom.Name = "labelBottom"; this.labelBottom.Size = new System.Drawing.Size(40, 13); this.labelBottom.TabIndex = 20; this.labelBottom.Text = "Bottom"; // // labelLeft // this.labelLeft.AutoSize = true; this.labelLeft.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelLeft.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelLeft.Location = new System.Drawing.Point(93, 40); this.labelLeft.Name = "labelLeft"; this.labelLeft.Size = new System.Drawing.Size(25, 13); this.labelLeft.TabIndex = 30; this.labelLeft.Text = "Left"; // // labelRight // this.labelRight.AutoSize = true; this.labelRight.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelRight.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelRight.Location = new System.Drawing.Point(93, 0); this.labelRight.Name = "labelRight"; this.labelRight.Size = new System.Drawing.Size(32, 13); this.labelRight.TabIndex = 10; this.labelRight.Text = "Right"; // // labelTop // this.labelTop.AutoSize = true; this.labelTop.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelTop.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelTop.Location = new System.Drawing.Point(0, 0); this.labelTop.Name = "labelTop"; this.labelTop.Size = new System.Drawing.Size(26, 13); this.labelTop.TabIndex = 0; this.labelTop.Text = "Top"; // // numericMarginLeft // this.numericMarginLeft.Increment = new decimal(new int[] { 5, 0, 0, 0}); this.numericMarginLeft.Location = new System.Drawing.Point(93, 56); this.numericMarginLeft.Name = "numericMarginLeft"; this.numericMarginLeft.Size = new System.Drawing.Size(56, 20); this.numericMarginLeft.TabIndex = 35; this.numericMarginLeft.Enter += new System.EventHandler(this.numericMargin_Enter); // // numericMarginBottom // this.numericMarginBottom.Increment = new decimal(new int[] { 5, 0, 0, 0}); this.numericMarginBottom.Location = new System.Drawing.Point(0, 56); this.numericMarginBottom.Name = "numericMarginBottom"; this.numericMarginBottom.Size = new System.Drawing.Size(56, 20); this.numericMarginBottom.TabIndex = 25; this.numericMarginBottom.Enter += new System.EventHandler(this.numericMargin_Enter); // // numericMarginRight // this.numericMarginRight.Increment = new decimal(new int[] { 5, 0, 0, 0}); this.numericMarginRight.Location = new System.Drawing.Point(93, 16); this.numericMarginRight.Name = "numericMarginRight"; this.numericMarginRight.Size = new System.Drawing.Size(56, 20); this.numericMarginRight.TabIndex = 15; this.numericMarginRight.Enter += new System.EventHandler(this.numericMargin_Enter); // // numericMarginTop // this.numericMarginTop.Increment = new decimal(new int[] { 5, 0, 0, 0}); this.numericMarginTop.Location = new System.Drawing.Point(0, 16); this.numericMarginTop.Name = "numericMarginTop"; this.numericMarginTop.Size = new System.Drawing.Size(56, 20); this.numericMarginTop.TabIndex = 1; this.numericMarginTop.Enter += new System.EventHandler(this.numericMargin_Enter); // // panelCustomMargins // this.panelCustomMargins.Controls.Add(this.numericMarginTop); this.panelCustomMargins.Controls.Add(this.numericMarginRight); this.panelCustomMargins.Controls.Add(this.numericMarginBottom); this.panelCustomMargins.Controls.Add(this.numericMarginLeft); this.panelCustomMargins.Controls.Add(this.labelTop); this.panelCustomMargins.Controls.Add(this.labelRight); this.panelCustomMargins.Controls.Add(this.labelLeft); this.panelCustomMargins.Controls.Add(this.labelBottom); this.panelCustomMargins.Location = new System.Drawing.Point(11, 319); this.panelCustomMargins.Name = "panelCustomMargins"; this.panelCustomMargins.Size = new System.Drawing.Size(180, 92); this.panelCustomMargins.TabIndex = 30; // // comboBoxMargins // this.comboBoxMargins.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.comboBoxMargins.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxMargins.ItemHeight = 13; this.comboBoxMargins.Location = new System.Drawing.Point(11, 291); this.comboBoxMargins.Name = "comboBoxMargins"; this.comboBoxMargins.Size = new System.Drawing.Size(173, 21); this.comboBoxMargins.TabIndex = 20; // // labelMargins // this.labelMargins.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.labelMargins.FlatStyle = System.Windows.Forms.FlatStyle.System; this.labelMargins.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelMargins.Location = new System.Drawing.Point(12, 273); this.labelMargins.Name = "labelMargins"; this.labelMargins.Size = new System.Drawing.Size(172, 15); this.labelMargins.TabIndex = 19; this.labelMargins.Text = "Margins:"; // // MapSidebarControl // this.Controls.Add(this.sectionHeaderControlOptions); this.Controls.Add(this.sidebarHeaderControl1); this.Controls.Add(this.textBoxCaption); this.Controls.Add(this.labelCaption); this.Controls.Add(this.labelMargins); this.Controls.Add(this.comboBoxMargins); this.Controls.Add(this.headerLayout); this.Controls.Add(this.panelCustomMargins); this.Controls.Add(this.labelTextWrapping); this.Controls.Add(this.comboBoxTextWrapping); this.Controls.Add(this.linkLabelCustomizeMap); this.Controls.Add(this.pictureBoxCustomizeMap); this.Name = "MapSidebarControl"; this.Size = new System.Drawing.Size(200, 470); this.Enter += new System.EventHandler(this.numericMargin_Enter); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustomizeMap)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginLeft)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginBottom)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginRight)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericMarginTop)).EndInit(); this.panelCustomMargins.ResumeLayout(false); this.panelCustomMargins.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }