using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace EasiReporter
{
/// <summary>
/// Summary description for DlgSetZoom.
/// </summary>
public class DlgSetZoom : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.NumericUpDown NumericUpDownPercent;
private EasiReports.ReportControl ReportControl = null;
public int Percent
{
get
{
return (int) NumericUpDownPercent.Value;
}
set
{
NumericUpDownPercent.Value = value;
ReportControl.SetDesignViewZoom( false, Percent );
}
}
public DlgSetZoom( EasiReports.ReportControl ReportControl )
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.ReportControl = ReportControl;
}
/// <summary>Clean up any resources being used.</summary>
/// <param name="disposing"><b>true</b> to release both managed and unmanaged resources; <b>false</b> to release only unmanaged resources.</param>
/// <remarks>Releases the unmanaged resources and optionally releases the managed resources.</remarks>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.NumericUpDownPercent = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.NumericUpDownPercent)).BeginInit();
this.SuspendLayout();
//
// NumericUpDownPercent
//
this.NumericUpDownPercent.Increment = new System.Decimal(new int[] {
10,
0,
0,
0});
this.NumericUpDownPercent.Location = new System.Drawing.Point(8, 8);
this.NumericUpDownPercent.Maximum = new System.Decimal(new int[] {
1000,
0,
0,
0});
this.NumericUpDownPercent.Minimum = new System.Decimal(new int[] {
50,
0,
0,
0});
this.NumericUpDownPercent.Name = "NumericUpDownPercent";
this.NumericUpDownPercent.Size = new System.Drawing.Size(64, 20);
this.NumericUpDownPercent.TabIndex = 0;
this.NumericUpDownPercent.Value = new System.Decimal(new int[] {
1000,
0,
0,
0});
this.NumericUpDownPercent.ValueChanged += new System.EventHandler(this.Percent_ValueChanged);
//
// label2
//
this.label2.Location = new System.Drawing.Point(80, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 20);
this.label2.TabIndex = 1;
this.label2.Text = "percent";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// DlgSetZoom
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(138, 36);
this.Controls.Add(this.NumericUpDownPercent);
this.Controls.Add(this.label2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Name = "DlgSetZoom";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Set Zoom";
((System.ComponentModel.ISupportInitialize)(this.NumericUpDownPercent)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void Percent_ValueChanged( object sender, System.EventArgs e )
{
ReportControl.SetDesignViewZoom( false, Percent );
}
}
}