this.btCompute.TabIndex = 1; this.btCompute.Text = "Compute"; this.btCompute.Click += new System.EventHandler(this.btCompute_Click); //
// Form1 //
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(393, 333); this.Controls.Add(this.btCompute); this.Controls.Add(this.lsVac); http://www.77cn.com.cn = "Form1";
this.Text = "Visitor demo"; this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application. /// </summary> [STAThread]
static void Main() {
Application.Run(new Form1()); }
private void btCompute_Click(object sender, System.EventArgs e) {
VacationVisitor vac = new VacationVisitor();
for (int i = 0; i< empls.Length; i++) {
//empls[i].accept(vac); //get the employee
lsVac.Items.Add("学生" + vac.getstudentname().ToString()); }
} }