public Tool(PaintDotNet.Controls.DocumentWorkspace documentWorkspace, ImageResource toolBarImage, string name, string helpText, char hotKey, bool skipIfActiveOnHotKey, PaintDotNet.ToolBarConfigItems toolBarConfigItems) { this.documentWorkspace = documentWorkspace; this.toolBarImage = toolBarImage; this.toolInfo = new ToolInfo(name, helpText, toolBarImage, this.LargeImage, hotKey, skipIfActiveOnHotKey, base.GetType()); this.toolBarConfigItems = toolBarConfigItems; }
public ToolConfigRow(AppSettings.ToolsSection toolSettings, PaintDotNet.ToolBarConfigItems toolBarConfigItems) { Validate.IsNotNull <AppSettings.ToolsSection>(toolSettings, "toolSettings"); this.toolSettings = toolSettings; this.toolBarConfigItems = toolBarConfigItems; this.headerLabel = new HeadingLabel(); this.headerLabel.Name = "headerLabel:" + toolBarConfigItems.ToString(); string str2 = PdnResources.GetString(this.GetHeaderResourceName()); this.headerLabel.Text = str2; this.headerLabel.RightMargin = 0; this.toolConfigStrip = new PaintDotNet.Controls.ToolConfigStrip(toolSettings); this.toolConfigStrip.Name = "toolConfigStrip:" + toolBarConfigItems.ToString(); this.toolConfigStrip.AutoSize = false; this.toolConfigStrip.Dock = DockStyle.None; this.toolConfigStrip.GripStyle = ToolStripGripStyle.Hidden; this.toolConfigStrip.LayoutStyle = ToolStripLayoutStyle.Flow; this.toolConfigStrip.ToolBarConfigItems = this.toolBarConfigItems; this.toolConfigStrip.ShowFirstAndLastSeparators = false; }