1 / 16

LESSION 1 簡介視窗應用程式 Windows Application

LESSION 1 簡介視窗應用程式 Windows Application. 鄧姚文. 重要名詞. Console Application 主控台應用程式 Multiple Document Interface (MDI) 多重文件介面 Navigation Interface 瀏覽介面、導覽介面 Microsoft Design Principle Guideline 微軟設計原理準則 Single Document Interface (SDI) 單一文件介面 Windows Forms Application 視窗表單應用程式

Download Presentation

LESSION 1 簡介視窗應用程式 Windows Application

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LESSION 1簡介視窗應用程式Windows Application 鄧姚文

  2. 重要名詞 Console Application 主控台應用程式 Multiple Document Interface (MDI) 多重文件介面 Navigation Interface 瀏覽介面、導覽介面 Microsoft Design Principle Guideline 微軟設計原理準則 Single Document Interface (SDI) 單一文件介面 Windows Forms Application 視窗表單應用程式 Windows Presentation Foundation (WPF) 視窗展示系統 Windows Service Application 視窗服務應用程式

  3. 視窗程式的類型 • GUI 圖形使用者介面 • Windows Forms 傳統視窗 • WPF 新一代視窗 • Non-GUI 無圖形使用者介面 • Console Application 文字介面 • Windows Service 背景服務

  4. Windows Form 與 WPF 不同特點使用者介面控制項 User Interface Controls Windows Forms WPF 內建控制項40種 可自行以 XAML 建立使用者控制項 • 內建控制項(Prebuilt Control)70種 • 可自行以程式碼建立使用者控制項(User Control)

  5. Windows Form 與 WPF 不同特點使用者介面開發 Windows Forms WPF Visual Studio XAML 編輯器 Expression Blend GUI 設計 Code Behind 程式碼後置 • Visual Studio GUI 設計 • Code Behind 程式碼後置

  6. Windows Form 與 WPF 不同特點事件處理 Windows Forms WPF 處理標準視窗作業系統事件 Routed Event 事件路由 Bubble Up 依物件關係樹狀結構傳遞事件 • 處理標準視窗作業系統事件

  7. Windows Form 與 WPF 不同特點資料整合 Windows Forms WPF 資料存取介面 ADO.NET WCF Web Services Binding 控制項綁定資料 XAML • 資料存取介面 • ADO.NET • Binding 控制項綁定資料 • Datasource

  8. 簡介視窗非圖形介面應用程式Windows Non-GUI Application • Windows Service 視窗服務 • 在系統背景執行(看不到畫面) • 長期運行 Always Running • 控制:開始(Start)、停止(Stop)、暫停(Pause)、繼續(Resume) • 關機通知 • Console Application 主控台應用程式

  9. Win32 API • Application Interface (API) 應用程式介面 • 進階服務 advapi32.dll • 登錄檔 Registry • 使用者帳號 • 基礎服務 kernel32.dll • 檔案系統 • 執行緒 • 使用者介面 user32.dll • 按鈕、滑鼠、鍵盤

  10. MDI:同一個視窗內多個文件

  11. SDI:一個視窗僅限一個文件

  12. Windows 應用程式使用者介面設計原理 • MSDN 原文 • http://msdn.microsoft.com/en-us/library/aa511328.aspx • 視窗程式預設的螢幕解析度為 800x600 • 視窗應開啟在螢幕中間的位置 • 頁面上不要放太多控制項 • 控制項上面不要放太多字 • 返回前一頁時,恢復使用者先前輸入的內容 • 錯誤訊息內應顯示問題與解決問題的建議,而不是只顯示出了什麼錯 • Windows標準字型稱為Segoe,預設大小為9點 • 安裝程式執行速度要快,不要佔用太多時間 • 桌面捷徑的文字不要超過20個字

  13. 體驗一Say Hello: Console Application • 建立主控台應用程式,印出『你好!』 • 在 static void Main() 裡面加入 • Console.WriteLine("你好!"); • 執行時,選『啟動但不偵錯』,熱鍵為『Ctrl+F5』 • 『開始偵錯』熱鍵為F5,但是畫面一閃即過,看不到程式輸出的結果

  14. 體驗一Say Hello: Console Application

  15. 體驗一Say Hello: Console Application

  16. C# = C++++ ? • C# 念成 C Sharp(西-夏普) • 語法大致與 JAVA 相同 • 學過 C/C++ 或 JAVA 就看得懂 C# 語法 • 規矩 • 英文字母區分大小寫 • 每一行程式敘述必須以分號 ; 結束 • 以大括號{ } 標示程式區塊 • 重要性 • 近幾年微軟推出新技術,幾乎都是先出 C# 版,過一陣子才有 VB 版。C# 已經成為微軟的主要語言。

More Related