using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace 頂層套件
{
/// <summary>
/// Form1 的摘要描述。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
/// <summary>
/// ?#93;計工具所需的變數。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows Form ?#93;計工具支援的必要項
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 呼叫之後?#91;入任何建構函式?#123;式碼
//
}
/// <summary>
/// 清除任何使用中的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form ?#93;計工具產生的?#123;式碼
/// <summary>
/// 此為?#93;計工具支援所必須的方法 - 請勿使用?#123;式碼編輯器修改
/// 這個方法的內容。
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(40, 112);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 15);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 應用?#123;式的主進入點。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
Customer peter = new Customer("test");
//peter.Reservations[5].Engineer.Reservation[4].Customer.Reservations[2];
}
private void button1_Click(object sender, System.EventArgs e)
{
Customer c = new Customer("AB-123");
//foreach(Reservation r in c.Reservations)
MessageBox.Show(c.CustomerName);
//MessageBox.Show(r.ReservedTime.ToString());
}
}
}