In this task, you will create the Class Schedule Windows application by using Visual Studio 2008.
在這一任務中,你将使用Visual Studio 2008 建立ClassSchedule窗體應用程式
On the File menu, point to New, and click Project.
在檔案菜單點選建立項目。(我用的VS2008Bata2 Team Suite中文版和幫助上的步驟略有不同)
Choose either Visual Basic or Visual C# in the Project Types pane.
在項目類型面闆中選擇Visual Basic或Visual C#。
Select Windows Forms Application in the Templates pane.
在模闆面闆中選擇Windows窗體應用程式。
Enter ClassSchedule for the project name, and then click OK.
給項目起名為ClassSchedule,然後單擊确定。(右上角的.NET架構版本選擇器應該選3.5哦)
In the ClassSchedule project, select the default form (Form1), change the Name property to StudentSchedule, and change the Text property to Student Schedule.
在ClassSchedule項目中選擇預設窗體(Form1),修改窗體的Name屬性為StudentSchedule,再修改Text屬性為Student Schedule。
In the Solution Explorer, double-click the StudentSchedule form.
在解決方案資料總管中,輕按兩下StudentSchedule窗體。
This opens the form designer.
該操作打開窗體設計器(暈,預設就已經打開了啊)
In the Toolbox, expand Common Controls, drag the ComboBox control to the form, and change the name of the control to studentsList. 在左側的工具箱裡,展開公共控件面闆,向窗體上拖放一個組合框控件,将該控件的Name屬性修改成studentsList。
In the Toolbox, drag the Button control to the form, change the name of the control to closeForm, and change the Text value to Close.
再次從工具箱向窗體拖放一個按鈕控件,更改按鈕控件的Name屬性為closeForm,Text屬性修改為Close。
In the Toolbox, expand Data, drag the DataGridView control to the form, and change the name of the control to studentClasses.
展開左側工具箱的資料面闆,拖放一個資料表檢視器控件到窗體上。更改他的Name屬性為stucentClasses.
Double-click the closeForm button control.
滑鼠輕按兩下窗體上的closeForm按鈕。
This opens the code page for the form and creates the closeForm_Click event handler method.
本步驟将打開目前窗體的代碼視圖并自動為closeForm按鈕建立closeForm_Click事件處理方法
In the closeForm_Click event handler method, type the following code that closes the form:
在closeForm_Click事件處理方法的方法體内按實際項目語言輸入下列代碼以關閉視窗。
Visual Basic
C#
You have successfully created the class scheduling application. Next you will generate the mapping files that describe an Entity Data Model (EDM) based on a 1:1 mapping against the School database that you created in the first task:
您已經成功建立了ClassSchedule應用程式.下一步你将開始使用在第一個任務中建立的學校資料庫來生成一個與資料庫一一對應的實體資料模型映射檔案.
<a href="http://www.cnblogs.com/Chinese-xu/archive/2007/09/26/906462.html">Generating the School Entity Data Model/生成學校實體資料模型</a>
<a href="http://www.cnblogs.com/Chinese-xu/archive/2007/09/21/901118.html">Quickstart (Entity Framework)/快速入門(實體架構)</a>
Feature Reference (Entity Framework)/功能參考(實體架構)
本文版權歸作者和部落格園共有,歡迎轉載,但未經作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接配接。

本文轉自徐少俠部落格園部落格,原文連結:http://www.cnblogs.com/Chinese-xu/archive/2007/09/21/901399.html,如需轉載請自行聯系原作者