public HtmlMarginEditor(CommandManager commandManager) { // This call is required by the Windows Form Designer. InitializeComponent(); marginCommand = (MarginCommand)commandManager.Get(CommandId.MarginsGroup); this.label3.Text = Res.Get(StringId.ImgSBMarginTop); this.label4.Text = Res.Get(StringId.ImgSBMarginRight); this.label5.Text = Res.Get(StringId.ImgSBMarginLeft); this.label6.Text = Res.Get(StringId.ImgSBMarginBottom); comboBoxMargins.Initialize(); comboBoxMargins.SelectedIndexChanged += new EventHandler(comboBoxMargins_SelectedIndexChanged); comboBoxMargins.SelectedIndex = 0; panelCustomMargin.VisibleChanged += new EventHandler(panelCustomMargin_VisibleChanged); comboBoxMargins.AccessibleName = ControlHelper.ToAccessibleName(Res.Get(StringId.ImgSBMargins)); marginCommand.MarginChanged += new EventHandler(marginCommand_MarginChanged); }
private void InitializeAlignmentMarginChunkCommands() { _alignmentCommand = (AlignmentCommand)_editorContext.CommandManager.Get(CommandId.AlignmentGallery); _marginCommand = (MarginCommand)_editorContext.CommandManager.Get(CommandId.MarginsGroup); }
/// <summary> /// Must be called by inheriting classes to avoid null references! /// </summary> /// <param name="commandManager"></param> protected void InitializeAlignmentMarginCommands(CommandManager commandManager) { _marginCommand = (MarginCommand)commandManager.Get(CommandId.MarginsGroup); _alignmentCommand = (AlignmentCommand)commandManager.Get(CommandId.AlignmentGallery); }