InitializeComponent
namespace TestEasyCon
{
partial class ImageViewer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component 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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageViewer));
this.panel1 = new System.Windows.Forms.Panel();
this.imageBox1 = new Cyotek.Windows.Forms.ImageBox();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.tsmClose = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTools = new System.Windows.Forms.ToolStripMenuItem();
this.tsmFit = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTZoomIn = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTZoomOut = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTRotateClockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTRotateAntiClockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmNormal = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoomIn = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoomOut = new System.Windows.Forms.ToolStripMenuItem();
this.tsmRotateclockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmRotateAntiClockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmPrint = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoom = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoomSize = new System.Windows.Forms.ToolStripComboBox();
this.tsmExit = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.imageBox1);
this.panel1.Controls.Add(this.menuStrip1);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(632, 752);
this.panel1.TabIndex = 0;
//
// imageBox1
//
this.imageBox1.AutoSize = false;
this.imageBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.imageBox1.Location = new System.Drawing.Point(0, 25);
this.imageBox1.Name = "imageBox1";
this.imageBox1.Size = new System.Drawing.Size(632, 727);
this.imageBox1.TabIndex = 1;
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmClose,
this.tsmTools,
this.tsmNormal,
this.tsmZoomIn,
this.tsmZoomOut,
this.tsmRotateclockWise,
this.tsmRotateAntiClockWise,
this.tsmPrint,
this.tsmZoom,
this.tsmZoomSize,
this.tsmExit});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(632, 25);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// tsmClose
//
this.tsmClose.AutoToolTip = true;
this.tsmClose.Image = ((System.Drawing.Image)(resources.GetObject("tsmClose.Image")));
this.tsmClose.Name = "tsmClose";
this.tsmClose.Size = new System.Drawing.Size(61, 21);
this.tsmClose.Text = "Close";
this.tsmClose.ToolTipText = "Close ";
//
// tsmTools
//
this.tsmTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmFit,
this.tsmTZoomIn,
this.tsmTZoomOut,
this.tsmTRotateClockWise,
this.tsmTRotateAntiClockWise});
this.tsmTools.Image = ((System.Drawing.Image)(resources.GetObject("tsmTools.Image")));
this.tsmTools.Name = "tsmTools";
this.tsmTools.Size = new System.Drawing.Size(60, 21);
this.tsmTools.Text = "Tools";
//
// tsmFit
//
this.tsmFit.AutoToolTip = true;
this.tsmFit.Image = ((System.Drawing.Image)(resources.GetObject("tsmFit.Image")));
this.tsmFit.Name = "tsmFit";
this.tsmFit.Size = new System.Drawing.Size(194, 22);
this.tsmFit.Text = "Fit";
this.tsmFit.ToolTipText = "Fit";
//
// tsmTZoomIn
//
this.tsmTZoomIn.Image = ((System.Drawing.Image)(resources.GetObject("tsmTZoomIn.Image")));
this.tsmTZoomIn.Name = "tsmTZoomIn";
this.tsmTZoomIn.Size = new System.Drawing.Size(194, 22);
this.tsmTZoomIn.Text = "Zoom In";
//
// tsmTZoomOut
//
this.tsmTZoomOut.AutoToolTip = true;
this.tsmTZoomOut.Image = ((System.Drawing.Image)(resources.GetObject("tsmTZoomOut.Image")));
this.tsmTZoomOut.Name = "tsmTZoomOut";
this.tsmTZoomOut.Size = new System.Drawing.Size(194, 22);
this.tsmTZoomOut.Text = "Zoom Out";
//
// tsmTRotateClockWise
//
this.tsmTRotateClockWise.AutoToolTip = true;
this.tsmTRotateClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmTRotateClockWise.Image")));
this.tsmTRotateClockWise.Name = "tsmTRotateClockWise";
this.tsmTRotateClockWise.Size = new System.Drawing.Size(194, 22);
this.tsmTRotateClockWise.Text = "Rotate Clock Wise";
//
// tsmTRotateAntiClockWise
//
this.tsmTRotateAntiClockWise.AutoToolTip = true;
this.tsmTRotateAntiClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmTRotateAntiClockWise.Image")));
this.tsmTRotateAntiClockWise.Name = "tsmTRotateAntiClockWise";
this.tsmTRotateAntiClockWise.Size = new System.Drawing.Size(194, 22);
this.tsmTRotateAntiClockWise.Text = "Rotate Anti Clock Wise";
//
// tsmNormal
//
this.tsmNormal.AutoToolTip = true;
this.tsmNormal.Image = ((System.Drawing.Image)(resources.GetObject("tsmNormal.Image")));
this.tsmNormal.Name = "tsmNormal";
this.tsmNormal.Size = new System.Drawing.Size(28, 21);
this.tsmNormal.ToolTipText = "Fit";
//
// tsmZoomIn
//
this.tsmZoomIn.AutoToolTip = true;
this.tsmZoomIn.Image = ((System.Drawing.Image)(resources.GetObject("tsmZoomIn.Image")));
this.tsmZoomIn.Name = "tsmZoomIn";
this.tsmZoomIn.Size = new System.Drawing.Size(28, 21);
this.tsmZoomIn.ToolTipText = "Zoom In";
//
// tsmZoomOut
//
this.tsmZoomOut.AutoToolTip = true;
this.tsmZoomOut.Image = ((System.Drawing.Image)(resources.GetObject("tsmZoomOut.Image")));
this.tsmZoomOut.Name = "tsmZoomOut";
this.tsmZoomOut.Size = new System.Drawing.Size(28, 21);
this.tsmZoomOut.ToolTipText = "Zoom Out";
//
// tsmRotateclockWise
//
this.tsmRotateclockWise.AutoToolTip = true;
this.tsmRotateclockWise.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsmRotateclockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmRotateclockWise.Image")));
this.tsmRotateclockWise.Name = "tsmRotateclockWise";
this.tsmRotateclockWise.Size = new System.Drawing.Size(28, 21);
this.tsmRotateclockWise.Text = "Rotate Clock Wise";
//
// tsmRotateAntiClockWise
//
this.tsmRotateAntiClockWise.AutoToolTip = true;
this.tsmRotateAntiClockWise.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsmRotateAntiClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmRotateAntiClockWise.Image")));
this.tsmRotateAntiClockWise.Name = "tsmRotateAntiClockWise";
this.tsmRotateAntiClockWise.Size = new System.Drawing.Size(28, 21);
this.tsmRotateAntiClockWise.Text = "Rotate AntiClock Wise";
//
// tsmPrint
//
this.tsmPrint.AutoToolTip = true;
this.tsmPrint.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsmPrint.Image = ((System.Drawing.Image)(resources.GetObject("tsmPrint.Image")));
this.tsmPrint.Name = "tsmPrint";
this.tsmPrint.Size = new System.Drawing.Size(28, 21);
this.tsmPrint.Text = "Print";
//
// tsmZoom
//
this.tsmZoom.Name = "tsmZoom";
this.tsmZoom.Size = new System.Drawing.Size(49, 21);
this.tsmZoom.Text = "Zoom:";
//
// tsmZoomSize
//
this.tsmZoomSize.AutoToolTip = true;
this.tsmZoomSize.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.tsmZoomSize.Items.AddRange(new object[] {
"",
"10%",
"25%",
"50%",
"75%",
"100%",
"150%",
"200%",
"400%",
"800%",
"1500%",
"Actual Size"});
this.tsmZoomSize.Name = "tsmZoomSize";
this.tsmZoomSize.Size = new System.Drawing.Size(121, 21);
this.tsmZoomSize.ToolTipText = "Zoom (%)";
//
// tsmExit
//
this.tsmExit.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.tsmExit.AutoToolTip = true;
this.tsmExit.Image = ((System.Drawing.Image)(resources.GetObject("tsmExit.Image")));
this.tsmExit.Name = "tsmExit";
this.tsmExit.Size = new System.Drawing.Size(28, 21);
this.tsmExit.ToolTipText = "Exit ";
//
// ImageViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel1);
this.Name = "ImageViewer";
this.Size = new System.Drawing.Size(634, 747);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem tsmClose;
private System.Windows.Forms.ToolStripMenuItem tsmTools;
private System.Windows.Forms.ToolStripMenuItem tsmNormal;
private System.Windows.Forms.ToolStripMenuItem tsmZoomIn;
private System.Windows.Forms.ToolStripMenuItem tsmFit;
private System.Windows.Forms.ToolStripMenuItem tsmTZoomIn;
private System.Windows.Forms.ToolStripMenuItem tsmTZoomOut;
private System.Windows.Forms.ToolStripMenuItem tsmTRotateClockWise;
private System.Windows.Forms.ToolStripMenuItem tsmTRotateAntiClockWise;
private System.Windows.Forms.ToolStripMenuItem tsmZoomOut;
private System.Windows.Forms.ToolStripMenuItem tsmZoom;
private System.Windows.Forms.ToolStripComboBox tsmZoomSize;
private System.Windows.Forms.ToolStripMenuItem tsmExit;
private System.Windows.Forms.ToolStripMenuItem tsmRotateclockWise;
private System.Windows.Forms.ToolStripMenuItem tsmRotateAntiClockWise;
private Cyotek.Windows.Forms.ImageBox imageBox1;
private System.Windows.Forms.ToolStripMenuItem tsmPrint;
}
}
Code Behind{
partial class ImageViewer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component 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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageViewer));
this.panel1 = new System.Windows.Forms.Panel();
this.imageBox1 = new Cyotek.Windows.Forms.ImageBox();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.tsmClose = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTools = new System.Windows.Forms.ToolStripMenuItem();
this.tsmFit = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTZoomIn = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTZoomOut = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTRotateClockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmTRotateAntiClockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmNormal = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoomIn = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoomOut = new System.Windows.Forms.ToolStripMenuItem();
this.tsmRotateclockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmRotateAntiClockWise = new System.Windows.Forms.ToolStripMenuItem();
this.tsmPrint = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoom = new System.Windows.Forms.ToolStripMenuItem();
this.tsmZoomSize = new System.Windows.Forms.ToolStripComboBox();
this.tsmExit = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.imageBox1);
this.panel1.Controls.Add(this.menuStrip1);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(632, 752);
this.panel1.TabIndex = 0;
//
// imageBox1
//
this.imageBox1.AutoSize = false;
this.imageBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.imageBox1.Location = new System.Drawing.Point(0, 25);
this.imageBox1.Name = "imageBox1";
this.imageBox1.Size = new System.Drawing.Size(632, 727);
this.imageBox1.TabIndex = 1;
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmClose,
this.tsmTools,
this.tsmNormal,
this.tsmZoomIn,
this.tsmZoomOut,
this.tsmRotateclockWise,
this.tsmRotateAntiClockWise,
this.tsmPrint,
this.tsmZoom,
this.tsmZoomSize,
this.tsmExit});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(632, 25);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// tsmClose
//
this.tsmClose.AutoToolTip = true;
this.tsmClose.Image = ((System.Drawing.Image)(resources.GetObject("tsmClose.Image")));
this.tsmClose.Name = "tsmClose";
this.tsmClose.Size = new System.Drawing.Size(61, 21);
this.tsmClose.Text = "Close";
this.tsmClose.ToolTipText = "Close ";
//
// tsmTools
//
this.tsmTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmFit,
this.tsmTZoomIn,
this.tsmTZoomOut,
this.tsmTRotateClockWise,
this.tsmTRotateAntiClockWise});
this.tsmTools.Image = ((System.Drawing.Image)(resources.GetObject("tsmTools.Image")));
this.tsmTools.Name = "tsmTools";
this.tsmTools.Size = new System.Drawing.Size(60, 21);
this.tsmTools.Text = "Tools";
//
// tsmFit
//
this.tsmFit.AutoToolTip = true;
this.tsmFit.Image = ((System.Drawing.Image)(resources.GetObject("tsmFit.Image")));
this.tsmFit.Name = "tsmFit";
this.tsmFit.Size = new System.Drawing.Size(194, 22);
this.tsmFit.Text = "Fit";
this.tsmFit.ToolTipText = "Fit";
//
// tsmTZoomIn
//
this.tsmTZoomIn.Image = ((System.Drawing.Image)(resources.GetObject("tsmTZoomIn.Image")));
this.tsmTZoomIn.Name = "tsmTZoomIn";
this.tsmTZoomIn.Size = new System.Drawing.Size(194, 22);
this.tsmTZoomIn.Text = "Zoom In";
//
// tsmTZoomOut
//
this.tsmTZoomOut.AutoToolTip = true;
this.tsmTZoomOut.Image = ((System.Drawing.Image)(resources.GetObject("tsmTZoomOut.Image")));
this.tsmTZoomOut.Name = "tsmTZoomOut";
this.tsmTZoomOut.Size = new System.Drawing.Size(194, 22);
this.tsmTZoomOut.Text = "Zoom Out";
//
// tsmTRotateClockWise
//
this.tsmTRotateClockWise.AutoToolTip = true;
this.tsmTRotateClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmTRotateClockWise.Image")));
this.tsmTRotateClockWise.Name = "tsmTRotateClockWise";
this.tsmTRotateClockWise.Size = new System.Drawing.Size(194, 22);
this.tsmTRotateClockWise.Text = "Rotate Clock Wise";
//
// tsmTRotateAntiClockWise
//
this.tsmTRotateAntiClockWise.AutoToolTip = true;
this.tsmTRotateAntiClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmTRotateAntiClockWise.Image")));
this.tsmTRotateAntiClockWise.Name = "tsmTRotateAntiClockWise";
this.tsmTRotateAntiClockWise.Size = new System.Drawing.Size(194, 22);
this.tsmTRotateAntiClockWise.Text = "Rotate Anti Clock Wise";
//
// tsmNormal
//
this.tsmNormal.AutoToolTip = true;
this.tsmNormal.Image = ((System.Drawing.Image)(resources.GetObject("tsmNormal.Image")));
this.tsmNormal.Name = "tsmNormal";
this.tsmNormal.Size = new System.Drawing.Size(28, 21);
this.tsmNormal.ToolTipText = "Fit";
//
// tsmZoomIn
//
this.tsmZoomIn.AutoToolTip = true;
this.tsmZoomIn.Image = ((System.Drawing.Image)(resources.GetObject("tsmZoomIn.Image")));
this.tsmZoomIn.Name = "tsmZoomIn";
this.tsmZoomIn.Size = new System.Drawing.Size(28, 21);
this.tsmZoomIn.ToolTipText = "Zoom In";
//
// tsmZoomOut
//
this.tsmZoomOut.AutoToolTip = true;
this.tsmZoomOut.Image = ((System.Drawing.Image)(resources.GetObject("tsmZoomOut.Image")));
this.tsmZoomOut.Name = "tsmZoomOut";
this.tsmZoomOut.Size = new System.Drawing.Size(28, 21);
this.tsmZoomOut.ToolTipText = "Zoom Out";
//
// tsmRotateclockWise
//
this.tsmRotateclockWise.AutoToolTip = true;
this.tsmRotateclockWise.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsmRotateclockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmRotateclockWise.Image")));
this.tsmRotateclockWise.Name = "tsmRotateclockWise";
this.tsmRotateclockWise.Size = new System.Drawing.Size(28, 21);
this.tsmRotateclockWise.Text = "Rotate Clock Wise";
//
// tsmRotateAntiClockWise
//
this.tsmRotateAntiClockWise.AutoToolTip = true;
this.tsmRotateAntiClockWise.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsmRotateAntiClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmRotateAntiClockWise.Image")));
this.tsmRotateAntiClockWise.Name = "tsmRotateAntiClockWise";
this.tsmRotateAntiClockWise.Size = new System.Drawing.Size(28, 21);
this.tsmRotateAntiClockWise.Text = "Rotate AntiClock Wise";
//
// tsmPrint
//
this.tsmPrint.AutoToolTip = true;
this.tsmPrint.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsmPrint.Image = ((System.Drawing.Image)(resources.GetObject("tsmPrint.Image")));
this.tsmPrint.Name = "tsmPrint";
this.tsmPrint.Size = new System.Drawing.Size(28, 21);
this.tsmPrint.Text = "Print";
//
// tsmZoom
//
this.tsmZoom.Name = "tsmZoom";
this.tsmZoom.Size = new System.Drawing.Size(49, 21);
this.tsmZoom.Text = "Zoom:";
//
// tsmZoomSize
//
this.tsmZoomSize.AutoToolTip = true;
this.tsmZoomSize.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.tsmZoomSize.Items.AddRange(new object[] {
"",
"10%",
"25%",
"50%",
"75%",
"100%",
"150%",
"200%",
"400%",
"800%",
"1500%",
"Actual Size"});
this.tsmZoomSize.Name = "tsmZoomSize";
this.tsmZoomSize.Size = new System.Drawing.Size(121, 21);
this.tsmZoomSize.ToolTipText = "Zoom (%)";
//
// tsmExit
//
this.tsmExit.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.tsmExit.AutoToolTip = true;
this.tsmExit.Image = ((System.Drawing.Image)(resources.GetObject("tsmExit.Image")));
this.tsmExit.Name = "tsmExit";
this.tsmExit.Size = new System.Drawing.Size(28, 21);
this.tsmExit.ToolTipText = "Exit ";
//
// ImageViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel1);
this.Name = "ImageViewer";
this.Size = new System.Drawing.Size(634, 747);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem tsmClose;
private System.Windows.Forms.ToolStripMenuItem tsmTools;
private System.Windows.Forms.ToolStripMenuItem tsmNormal;
private System.Windows.Forms.ToolStripMenuItem tsmZoomIn;
private System.Windows.Forms.ToolStripMenuItem tsmFit;
private System.Windows.Forms.ToolStripMenuItem tsmTZoomIn;
private System.Windows.Forms.ToolStripMenuItem tsmTZoomOut;
private System.Windows.Forms.ToolStripMenuItem tsmTRotateClockWise;
private System.Windows.Forms.ToolStripMenuItem tsmTRotateAntiClockWise;
private System.Windows.Forms.ToolStripMenuItem tsmZoomOut;
private System.Windows.Forms.ToolStripMenuItem tsmZoom;
private System.Windows.Forms.ToolStripComboBox tsmZoomSize;
private System.Windows.Forms.ToolStripMenuItem tsmExit;
private System.Windows.Forms.ToolStripMenuItem tsmRotateclockWise;
private System.Windows.Forms.ToolStripMenuItem tsmRotateAntiClockWise;
private Cyotek.Windows.Forms.ImageBox imageBox1;
private System.Windows.Forms.ToolStripMenuItem tsmPrint;
}
}
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Printing;
namespace TestEasyCon
{
public partial class ImageViewer : UserControl
{
public ImageViewer()
{
InitializeComponent();
tsmClose.Click += new EventHandler(CloseButtonClicked);
tsmExit.Click += new EventHandler(CloseButtonClicked);
}
#region Declaration
public delegate void CloseButtonEventHandler(object sender, EventArgs e);
public event CloseButtonEventHandler ClickCloseButton;
Image imgFile =null;
#endregion
#region Functions
private void CloseButtonClicked(object sender, EventArgs e)
{
if (ClickCloseButton != null)
ClickCloseButton(this, e);
}
/// <summary>
/// Image Processing
/// </summary>
/// <param name="mode">Pass Mode(Normal|ZoomIn|Zoom Out|rotate Clock Wise|Rotate AnitClockWise)</param>
private void ImageProcessing(string mode)
{
switch (mode)
{
case "Normal":
imageBox1.SizeToFit = true;
imageBox1.SizeToFit = false;
tsmZoomIn.Enabled = true;
tsmTZoomIn.Enabled = true;
tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
break;
case "ZoomIn":
imageBox1.Zoom += 50;
tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
break;
case "ZoomOut":
imageBox1.Zoom -= 50;
tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
break;
case "RotateClockWise":
Image img = imageBox1.Image;
img.RotateFlip(RotateFlipType.Rotate270FlipXY);
Image imgtemp = img;
imageBox1.Image = imgtemp;
imageBox1.Refresh();
break;
case "RotateAntiClockWise":
Image img1 = imageBox1.Image;
img1.RotateFlip(RotateFlipType.Rotate90FlipXY);
Image imgtemp1 = img1;
imageBox1.Image = imgtemp1;
imageBox1.Refresh();
break;
}
}
/// <summary>
/// Print Image Document
/// </summary>
/// <param name="path">Pass Path</param>
public void PrintDocument(string path)
{
try
{
imgFile = Image.FromFile(path);
PrintDocument prntDoc = new PrintDocument();
PrintDialog prdDia = new PrintDialog();
prntDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage);
prdDia.AllowPrintToFile = true;
prdDia.AllowSelection = true;
prdDia.AllowSomePages = true;
prdDia.PrintToFile = true;
DialogResult dialogue = prdDia.ShowDialog();
if (dialogue == DialogResult.OK)
{
prntDoc.DocumentName = path;
prntDoc.Print();
}
prdDia.Dispose();
}
catch (Exception ex)
{
Program.WriteLog(ex.Message, ex.StackTrace);
}
}
private void printDoc_PrintPage(object sender, PrintPageEventArgs e)
{
Point ulCorner = new Point(0, 0);
e.Graphics.DrawImage(imgFile, ulCorner);
}
#endregion
}
}
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Printing;
namespace TestEasyCon
{
public partial class ImageViewer : UserControl
{
public ImageViewer()
{
InitializeComponent();
tsmClose.Click += new EventHandler(CloseButtonClicked);
tsmExit.Click += new EventHandler(CloseButtonClicked);
}
#region Declaration
public delegate void CloseButtonEventHandler(object sender, EventArgs e);
public event CloseButtonEventHandler ClickCloseButton;
Image imgFile =null;
#endregion
#region Functions
private void CloseButtonClicked(object sender, EventArgs e)
{
if (ClickCloseButton != null)
ClickCloseButton(this, e);
}
/// <summary>
/// Image Processing
/// </summary>
/// <param name="mode">Pass Mode(Normal|ZoomIn|Zoom Out|rotate Clock Wise|Rotate AnitClockWise)</param>
private void ImageProcessing(string mode)
{
switch (mode)
{
case "Normal":
imageBox1.SizeToFit = true;
imageBox1.SizeToFit = false;
tsmZoomIn.Enabled = true;
tsmTZoomIn.Enabled = true;
tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
break;
case "ZoomIn":
imageBox1.Zoom += 50;
tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
break;
case "ZoomOut":
imageBox1.Zoom -= 50;
tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
break;
case "RotateClockWise":
Image img = imageBox1.Image;
img.RotateFlip(RotateFlipType.Rotate270FlipXY);
Image imgtemp = img;
imageBox1.Image = imgtemp;
imageBox1.Refresh();
break;
case "RotateAntiClockWise":
Image img1 = imageBox1.Image;
img1.RotateFlip(RotateFlipType.Rotate90FlipXY);
Image imgtemp1 = img1;
imageBox1.Image = imgtemp1;
imageBox1.Refresh();
break;
}
}
/// <summary>
/// Print Image Document
/// </summary>
/// <param name="path">Pass Path</param>
public void PrintDocument(string path)
{
try
{
imgFile = Image.FromFile(path);
PrintDocument prntDoc = new PrintDocument();
PrintDialog prdDia = new PrintDialog();
prntDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage);
prdDia.AllowPrintToFile = true;
prdDia.AllowSelection = true;
prdDia.AllowSomePages = true;
prdDia.PrintToFile = true;
DialogResult dialogue = prdDia.ShowDialog();
if (dialogue == DialogResult.OK)
{
prntDoc.DocumentName = path;
prntDoc.Print();
}
prdDia.Dispose();
}
catch (Exception ex)
{
Program.WriteLog(ex.Message, ex.StackTrace);
}
}
private void printDoc_PrintPage(object sender, PrintPageEventArgs e)
{
Point ulCorner = new Point(0, 0);
e.Graphics.DrawImage(imgFile, ulCorner);
}
#endregion
}
}
No comments:
Post a Comment