internal PostPropertiesForm(CommandManager commandManager, CategoryContext categoryContext) { this.commandManager = commandManager; InitializeComponent(); this.Name = "PostPropertiesForm"; Text = Res.Get(StringId.PostProperties); AccessibleName = Text; buttonClose.Text = Res.Get(StringId.CloseButtonNoMnemonic); this.labelPageOrder.Text = Res.Get(StringId.PropertiesPageOrder); this.labelPageParent.Text = Res.Get(StringId.PropertiesPageParent); this.labelCategories.Text = Res.Get(StringId.PropertiesCategories); this.labelPublishDate.Text = Res.Get(StringId.PropertiesPublishDate); this.labelSlug.Text = Res.Get(StringId.PropertiesSlug); this.labelComments.Text = Res.Get(StringId.PropertiesComments); this.labelPings.Text = Res.Get(StringId.PropertiesPings); this.labelTags.Text = Res.Get(StringId.PropertiesKeywords); this.labelAuthor.Text = Res.Get(StringId.PropertiesAuthor); this.labelPassword.Text = Res.Get(StringId.PropertiesPassword); this.labelTrackbacks.Text = Res.Get(StringId.PropertiesTrackbacks); this.labelExcerpt.Text = Res.Get(StringId.PropertiesExcerpt); this.textPassword.PasswordChar = Res.PasswordChar; ControlHelper.SetCueBanner(textTrackbacks, Res.Get(StringId.PropertiesCommaSeparated)); SuppressAutoRtlFixup = true; comboComments.Items.AddRange(new[] { new CommentComboItem(BlogCommentPolicy.Unspecified), new CommentComboItem(BlogCommentPolicy.None), new CommentComboItem(BlogCommentPolicy.Open), new CommentComboItem(BlogCommentPolicy.Closed), }); comboPings.Items.AddRange(new[] { new TrackbackComboItem(BlogTrackbackPolicy.Unspecified), new TrackbackComboItem(BlogTrackbackPolicy.Allow), new TrackbackComboItem(BlogTrackbackPolicy.Deny), }); InitializePropertyFields(); controller = new SharedPropertiesController( this, labelCategories, categoryDropDown, labelTags, textTags, labelPageOrder, textPageOrder, labelPageParent, comboPageParent, labelPublishDate, datePublishDate, fields, categoryContext); this.comboComments.SelectedIndexChanged += controller.MakeDirty; this.comboPings.SelectedIndexChanged += controller.MakeDirty; this.textSlug.TextChanged += controller.MakeDirty; this.textPassword.TextChanged += controller.MakeDirty; this.textExcerpt.TextChanged += controller.MakeDirty; this.textTrackbacks.TextChanged += controller.MakeDirty; SimpleTextEditorCommandHelper.UseNativeBehaviors(commandManager, textExcerpt, textPageOrder, textPassword, textSlug, textTags, textTrackbacks); }
public PostPropertiesBandControl(CommandManager commandManager) { SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); InitializeComponent(); categoryContext = new CategoryContext(); controller = new SharedPropertiesController(this, null, categoryDropDown, null, textTags, labelPageOrder, textPageOrder, labelPageParent, comboPageParent, null, datePublishDate, fields, categoryContext); SimpleTextEditorCommandHelper.UseNativeBehaviors(commandManager, textTags, textPageOrder); postPropertiesForm = new PostPropertiesForm(commandManager, categoryContext); if (components == null) { components = new Container(); } components.Add(postPropertiesForm); postPropertiesForm.Synchronize(controller); commandManager.Add(CommandId.PostProperties, PostProperties_Execute); commandManager.Add(CommandId.ShowCategoryPopup, ShowCategoryPopup_Execute); linkViewAll.KeyDown += (sender, args) => { if (args.KeyValue == ' ') { linkViewAll_LinkClicked(sender, new LinkLabelLinkClickedEventArgs(null)); } }; // WinLive 180287: We don't want to show or use mnemonics on labels in the post properties band because // they can steal focus from the canvas. linkViewAll.Text = TextHelper.StripAmpersands(Res.Get(StringId.ViewAll)); linkViewAll.UseMnemonic = false; labelPageParent.Text = TextHelper.StripAmpersands(Res.Get(StringId.PropertiesPageParent)); labelPageParent.UseMnemonic = false; labelPageOrder.Text = TextHelper.StripAmpersands(Res.Get(StringId.PropertiesPageOrder)); labelPageOrder.UseMnemonic = false; }
public MapSidebarControl(MapOptions mapOptions, ISmartContentEditorSite contentEditorSite) { _mapOptions = mapOptions; // This call is required by the Windows.Forms Form Designer. InitializeComponent(); this.labelCaption.Text = Res.Get(StringId.MapSBCaption); this.labelMargins.Text = Res.Get(StringId.MapSBMargins); this.sectionHeaderControlOptions.HeaderText = Res.Get(StringId.Options); this.headerLayout.HeaderText = Res.Get(StringId.MapSBLayoutHeader); this.labelTop.Text = Res.Get(StringId.MapSBTop); this.labelRight.Text = Res.Get(StringId.MapSBRight); this.labelLeft.Text = Res.Get(StringId.MapSBLeft); this.labelBottom.Text = Res.Get(StringId.MapSBBottom); this.labelTextWrapping.Text = Res.Get(StringId.MapSBWrapping); this.linkLabelCustomizeMap.Text = Res.Get(StringId.MapSBCustomize); linkLabelCustomizeMap.LinkColor = ColorizedResources.Instance.SidebarLinkColor; //linkLabelCustomizeMap.LinkArea = new LinkArea(0, linkLabelCustomizeMap.Text.Length); this.toolTip.SetToolTip(this.linkLabelCustomizeMap, Res.Get(StringId.MapSBCustomizeTooltip)); SimpleTextEditorCommandHelper.UseNativeBehaviors(((ICommandManagerHost)contentEditorSite).CommandManager, numericMarginLeft, numericMarginRight, numericMarginTop, numericMarginBottom); sidebarHeaderControl1.LinkText = Res.Get(StringId.ViewMap); sidebarHeaderControl1.HeaderText = Res.Get(StringId.MapSBMapHeader); sidebarHeaderControl1.LinkUrl = ""; sidebarHeaderControl1.TabIndex = 0; _contentEditorSite = contentEditorSite; InitializeCommands(); // initialize bitmaps pictureBoxCustomizeMap.Image = ResourceHelper.LoadAssemblyResourceBitmap("Images.CustomizeMapIcon.png"); // additional initializatoin of combos comboBoxTextWrapping.Initialize(); comboBoxMargins.Initialize(); }