📄 addstudent.cs
字号:
this.txtAddress.Multiline = ((bool)(resources.GetObject("txtAddress.Multiline")));
this.txtAddress.Name = "txtAddress";
this.txtAddress.PasswordChar = ((char)(resources.GetObject("txtAddress.PasswordChar")));
this.txtAddress.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtAddress.RightToLeft")));
this.txtAddress.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtAddress.ScrollBars")));
this.txtAddress.Size = ((System.Drawing.Size)(resources.GetObject("txtAddress.Size")));
this.txtAddress.TabIndex = ((int)(resources.GetObject("txtAddress.TabIndex")));
this.txtAddress.Text = resources.GetString("txtAddress.Text");
this.txtAddress.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtAddress.TextAlign")));
this.txtAddress.Visible = ((bool)(resources.GetObject("txtAddress.Visible")));
this.txtAddress.WordWrap = ((bool)(resources.GetObject("txtAddress.WordWrap")));
//
// lblCode
//
this.lblCode.AccessibleDescription = resources.GetString("lblCode.AccessibleDescription");
this.lblCode.AccessibleName = resources.GetString("lblCode.AccessibleName");
this.lblCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCode.Anchor")));
this.lblCode.AutoSize = ((bool)(resources.GetObject("lblCode.AutoSize")));
this.lblCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCode.Dock")));
this.lblCode.Enabled = ((bool)(resources.GetObject("lblCode.Enabled")));
this.lblCode.Font = ((System.Drawing.Font)(resources.GetObject("lblCode.Font")));
this.lblCode.Image = ((System.Drawing.Image)(resources.GetObject("lblCode.Image")));
this.lblCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCode.ImageAlign")));
this.lblCode.ImageIndex = ((int)(resources.GetObject("lblCode.ImageIndex")));
this.lblCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCode.ImeMode")));
this.lblCode.Location = ((System.Drawing.Point)(resources.GetObject("lblCode.Location")));
this.lblCode.Name = "lblCode";
this.lblCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCode.RightToLeft")));
this.lblCode.Size = ((System.Drawing.Size)(resources.GetObject("lblCode.Size")));
this.lblCode.TabIndex = ((int)(resources.GetObject("lblCode.TabIndex")));
this.lblCode.Text = resources.GetString("lblCode.Text");
this.lblCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCode.TextAlign")));
this.lblCode.Visible = ((bool)(resources.GetObject("lblCode.Visible")));
//
// txtAreacode
//
this.txtAreacode.AccessibleDescription = resources.GetString("txtAreacode.AccessibleDescription");
this.txtAreacode.AccessibleName = resources.GetString("txtAreacode.AccessibleName");
this.txtAreacode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtAreacode.Anchor")));
this.txtAreacode.AutoSize = ((bool)(resources.GetObject("txtAreacode.AutoSize")));
this.txtAreacode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtAreacode.BackgroundImage")));
this.txtAreacode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtAreacode.Dock")));
this.txtAreacode.Enabled = ((bool)(resources.GetObject("txtAreacode.Enabled")));
this.txtAreacode.Font = ((System.Drawing.Font)(resources.GetObject("txtAreacode.Font")));
this.txtAreacode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtAreacode.ImeMode")));
this.txtAreacode.Location = ((System.Drawing.Point)(resources.GetObject("txtAreacode.Location")));
this.txtAreacode.MaxLength = ((int)(resources.GetObject("txtAreacode.MaxLength")));
this.txtAreacode.Multiline = ((bool)(resources.GetObject("txtAreacode.Multiline")));
this.txtAreacode.Name = "txtAreacode";
this.txtAreacode.PasswordChar = ((char)(resources.GetObject("txtAreacode.PasswordChar")));
this.txtAreacode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtAreacode.RightToLeft")));
this.txtAreacode.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtAreacode.ScrollBars")));
this.txtAreacode.Size = ((System.Drawing.Size)(resources.GetObject("txtAreacode.Size")));
this.txtAreacode.TabIndex = ((int)(resources.GetObject("txtAreacode.TabIndex")));
this.txtAreacode.Text = resources.GetString("txtAreacode.Text");
this.txtAreacode.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtAreacode.TextAlign")));
this.txtAreacode.Visible = ((bool)(resources.GetObject("txtAreacode.Visible")));
this.txtAreacode.WordWrap = ((bool)(resources.GetObject("txtAreacode.WordWrap")));
//
// txtLastName
//
this.txtLastName.AccessibleDescription = resources.GetString("txtLastName.AccessibleDescription");
this.txtLastName.AccessibleName = resources.GetString("txtLastName.AccessibleName");
this.txtLastName.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtLastName.Anchor")));
this.txtLastName.AutoSize = ((bool)(resources.GetObject("txtLastName.AutoSize")));
this.txtLastName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtLastName.BackgroundImage")));
this.txtLastName.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtLastName.Dock")));
this.txtLastName.Enabled = ((bool)(resources.GetObject("txtLastName.Enabled")));
this.txtLastName.Font = ((System.Drawing.Font)(resources.GetObject("txtLastName.Font")));
this.txtLastName.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtLastName.ImeMode")));
this.txtLastName.Location = ((System.Drawing.Point)(resources.GetObject("txtLastName.Location")));
this.txtLastName.MaxLength = ((int)(resources.GetObject("txtLastName.MaxLength")));
this.txtLastName.Multiline = ((bool)(resources.GetObject("txtLastName.Multiline")));
this.txtLastName.Name = "txtLastName";
this.txtLastName.PasswordChar = ((char)(resources.GetObject("txtLastName.PasswordChar")));
this.txtLastName.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtLastName.RightToLeft")));
this.txtLastName.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtLastName.ScrollBars")));
this.txtLastName.Size = ((System.Drawing.Size)(resources.GetObject("txtLastName.Size")));
this.txtLastName.TabIndex = ((int)(resources.GetObject("txtLastName.TabIndex")));
this.txtLastName.Text = resources.GetString("txtLastName.Text");
this.txtLastName.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtLastName.TextAlign")));
this.txtLastName.Visible = ((bool)(resources.GetObject("txtLastName.Visible")));
this.txtLastName.WordWrap = ((bool)(resources.GetObject("txtLastName.WordWrap")));
//
// AddStudentForm
//
this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
this.AccessibleName = resources.GetString("$this.AccessibleName");
this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnAddStudent);
this.Controls.Add(this.grpCourse);
this.Controls.Add(this.grpDetails);
this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
this.MaximizeBox = false;
this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
this.MinimizeBox = false;
this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
this.Name = "AddStudentForm";
this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
this.ShowInTaskbar = false;
this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
this.Text = resources.GetString("$this.Text");
this.Load += new System.EventHandler(this.AddStudentForm_Load);
this.grpCourse.ResumeLayout(false);
this.grpDetails.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
// pass all the parameters to DisplayStudentDetailsForm
private void btnAddStudent_Click(object sender, System.EventArgs e)
{
DisplayStudentDetailsForm objDetailStdForm = new DisplayStudentDetailsForm();
objDetailStdForm.lblStdEnNoDetail.Text = this.txtStdEnNo.Text;
objDetailStdForm.lblNameDetails.Text = this.txtFirstName.Text + " "+ this.txtMiddleName.Text+ " " + this.txtLastName.Text + "\n\n";
if(this.radMale.Checked)
{
objDetailStdForm.lblSexDetail.Text = "男" + "\n\n";
}
else
objDetailStdForm.lblSexDetail.Text = "女" + "\n\n";
objDetailStdForm.lblCoursesDetail.Text = "";
object[] objCheckedItems = new object[this.lstCourseList.SelectedItems.Count];
int i=0;
foreach(object objItem in this.lstCourseList.SelectedItems)
{
objCheckedItems[i] = objItem;
objDetailStdForm.lblCoursesDetail.Text +=objCheckedItems.GetValue(i).ToString();
objDetailStdForm.lblCoursesDetail.Text += "\n";
i++;
}
objDetailStdForm.lblCourseTypeDetail.Text = this.cboStudentType.SelectedText.ToString();
objDetailStdForm.lblAddressDetail.Text = this.txtAddress.Text;
objDetailStdForm.lblPerAddressDetail.Text = this.txtPerAddress.Text;
objDetailStdForm.ShowDialog();
}
private void AddStudentForm_Load(object sender, System.EventArgs e)
{
this.cboStudentType.Text = this.cboStudentType.Items[0].ToString();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -