- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- namespace SimpleWinApp
- {
- /// <summary>
- /// Summary description for Phone.
- /// </summary>
- public class Phone : System.Windows.Forms.Form
- {
- private System.Windows.Forms.TextBox txtPhone;
- private System.Windows.Forms.Button btnOK;
- private System.Windows.Forms.Button btnCancel;
- private System.Windows.Forms.Label label1;
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.Container components = null;
- public Phone()
- {
- //
- // 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()
- {
- this.txtPhone = new System.Windows.Forms.TextBox();
- this.btnOK = new System.Windows.Forms.Button();
- this.btnCancel = new System.Windows.Forms.Button();
- this.label1 = new System.Windows.Forms.Label();
- this.SuspendLayout();
- //
- // txtPhone
- //
- this.txtPhone.Location = new System.Drawing.Point(112, 32);
- this.txtPhone.Name = "txtPhone";
- this.txtPhone.TabIndex = 0;
- this.txtPhone.Text = "";
- //
- // btnOK
- //
- this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.btnOK.Location = new System.Drawing.Point(48, 88);
- this.btnOK.Name = "btnOK";
- this.btnOK.TabIndex = 1;
- this.btnOK.Text = "OK";
- //
- // btnCancel
- //
- this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnCancel.Location = new System.Drawing.Point(152, 88);
- this.btnCancel.Name = "btnCancel";
- this.btnCancel.TabIndex = 2;
- this.btnCancel.Text = "Cancel";
- //
- // label1
- //
- this.label1.Location = new System.Drawing.Point(8, 32);
- this.label1.Name = "label1";
- this.label1.TabIndex = 3;
- this.label1.Text = "Enter Phone #:";
- this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- //
- // Phone
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(264, 155);
- this.ControlBox = false;
- this.Controls.Add(this.label1);
- this.Controls.Add(this.btnCancel);
- this.Controls.Add(this.btnOK);
- this.Controls.Add(this.txtPhone);
- this.HelpButton = true;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "Phone";
- this.ShowInTaskbar = false;
- this.Text = "Phone";
- this.ResumeLayout(false);
- }
- #endregion
- public string PhoneNumber
- {
- get {return txtPhone.Text;}
- set {txtPhone.Text = value;}
- }
- }
- }