using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace Northwind
{
	/// <summary>
	/// Summary description for frmCommonDialogs.
	/// </summary>
	public class frmCommonDialogs : System.Windows.Forms.Form
	{
		internal System.Windows.Forms.ColorDialog ColorDialog1;
		internal System.Windows.Forms.SaveFileDialog SaveFileDialog1;
		internal System.Windows.Forms.FolderBrowserDialog FolderBrowserDialog1;
		internal System.Windows.Forms.Button btnFolderBrowserDialog;
		internal System.Windows.Forms.Button btnSaveFileDialog;
		internal System.Windows.Forms.Button btnPrintPreviewDialog;
		internal System.Windows.Forms.Button PrintDialog;
		internal System.Windows.Forms.Button btnPageSetupDialog;
		internal System.Windows.Forms.PageSetupDialog PageSetupDialog1;
		internal System.Windows.Forms.Button btnOpenFileDialog;
		internal System.Windows.Forms.Button btnFontDialog;
		internal System.Windows.Forms.Button btnColorDialog;
		internal System.Windows.Forms.PrintDialog PrintDialog1;
		internal System.Windows.Forms.FontDialog FontDialog1;
		internal System.Windows.Forms.PrintPreviewDialog PrintPreviewDialog1;
		internal System.Windows.Forms.OpenFileDialog OpenFileDialog1;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmCommonDialogs()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmCommonDialogs));
			this.ColorDialog1 = new System.Windows.Forms.ColorDialog();
			this.SaveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
			this.FolderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
			this.btnFolderBrowserDialog = new System.Windows.Forms.Button();
			this.btnSaveFileDialog = new System.Windows.Forms.Button();
			this.btnPrintPreviewDialog = new System.Windows.Forms.Button();
			this.PrintDialog = new System.Windows.Forms.Button();
			this.btnPageSetupDialog = new System.Windows.Forms.Button();
			this.PageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
			this.btnOpenFileDialog = new System.Windows.Forms.Button();
			this.btnFontDialog = new System.Windows.Forms.Button();
			this.btnColorDialog = new System.Windows.Forms.Button();
			this.PrintDialog1 = new System.Windows.Forms.PrintDialog();
			this.FontDialog1 = new System.Windows.Forms.FontDialog();
			this.PrintPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
			this.OpenFileDialog1 = new System.Windows.Forms.OpenFileDialog();
			this.SuspendLayout();
			// 
			// btnFolderBrowserDialog
			// 
			this.btnFolderBrowserDialog.Location = new System.Drawing.Point(108, 93);
			this.btnFolderBrowserDialog.Name = "btnFolderBrowserDialog";
			this.btnFolderBrowserDialog.Size = new System.Drawing.Size(120, 23);
			this.btnFolderBrowserDialog.TabIndex = 15;
			this.btnFolderBrowserDialog.Text = "FolderBrowserDialog";
			this.btnFolderBrowserDialog.Click += new System.EventHandler(this.btnFolderBrowserDialog_Click);
			// 
			// btnSaveFileDialog
			// 
			this.btnSaveFileDialog.Location = new System.Drawing.Point(108, 321);
			this.btnSaveFileDialog.Name = "btnSaveFileDialog";
			this.btnSaveFileDialog.Size = new System.Drawing.Size(120, 23);
			this.btnSaveFileDialog.TabIndex = 14;
			this.btnSaveFileDialog.Text = "SaveFileDialog";
			this.btnSaveFileDialog.Click += new System.EventHandler(this.btnSaveFileDialog_Click);
			// 
			// btnPrintPreviewDialog
			// 
			this.btnPrintPreviewDialog.Location = new System.Drawing.Point(108, 283);
			this.btnPrintPreviewDialog.Name = "btnPrintPreviewDialog";
			this.btnPrintPreviewDialog.Size = new System.Drawing.Size(120, 23);
			this.btnPrintPreviewDialog.TabIndex = 13;
			this.btnPrintPreviewDialog.Text = "PrintPreviewDialog";
			this.btnPrintPreviewDialog.Click += new System.EventHandler(this.btnPrintPreviewDialog_Click);
			// 
			// PrintDialog
			// 
			this.PrintDialog.Location = new System.Drawing.Point(108, 245);
			this.PrintDialog.Name = "PrintDialog";
			this.PrintDialog.Size = new System.Drawing.Size(120, 23);
			this.PrintDialog.TabIndex = 12;
			this.PrintDialog.Text = "PrintDialog";
			this.PrintDialog.Click += new System.EventHandler(this.PrintDialog_Click);
			// 
			// btnPageSetupDialog
			// 
			this.btnPageSetupDialog.Location = new System.Drawing.Point(108, 207);
			this.btnPageSetupDialog.Name = "btnPageSetupDialog";
			this.btnPageSetupDialog.Size = new System.Drawing.Size(120, 23);
			this.btnPageSetupDialog.TabIndex = 11;
			this.btnPageSetupDialog.Text = "PageSetupDialog";
			this.btnPageSetupDialog.Click += new System.EventHandler(this.btnPageSetupDialog_Click);
			// 
			// btnOpenFileDialog
			// 
			this.btnOpenFileDialog.Location = new System.Drawing.Point(108, 169);
			this.btnOpenFileDialog.Name = "btnOpenFileDialog";
			this.btnOpenFileDialog.Size = new System.Drawing.Size(120, 23);
			this.btnOpenFileDialog.TabIndex = 10;
			this.btnOpenFileDialog.Text = "OpenFileDialog";
			this.btnOpenFileDialog.Click += new System.EventHandler(this.btnOpenFileDialog_Click);
			// 
			// btnFontDialog
			// 
			this.btnFontDialog.Location = new System.Drawing.Point(108, 131);
			this.btnFontDialog.Name = "btnFontDialog";
			this.btnFontDialog.Size = new System.Drawing.Size(120, 23);
			this.btnFontDialog.TabIndex = 9;
			this.btnFontDialog.Text = "FontDialog";
			this.btnFontDialog.Click += new System.EventHandler(this.btnFontDialog_Click);
			// 
			// btnColorDialog
			// 
			this.btnColorDialog.Location = new System.Drawing.Point(108, 55);
			this.btnColorDialog.Name = "btnColorDialog";
			this.btnColorDialog.Size = new System.Drawing.Size(120, 23);
			this.btnColorDialog.TabIndex = 8;
			this.btnColorDialog.Text = "ColorDialog";
			this.btnColorDialog.Click += new System.EventHandler(this.btnColorDialog_Click);
			// 
			// PrintPreviewDialog1
			// 
			this.PrintPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
			this.PrintPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
			this.PrintPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
			this.PrintPreviewDialog1.Enabled = true;
			this.PrintPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("PrintPreviewDialog1.Icon")));
			this.PrintPreviewDialog1.Location = new System.Drawing.Point(69, 43);
			this.PrintPreviewDialog1.MinimumSize = new System.Drawing.Size(375, 250);
			this.PrintPreviewDialog1.Name = "PrintPreviewDialog1";
			this.PrintPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
			this.PrintPreviewDialog1.Visible = false;
			// 
			// frmCommonDialogs
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(336, 398);
			this.Controls.Add(this.btnFontDialog);
			this.Controls.Add(this.btnColorDialog);
			this.Controls.Add(this.btnFolderBrowserDialog);
			this.Controls.Add(this.btnSaveFileDialog);
			this.Controls.Add(this.btnPrintPreviewDialog);
			this.Controls.Add(this.PrintDialog);
			this.Controls.Add(this.btnPageSetupDialog);
			this.Controls.Add(this.btnOpenFileDialog);
			this.Name = "frmCommonDialogs";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Common Dialogs";
			this.ResumeLayout(false);

		}
		#endregion

		private void btnColorDialog_Click(object sender, System.EventArgs e)
		{
			ColorDialog1.ShowDialog();
		}

		private void btnFolderBrowserDialog_Click(object sender, System.EventArgs e)
		{
			FolderBrowserDialog1.ShowDialog();
		}

		private void btnFontDialog_Click(object sender, System.EventArgs e)
		{
			FontDialog1.ShowDialog();
		}

		private void btnOpenFileDialog_Click(object sender, System.EventArgs e)
		{
			OpenFileDialog1.ShowDialog();
		}

		private void btnPageSetupDialog_Click(object sender, System.EventArgs e)
		{
			PageSetupDialog1.PageSettings = new 
				System.Drawing.Printing.PageSettings();
			PageSetupDialog1.ShowDialog();
		}

		private void PrintDialog_Click(object sender, System.EventArgs e)
		{
			PrintDialog1.PrinterSettings = new 
				System.Drawing.Printing.PrinterSettings();
			PrintDialog1.ShowDialog();
		}

		private void btnPrintPreviewDialog_Click(object sender, System.EventArgs e)
		{
			PrintPreviewDialog1.ShowDialog();
		}

		private void btnSaveFileDialog_Click(object sender, System.EventArgs e)
		{
			SaveFileDialog1.ShowDialog();
		}
	}
}
