📄 formmain.cs
字号:
//-----------------------------------------------------------------------------
// Code from _Programming the .NET Compact Framework with C#_
// and _Programming the .NET Compact Framework with VB_
// (c) Copyright 2002-2004 Paul Yao and David Durant.
// All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
namespace RegisterMembers
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class FormRegister : System.Windows.Forms.Form
{
internal System.Windows.Forms.Panel panelChild;
internal System.Windows.Forms.Label lblGender;
internal System.Windows.Forms.RadioButton optFemale;
internal System.Windows.Forms.RadioButton optMale;
internal System.Windows.Forms.Label lblBorn;
internal System.Windows.Forms.TextBox textBorn;
internal System.Windows.Forms.Panel panelWho;
internal System.Windows.Forms.TextBox textName;
internal System.Windows.Forms.Label lblName;
internal System.Windows.Forms.Label lblID;
internal System.Windows.Forms.TextBox textID;
internal System.Windows.Forms.Panel panelSponsor;
internal System.Windows.Forms.Label lblSponsID;
internal System.Windows.Forms.TextBox textSponsID;
internal System.Windows.Forms.Panel panelAddress;
internal System.Windows.Forms.ComboBox cboxCity;
internal System.Windows.Forms.Label lblSP;
internal System.Windows.Forms.Label lblCity;
internal System.Windows.Forms.Label lblStreet;
internal System.Windows.Forms.TextBox textSP;
internal System.Windows.Forms.TextBox textCity;
internal System.Windows.Forms.TextBox textStreet;
internal System.Windows.Forms.Label lblPC;
internal System.Windows.Forms.TextBox textPC;
internal System.Windows.Forms.Panel panelMemberType;
internal System.Windows.Forms.RadioButton optAssociate;
internal System.Windows.Forms.RadioButton optChild;
internal System.Windows.Forms.RadioButton optAdult;
internal System.Windows.Forms.Button cmdAdd;
private System.Windows.Forms.MainMenu mainMenu1;
private string genderMember;
public FormRegister()
{
//
// 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 )
{
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.mainMenu1 = new System.Windows.Forms.MainMenu();
this.panelChild = new System.Windows.Forms.Panel();
this.lblGender = new System.Windows.Forms.Label();
this.optFemale = new System.Windows.Forms.RadioButton();
this.optMale = new System.Windows.Forms.RadioButton();
this.lblBorn = new System.Windows.Forms.Label();
this.textBorn = new System.Windows.Forms.TextBox();
this.panelWho = new System.Windows.Forms.Panel();
this.textName = new System.Windows.Forms.TextBox();
this.lblName = new System.Windows.Forms.Label();
this.lblID = new System.Windows.Forms.Label();
this.textID = new System.Windows.Forms.TextBox();
this.panelSponsor = new System.Windows.Forms.Panel();
this.lblSponsID = new System.Windows.Forms.Label();
this.textSponsID = new System.Windows.Forms.TextBox();
this.panelAddress = new System.Windows.Forms.Panel();
this.cboxCity = new System.Windows.Forms.ComboBox();
this.lblSP = new System.Windows.Forms.Label();
this.lblCity = new System.Windows.Forms.Label();
this.lblStreet = new System.Windows.Forms.Label();
this.textSP = new System.Windows.Forms.TextBox();
this.textCity = new System.Windows.Forms.TextBox();
this.textStreet = new System.Windows.Forms.TextBox();
this.lblPC = new System.Windows.Forms.Label();
this.textPC = new System.Windows.Forms.TextBox();
this.panelMemberType = new System.Windows.Forms.Panel();
this.optAssociate = new System.Windows.Forms.RadioButton();
this.optChild = new System.Windows.Forms.RadioButton();
this.optAdult = new System.Windows.Forms.RadioButton();
this.cmdAdd = new System.Windows.Forms.Button();
//
// panelChild
//
this.panelChild.Controls.Add(this.lblGender);
this.panelChild.Controls.Add(this.optFemale);
this.panelChild.Controls.Add(this.optMale);
this.panelChild.Controls.Add(this.lblBorn);
this.panelChild.Controls.Add(this.textBorn);
this.panelChild.Location = new System.Drawing.Point(4, 189);
this.panelChild.Size = new System.Drawing.Size(232, 48);
//
// lblGender
//
this.lblGender.Location = new System.Drawing.Point(8, 0);
this.lblGender.Size = new System.Drawing.Size(56, 20);
this.lblGender.Text = "Gender";
this.lblGender.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// optFemale
//
this.optFemale.Location = new System.Drawing.Point(73, 0);
this.optFemale.Size = new System.Drawing.Size(32, 20);
this.optFemale.Text = "F";
//
// optMale
//
this.optMale.Location = new System.Drawing.Point(112, 0);
this.optMale.Size = new System.Drawing.Size(32, 20);
this.optMale.Text = "M";
//
// lblBorn
//
this.lblBorn.Location = new System.Drawing.Point(8, 24);
this.lblBorn.Size = new System.Drawing.Size(56, 20);
this.lblBorn.Text = "Born";
this.lblBorn.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// textBorn
//
this.textBorn.Location = new System.Drawing.Point(72, 23);
this.textBorn.Text = "";
//
// panelWho
//
this.panelWho.Controls.Add(this.textName);
this.panelWho.Controls.Add(this.lblName);
this.panelWho.Controls.Add(this.lblID);
this.panelWho.Controls.Add(this.textID);
this.panelWho.Location = new System.Drawing.Point(4, 45);
this.panelWho.Size = new System.Drawing.Size(232, 48);
//
// textName
//
this.textName.Location = new System.Drawing.Point(72, 24);
this.textName.Text = "";
//
// lblName
//
this.lblName.Location = new System.Drawing.Point(8, 25);
this.lblName.Size = new System.Drawing.Size(56, 20);
this.lblName.Text = "Name";
this.lblName.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// lblID
//
this.lblID.Location = new System.Drawing.Point(8, 0);
this.lblID.Size = new System.Drawing.Size(56, 20);
this.lblID.Text = "ID No";
this.lblID.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// textID
//
this.textID.Location = new System.Drawing.Point(72, 0);
this.textID.Text = "";
//
// panelSponsor
//
this.panelSponsor.Controls.Add(this.lblSponsID);
this.panelSponsor.Controls.Add(this.textSponsID);
this.panelSponsor.Location = new System.Drawing.Point(4, 93);
this.panelSponsor.Size = new System.Drawing.Size(232, 24);
//
// lblSponsID
//
this.lblSponsID.Location = new System.Drawing.Point(8, 1);
this.lblSponsID.Size = new System.Drawing.Size(56, 20);
this.lblSponsID.Text = "Spons ID";
this.lblSponsID.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// textSponsID
//
this.textSponsID.Location = new System.Drawing.Point(72, 0);
this.textSponsID.Text = "";
//
// panelAddress
//
this.panelAddress.Controls.Add(this.cboxCity);
this.panelAddress.Controls.Add(this.lblSP);
this.panelAddress.Controls.Add(this.lblCity);
this.panelAddress.Controls.Add(this.lblStreet);
this.panelAddress.Controls.Add(this.textSP);
this.panelAddress.Controls.Add(this.textCity);
this.panelAddress.Controls.Add(this.textStreet);
this.panelAddress.Controls.Add(this.lblPC);
this.panelAddress.Controls.Add(this.textPC);
this.panelAddress.Location = new System.Drawing.Point(4, 117);
this.panelAddress.Size = new System.Drawing.Size(232, 72);
//
// cboxCity
//
this.cboxCity.Items.Add("Seattle");
this.cboxCity.Items.Add("Bellevue");
this.cboxCity.Items.Add("Kirkland");
this.cboxCity.Items.Add("Redmond");
this.cboxCity.Items.Add("Bothell");
this.cboxCity.Items.Add("Monroe");
this.cboxCity.Location = new System.Drawing.Point(72, 23);
this.cboxCity.Size = new System.Drawing.Size(152, 22);
this.cboxCity.SelectedIndexChanged += new System.EventHandler(this.cboxCity_SelectedIndexChanged);
//
// lblSP
//
this.lblSP.Location = new System.Drawing.Point(8, 48);
this.lblSP.Size = new System.Drawing.Size(56, 20);
this.lblSP.Text = "SP";
this.lblSP.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// lblCity
//
this.lblCity.Location = new System.Drawing.Point(8, 26);
this.lblCity.Size = new System.Drawing.Size(56, 20);
this.lblCity.Text = "City";
this.lblCity.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// lblStreet
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -