using System.Windows.Forms; namespace FastReport.Forms { /// /// The base class for designer plugin's options page. /// /// /// Use this class if you develop a designer plugin that may be configured in the /// "View|Options..." menu. You need to implement an options page for your /// plugin and return it in the IDesignerPlugin.GetOptionsPage method. /// public class DesignerOptionsPage : Form { private Label lblWarn; /// /// The TabControl control. /// public TabControl tc1; /// /// The TabPage control. /// public TabPage tab1; private void InitializeComponent() { this.tc1 = new System.Windows.Forms.TabControl(); this.tab1 = new System.Windows.Forms.TabPage(); this.lblWarn = new System.Windows.Forms.Label(); this.tc1.SuspendLayout(); this.SuspendLayout(); // // tc1 // this.tc1.Controls.Add(this.tab1); this.tc1.Location = new System.Drawing.Point(12, 12); this.tc1.Name = "tc1"; this.tc1.SelectedIndex = 0; this.tc1.Size = new System.Drawing.Size(376, 276); this.tc1.TabIndex = 0; // // tab1 // this.tab1.Location = new System.Drawing.Point(4, 22); this.tab1.Name = "tab1"; this.tab1.Padding = new System.Windows.Forms.Padding(3); this.tab1.Size = new System.Drawing.Size(368, 250); this.tab1.TabIndex = 0; this.tab1.Text = "tabPage1"; this.tab1.UseVisualStyleBackColor = true; // // lblWarn // this.lblWarn.AutoSize = true; this.lblWarn.Location = new System.Drawing.Point(8, 300); this.lblWarn.Name = "lblWarn"; this.lblWarn.Size = new System.Drawing.Size(328, 13); this.lblWarn.TabIndex = 1; this.lblWarn.Text = "Place your controls on tab page only! Add new pages if necessary."; // // DesignerOptionsPage // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.ClientSize = new System.Drawing.Size(398, 323); this.Controls.Add(this.lblWarn); this.Controls.Add(this.tc1); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.Name = "DesignerOptionsPage"; this.tc1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); } /// /// Initializes controls on this options page. /// /// /// Override this method to fill options page's controls with initial values. /// public virtual void Init() { } /// /// Finalizes the options page. /// /// The dialog result. /// /// Override this method to pass controls' values to the plugin. Do this if result is /// DialogResult.OK. /// public virtual void Done(DialogResult result) { } /// /// Updates images used in the control. /// public virtual void UpdateDpiDependencies() { } /// /// Initializes a new instance of the DesignerOptionsPage class with default settings. /// /// /// Usually you need to define another contructor which takes one parameter - the plugin. /// /// This example shows how to define own constructor which takes a plugin: /// /// public DialogPageOptions(DialogPageDesigner pd) : base() /// { /// FPageDesigner = pd; /// InitializeComponent(); /// } /// /// public DesignerOptionsPage() { InitializeComponent(); } } }