Click here to Skip to main content
15,896,475 members
Articles / Desktop Programming / Windows Forms

How Programming Should Be Done

Rate me:
Please Sign up or sign in to vote.
4.90/5 (48 votes)
15 Jun 2009CPOL18 min read 78.4K   395   171  
Cx: A prototype on component loose coupling.
namespace NumericKeypadComponent
{
	partial class NumericKeypad
	{
		/// <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()
		{
			this.btn7 = new System.Windows.Forms.Button();
			this.btnPoint = new System.Windows.Forms.Button();
			this.btn3 = new System.Windows.Forms.Button();
			this.btn2 = new System.Windows.Forms.Button();
			this.btn1 = new System.Windows.Forms.Button();
			this.btn6 = new System.Windows.Forms.Button();
			this.btn5 = new System.Windows.Forms.Button();
			this.btn4 = new System.Windows.Forms.Button();
			this.btn9 = new System.Windows.Forms.Button();
			this.btn8 = new System.Windows.Forms.Button();
			this.btn0 = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// btn7
			// 
			this.btn7.Location = new System.Drawing.Point(4, 4);
			this.btn7.Name = "btn7";
			this.btn7.Size = new System.Drawing.Size(33, 23);
			this.btn7.TabIndex = 0;
			this.btn7.Tag = "7";
			this.btn7.Text = "7";
			this.btn7.UseVisualStyleBackColor = true;
			this.btn7.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btnPoint
			// 
			this.btnPoint.Location = new System.Drawing.Point(82, 91);
			this.btnPoint.Name = "btnPoint";
			this.btnPoint.Size = new System.Drawing.Size(33, 23);
			this.btnPoint.TabIndex = 1;
			this.btnPoint.Tag = ".";
			this.btnPoint.Text = ".";
			this.btnPoint.UseVisualStyleBackColor = true;
			this.btnPoint.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn3
			// 
			this.btn3.Location = new System.Drawing.Point(82, 62);
			this.btn3.Name = "btn3";
			this.btn3.Size = new System.Drawing.Size(33, 23);
			this.btn3.TabIndex = 2;
			this.btn3.Tag = "3";
			this.btn3.Text = "3";
			this.btn3.UseVisualStyleBackColor = true;
			this.btn3.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn2
			// 
			this.btn2.Location = new System.Drawing.Point(43, 62);
			this.btn2.Name = "btn2";
			this.btn2.Size = new System.Drawing.Size(33, 23);
			this.btn2.TabIndex = 3;
			this.btn2.Tag = "2";
			this.btn2.Text = "2";
			this.btn2.UseVisualStyleBackColor = true;
			this.btn2.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn1
			// 
			this.btn1.Location = new System.Drawing.Point(3, 62);
			this.btn1.Name = "btn1";
			this.btn1.Size = new System.Drawing.Size(33, 23);
			this.btn1.TabIndex = 4;
			this.btn1.Tag = "1";
			this.btn1.Text = "1";
			this.btn1.UseVisualStyleBackColor = true;
			this.btn1.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn6
			// 
			this.btn6.Location = new System.Drawing.Point(82, 33);
			this.btn6.Name = "btn6";
			this.btn6.Size = new System.Drawing.Size(33, 23);
			this.btn6.TabIndex = 5;
			this.btn6.Tag = "6";
			this.btn6.Text = "6";
			this.btn6.UseVisualStyleBackColor = true;
			this.btn6.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn5
			// 
			this.btn5.Location = new System.Drawing.Point(43, 33);
			this.btn5.Name = "btn5";
			this.btn5.Size = new System.Drawing.Size(33, 23);
			this.btn5.TabIndex = 6;
			this.btn5.Tag = "5";
			this.btn5.Text = "5";
			this.btn5.UseVisualStyleBackColor = true;
			this.btn5.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn4
			// 
			this.btn4.Location = new System.Drawing.Point(4, 33);
			this.btn4.Name = "btn4";
			this.btn4.Size = new System.Drawing.Size(33, 23);
			this.btn4.TabIndex = 7;
			this.btn4.Tag = "4";
			this.btn4.Text = "4";
			this.btn4.UseVisualStyleBackColor = true;
			this.btn4.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn9
			// 
			this.btn9.Location = new System.Drawing.Point(82, 4);
			this.btn9.Name = "btn9";
			this.btn9.Size = new System.Drawing.Size(33, 23);
			this.btn9.TabIndex = 8;
			this.btn9.Tag = "9";
			this.btn9.Text = "9";
			this.btn9.UseVisualStyleBackColor = true;
			this.btn9.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn8
			// 
			this.btn8.Location = new System.Drawing.Point(43, 4);
			this.btn8.Name = "btn8";
			this.btn8.Size = new System.Drawing.Size(33, 23);
			this.btn8.TabIndex = 9;
			this.btn8.Tag = "8";
			this.btn8.Text = "8";
			this.btn8.UseVisualStyleBackColor = true;
			this.btn8.Click += new System.EventHandler(this.KeypadClick);
			// 
			// btn0
			// 
			this.btn0.Location = new System.Drawing.Point(43, 91);
			this.btn0.Name = "btn0";
			this.btn0.Size = new System.Drawing.Size(33, 23);
			this.btn0.TabIndex = 10;
			this.btn0.Tag = "0";
			this.btn0.Text = "0";
			this.btn0.UseVisualStyleBackColor = true;
			this.btn0.Click += new System.EventHandler(this.KeypadClick);
			// 
			// NumericKeypad
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.btn0);
			this.Controls.Add(this.btn8);
			this.Controls.Add(this.btn9);
			this.Controls.Add(this.btn4);
			this.Controls.Add(this.btn5);
			this.Controls.Add(this.btn6);
			this.Controls.Add(this.btn1);
			this.Controls.Add(this.btn2);
			this.Controls.Add(this.btn3);
			this.Controls.Add(this.btnPoint);
			this.Controls.Add(this.btn7);
			this.Name = "NumericKeypad";
			this.Size = new System.Drawing.Size(122, 125);
			this.ResumeLayout(false);

		}

		#endregion

		private System.Windows.Forms.Button btn7;
		private System.Windows.Forms.Button btnPoint;
		private System.Windows.Forms.Button btn3;
		private System.Windows.Forms.Button btn2;
		private System.Windows.Forms.Button btn1;
		private System.Windows.Forms.Button btn6;
		private System.Windows.Forms.Button btn5;
		private System.Windows.Forms.Button btn4;
		private System.Windows.Forms.Button btn9;
		private System.Windows.Forms.Button btn8;
		private System.Windows.Forms.Button btn0;
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Interacx
United States United States
Blog: https://marcclifton.wordpress.com/
Home Page: http://www.marcclifton.com
Research: http://www.higherorderprogramming.com/
GitHub: https://github.com/cliftonm

All my life I have been passionate about architecture / software design, as this is the cornerstone to a maintainable and extensible application. As such, I have enjoyed exploring some crazy ideas and discovering that they are not so crazy after all. I also love writing about my ideas and seeing the community response. As a consultant, I've enjoyed working in a wide range of industries such as aerospace, boatyard management, remote sensing, emergency services / data management, and casino operations. I've done a variety of pro-bono work non-profit organizations related to nature conservancy, drug recovery and women's health.

Comments and Discussions