Microsoft PowerPoint - ch6.pptx

Size: px
Start display at page:

Download "Microsoft PowerPoint - ch6.pptx"

Transcription

1 .NET 程式設計入門 ( 使用 C#) 1

2 .NET 專案範本 2

3 檔案介紹 檔案 cs_form.sln cs_form.csproj cs_ form.exe Form1.cs Form1.resx assemblyinfo.cs cs_form.csproj.user csproj cs_form.suo App.ico 說明儲存方案中使用到那些檔案資料等資訊儲存專案中使用到那些檔案資料等資訊利用專案所編譯出來的執行檔儲存表單及程式碼相關資訊儲存表單中使用的相關資料描述組件的資訊專案目前編輯狀態記錄方案的編輯狀態應用程式圖示 3

4 方案總管 我們可以利用 [ 檢視 ] 中的 [ 方案總管 ] 來開啟方案總管視窗 圖示 功能說明切換到程式編輯視窗 切換到表單編輯視窗 重新整理 顯示所有檔案 打開屬性視窗 4

5 屬性視窗 在程式設計階段, 可以透過 [ 檢視 ] 中的 [ 屬性視窗 ] 來設定修改表單上各控制項的屬性值 圖示 功能說明 物件下拉選單 依屬性類型分類顯示 依屬性名稱排序顯示 顯示屬性視窗 顯示事件視窗 5

6 控制項 開啟 [ 檢視 ] 中的 [ 工具箱 ] 會列出常用控制項 要在表單中加入控制項的方式有二種 點選控制項後拖曳至表單上 連續點選控制項二下 重疊顯示二個控制項 可利用右鍵中的提到最上層或移到最下層來調整控制項顯示順序 6

7 表單及控制項常用屬性 外觀 Text 控制項的標題文字 BackColor 背景色 BackgroundImage 背景圖 Font 字型設定 ForeColor 前景色 行為 Enable 設定該控制項是否有作用 Visible 是否顯示該控制項 配置 Location 位置 ( 程式碼中可用 Left 及 Top 屬性設定 ) Size 大小 7

8 事件 在視窗程式設計中, 程式的執行流程是以使用者觸發的事件順序來決定 表單及控制項個別提供了許多不同的事件, 我們可以在不同的事件中撰寫不同的程式 當使用者觸發事件後, 程式的流程會立即跳至該事件內的程式區塊中執行 在事件視窗中, 點選事件名稱二下, 即可跳至程式碼編輯視窗該事件內的程式區塊 8

9 表單常用事件 Load 當表單被載入開啟時, 會執行此事件內的程式區段一次 Click 在表單上按下滑鼠左鍵, 會執行此事件內的程式區段一次 Resize 調整表單大小時, 會執行此事件內的程式區段一次 9

10 Label 控制項 Label 控制項主要是用來顯示文字 常用屬性 Text 設定要顯示的文字 TextAlign 設定文字顯示位置 Visible 是否顯示控制項 常用事件 Click 按一下時發生 MouseEnter 滑鼠經過 MouseLeave 滑鼠離開 10

11 實例探討 sample6-a1 a1 程式功能 猜謎語 程式內容 private void answerlb_click(object sender, System.EventArgs e) answerlb.text = " 灰熊厲害 "; } 11

12 課堂練習 sample6-b1 程式功能 猜謎語 當滑鼠移至題目上時, 題目的字改成 " 看解答 ", 當滑鼠移開後恢復成原本題目的文字 當使用者點選 " 看解答 " 時, 原本題目的文字變成解答 基本概念 利用 Click MouseEnter 及 MouseLeave 事件來完成 12

13 Button 控制項 Button 控制項提供按鈕功能 常用屬性 Text 設定要顯示的文字 TextAlign 設定文字顯示位置 Visible 是否顯示控制項 常用事件 Click 按一下時發生 MouseEnter 滑鼠經過 MouseLeave 滑鼠離開 13

14 實例探討 sample6-a2 a2 程式功能 設計結束視窗按鈕 設定表單上的 CancelButton 程式內容 private void closebtn_click(object sender, System.EventArgs e) Application.Exit(); } 14

15 TextBox 控制項 TextBox 控制項用以讓使用者輸入資料 常用屬性 Text 設定取得控制項中的文字 TextAlign 設定文字顯示位置 PasswordChar 輸入的資料以別的字元顯示 ReadOnly 文字是否允許修改 MaxLength 輸入文字最大寬度 MultiLine 允許多行輸入 ScrollBar 選擇要顯示的捲軸 15

16 課堂練習 sample6-b2 程式功能 登入系統 輸入帳號為 alice, 密碼為 bob 時, 顯示登入成功, 否則顯示資料錯誤 另設清除按鍵, 將輸入方塊的資料清除 基本概念 在 Click 事件中判斷使用者輸入的資料是否正確 16

17 Timer 控制項 Timer 控制項供計時及週期事件使用 常用屬性 Enable 是否啟動 Timer Interval Timer 事件發生週期 ( 千分之一秒 ) 常用事件 Tick 每隔 interval 設定時間執行一次 17

18 實例探討 sample6-a3 a3 (1) 程式功能 倒數計時 程式內容 private void startbtn_ Click(object sender, System.EventArgs e) timer1.enabled = true; countlb.text = counttb.text; Text; counttb.enabled = false; startbtn.enabled = false; } 18

19 實例探討 sample6-a3 a3 (2) 程式內容 private void timer1_tick(object sender, System.EventArgs ta e) countlb.text = (int.parse(countlb.text) - 1).ToString(); if(int.parse(countlb.text) ==0) timer1.enabled = false; } 19

20 課堂練習 sample6-b3 程式功能 閃爍提示文字 點選文字開始閃爍 再點選停止 基本概念 可利用定時更改 Label 控制項的 Visible 屬性達到閃爍效果 也可定時更改 Label 控制項的文字來達成 20

21 PictureBox 控制項 PictureBox 控制項供計時及週期事件使用 常用屬性 Image 設定顯示圖片 SizeMode 設定載入圖片擺放方式 Normal..圖片放在控制項的左上角 StretchImage t..圖片隨控制項大小伸縮 AutoImage..控制項隨圖片大小伸縮 CenterImage..圖片放在控制項正中央 21

22 課堂練習 sample6-b4 程式功能 紅綠燈 可設定紅燈綠燈及黃燈時間長度 基本概念 利用 Timer 來決定更換圖片時間 利用 MSDN 查詢程式執行中更換 PictureBox 圖片的方式 可能需要一個可供所有方法存取的欄位變數 22

23 MessageBox 類別 MessageBox 類別提供錯誤或警告訊息等的對話方塊, 以提醒使用者注意 Show 靜態方法 Show ( 訊息文字, 標題文字, 顯示按鈕, 圖示 ); Show (string, string, MessageBoxButtons, MessageBoxIcon) 23

24 MessageBox 類別 顯示按鈕 顯示按鈕列舉常數 MessageBoxButtons.OK MessageBoxButtons.OKCancel MessageBoxButtons.AbortRetryIgnore B 說明 確定 確定 取消 異常終止 重試 略過 MessageBoxButtons.YesNoCancel B 是 否 取消 MessageBoxButtons.YesNo MessageBoxButtons.RetryCancel 是 否 重試 取消 24

25 MessageBox 類別 圖示 圖示列舉常數 MessageBoxIcon.Asterisk MessageBoxIcon.Information MessageBoxIcon.Exclamation MessageBoxIcon.Warning MessageBoxIcon.Error MessageBoxIcon.Hand MessageBoxIcon.Stop MessageBoxIcon.Question MessageBoxIcon.None 圖示 無 25

26 MessageBox 類別 回傳值 呼叫 MessageBox.Show 方法時, 當使用者按下訊息方塊中其中一個按鈕時, 會回傳一個 DialogResult 列舉型別的回傳值 列舉型別回傳值按鈕 DialogResult.OK 1 確定 DialogResult.Cancel 2 取消 DialogResult.Abort 3 異常終止 DialogResult.Retry 4 重試 DialogResult.Ignore 5 略過 DialogResult.Yes 6 是 DialogResult.No 7 否 26

27 實例探討 sample6-a4 a4 (1) 程式功能 密碼設定 ( 限四碼 ) 程式內容 private void okbtn_click(object sender, System.EventArgs e) if(pwtb.text.length Text!= 4) MessageBox.Show(" 密碼設定限四位數!!", " 設定錯誤 ", MessageBoxButtons.OK, MessageBoxIcon.Error); else MessageBox.Show(" 密碼設定成功!!", " 設定完成 ", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } } 27

28 實例探討 sample6-a4 a4 (2) 程式內容 private void exitbtn_click(object sender, System.EventArgs e) DialogResult result; result = MessageBox.Show( Show(" 確定離開!?", " 離開 ", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if(result == DialogResult.OK) Application.Exit(); it() else pwtb.focus(); } 28

29 GroupBox 控制項 GroupBox 控制項可將同性質的控制項框為群組, 使得控制項可藉以分門別類並讓畫面較為整齊有條理 常用屬性 Text 設定標題名稱 Controls 加入控制項所成的集合 29

30 RadioButton 控制項 RadioButton 控制項提供單選選項按鈕的功能 同一個表單中具有多組單選選項時, 可利用 GroupBox 或 Panel 來區隔 常用屬性 CheckAlign 設定選項按鈕顯示位置 Checked 按鈕是否選取 Text 顯示文字 常用事件 CheckedChanged Checked 屬性改變時發生 30

31 實例探討 sample6-a5 a5 (1) 程式功能 資料核對 利用 GroupBox 將 RadioButton 區分為二組 程式內容 private void exitbtn_click(object sender, System.EventArgs e) Application.Exit(); } 31

32 實例探討 sample6-a5 a5 (2) 程式內容 private void sendbtn_click(object sender, System.EventArgs e) string checkstr =" 您是 "+(sex1rb.checked? " 男生 ": " 女生 ") + ", 您的學歷為 "; foreach(radiobutton rb in educationgb.controls) if(rb.checked) checkstr += rb.text; MessageBox Show(checkStr " 資料核對 "); MessageBox.Show(checkStr, 資料核對 ); } 32

33 CheckBox 控制項 CheckBox 控制項提供複選核取方塊的功能 常用屬性 CheckAlign 設定核取方塊顯示位置 Checked 核取方塊是否選取 Text 顯示文字 ThreeState 設定為雙態或三態 CheckState 取得目前勾選狀況 常用事件 CheckedChanged Checked 屬性改變時發生 CheckStateChanged CheckState 屬性改變時發生 33

34 實例探討 sample6-a6 a6 (1) 程式功能 電腦採購 勾選需要配備立即更新總價 程式內容 34

35 實例探討 sample6-a6 a6 (1) private void monitorcb_checkedchanged(object sender, System.EventArgs ta e) int cost = monitorcb.checked? 12000: ; totallb.text = (int.parse(totallb.text) + cost).tostring(); } 35

36 實例探討 sample6-a6 a6 (2) 程式內容 private void boxcb_checkedchanged(object sender, System.EventArgs e) int cost = boxcb.checked? Checked? 15000: ; totallb.text = (int.parse(totallb.text) + cost).tostring(); } 36

37 實例探討 sample6-a6 a6 (2) private void mousecb_checkedchanged(object Ch d( sender, System.EventArgs e) int cost = mousecb.checked? 500: -500; totallb.text =(int (int.parse(totallb.text) + cost).tostring(); } 37

38 實例探討 sample6-a6 a6 (3) 程式內容 private void keyboardcb_checkedchanged(object sender, System.EventArgs e) int cost = keyboardcb.checked? 500: -500; totallb.text = (int.parse(totallb.text) + cost).tostring(); } 38

39 課堂練習 sample6-b5 程式功能 電腦採購 CPU RAM 及週邊各有三種類可挑選 CPU 及 RAM 為必備元件, 若沒採購跳出錯誤訊息視窗 計算全部費用 基本概念 可利用迴圈讀取 GroupBox 中的元件簡化程式碼 39

40 ListBox 控制項 (1) ListBox 控制項提供文字項目清單供使用者選擇 常用屬性 Items 元素內容 (ListBox.ObjectCollection 類別 ) MultiColumn 設定多欄顯示 ColumnWidth 多欄顯示時每一個欄位寬度 40

41 ListBox 控制項 (1) SelectionMode 設定清單可選取數目 None 不能選取 One 單選 MultiSimple 複選 ( 點一下選取, 再點一下取消 ) MultiExtended 複選 ( 可利用 Ctrl Shift 及拖曳選取 ) 41

42 ListBox 控制項 (2) 常用屬性 SelectedItem 取得被選取項目 SelectedItems 取得被選取項目集合 SelectedIndex 取得選取項目索引 SelectedIndices 取得所有選取項目索引 常用事件 SelectedIndexChange 清單中選取項目改變時發生 42

43 相關類別 ListBox.ObjectCollection 類別 常用屬性 Count 計算清單項目個數 常用方法 Add 新增項目至清單 Remove 刪除清單中某項目 Clear 清除全部項目 用法 Ex.. listbox1.items.add("alice"); Alice 43

44 實例探討 sample6-a7 a7 (1) 程式功能 設定啟用功能 程式內容 private void Form1_Load(object sender, System.EventArgs e) } string[] funcstr = " 檔案 "," 編輯 "," 檢視 "," 專案 "," 建置 "," 偵錯 "," 工具 "," 視窗 "," 說明 "}; foreach(string str in funcstr) alllb.items.add(str); 44

45 實例探討 sample6-a7 a7 (2) 程式內容 private void addbtn_click(object sender, System.EventArgs e) if(alllb.selecteditem == null) } MessageBox.Show(" 尚未選取欲新增功能!!", " 錯誤 ", MessageBoxButtons.OK, MessageBoxIcon.Warning); else enablelb.items.add(alllb.selecteditem); lllb l t dit alllb.items.remove(alllb.selecteditem); } 45

46 實例探討 sample6-a7 a7 (3) 程式內容 private void removebtn_click(object sender, System.EventArgs e) if(enablelb.selecteditem == null) MessageBox.Show(" 尚未選取欲刪除功能!!", " 錯誤 ", MessageBoxButtons.OK, MessageBoxIcon.Warning); else alllb.items.add(enablelb.selecteditem); enablelb.items.remove(enablelb.selecteditem); } } 46

47 ComboBox 控制項 ComboBox 控制項提供下拉式選單功能, 為 ListBox 控制項的延伸 常用屬性 Text 取得設定文字 MaxLength 使用者可輸入最大長度 MaxDropDownItems 下拉部份一次顯示最大項目個數 DropDownStyle DropDown 可編輯, 箭頭按鈕顯示清單 DropDownList 不可編輯, 箭頭按鈕顯示清單 Simple 可編輯, 清單永遠顯示 47

48 實例探討 sample6-a8 a8 (1) 程式功能 地址輸入 程式內容 private void addresstb_ Enter(object sender, System.EventArgs e) if(addresstb.text == " 輸入地址 ") addresstb.text Text =""; } 48

49 實例探討 sample6-a8 a8 (2) 程式內容 private void area1cb_selectedindexchanged(object sender, System.EventArgs e) area2cb.items.clear(); if(area1cb.selectedindex == 0) area2cb.items.add(" 信義區 "); } area2cb.items.add(" 大安區 "); area2cb.text = area2cb.items[0].tostring(); } else area2cb.items.add(" 汐止市 "); area2cb.items.add(" 板橋市 "); } area2cb.text = area2cb.items[0].tostring(); 49

50 課堂練習 sample6-b6 程式功能 書籍分類清單 小說射鵰英雄傳神鵰俠侶倚天屠龍記 電腦 C# 程式設 十天學會 資料庫程式 計入門 JAVA 設計 食譜韓式料理日式料理台式料理 基本概念 利用 ComboBox 及 ListBox 完成 50

51 TreeView 控制項 TreeView 控制項提供樹狀結構檢視功能 常用屬性 Nodes 子節點所成的集合 (TreeNodeCollection 類別 ) SelectedNode 選取節點 CheckBoxes 顯示核取方塊 PathSeperator 傳回路徑的字串分隔字元 常用事件 AfterSelect 變更選取後 51

52 相關類別 TreeNodeCollection 類別 Count 屬性 取得節點數 Add 方法 增加節點至該點子節點中 Remove 方法 刪除節點 ( 傳入 TreeNode) TreeNode 類別 Text 節點顯示文字 Remove 方法 刪除節點 Nodes 子節點所成的集合 FullPath 取得從根樹狀節點通往目前樹狀節點的路徑 52

53 實例探討 sample6-a9 a9 (1) 程式功能 簡易資料夾檢索 程式內容 private void Form1_Load(object sender, System.EventArgs e) string[] drives = Directory.GetLogicalDrives(); } foreach(string drive in drives) diskcb.items.add(drive); updatetreeview(diskcb.text); 53

54 實例探討 sample6-a9 a9 (2) 程式內容 private void diskcb_ SelectedIndexChanged(object sender, System.EventArgs e) updatetreeview(diskcb.text); Text); } private void updatetreeview(string disk) try dirtv.nodes.clear(); string[] dirs = Directory.GetDirectories(disk); 54

55 實例探討 sample6-a9 a9 (3) 程式內容 int i=0; foreach(string dir in dirs) } dirtv.nodes.add(dir); try string[] subdirs = Directory.GetDirectories(dir); foreach(string subdir in subdirs) dirtv.nodes[i].nodes.add(subdir); } catch } i++; } } catch} 55

56 課堂練習 sample6-b7 程式功能 班級資料表 可新增班級 重複新增不予動作 基本概念 利用 TreeView 顯示班級資訊 56

57 ListView 控制項 ListView 控制項提供項目清單檢視功能 常用屬性 Columns 設定包含欄位 Items 清單項目內容 (ListView.ListViewItemCollection 類別 ) View 清單檢視方式 CheckBoxes 顯示核取方塊 GridLines 顯示格線 57

58 相關類別 (1) ListView.ListViewItemCollection 類別 Count 屬性 取得項目個數 Add 方法 新增項目 Remove 方法 移除指定項目 Clear 方法 清除所有項目 ListViewItem 類別 SubItems 屬性 子項目 (ListViewItem.ListViewSubItemCollection 類別 ) Text 屬性 設定取得項目內容 58

59 相關類別 (2) ListViewItem.ListViewSubItemCollection ti 類別 Count 屬性 取得子項目個數 Add 方法 新增子項目 Remove 方法 移除指定子項目 Clear 方法 清除所有子項目 ListViewItem.ListViewSubItem 類別 Text 屬性 設定取得子項目內容 59

60 實例探討 sample6-a10 a10 (1) 程式功能 學生名單 程式內容 private void clearbtn_click(object sender, System.EventArgs e) } idtb.text Text = ""; nametb.text = ""; studentlv.items.clear(); 60

61 實例探討 sample6-a10 a10 (2) 程式內容 private void addbtn_click(object sender, System.EventArgs e) if(idtb.text!= "" && nametb.text!= "") ListViewItem item = new ListViewItem(); item.subitems.add(idtb.text); Text); item.subitems.add(nametb.text); studentlv.items.add(item); } } 61

62 課堂練習 sample6-b8 程式功能 成績表 可新增科目成績資料 計算總平均 基本概念 利用 ListView 來完成 62

63 執行緒 我們可以把執行緒想像為一段程式碼區段 一個應用程式至少會在一個以上的執行緒中執行.NET 內建提供多執行緒支援, 可藉由執行緒類別成員所提供的功能來控制執行緒的行為 Thread 類別提供執行緒支援, 可引用 Thread 類別提供執行緒支援, 可引用 System.Threading 命名空間來使用該類別 63

64 Thread 類別 (1) 建構式 public Thread( ThreadStart start ); 常用屬性 Name 取得或設定執行緒名稱 IsAlive 取得目前執行緒執行狀況 常用方法 Start 執行該執行緒 Suspend 使執行緒暫停 Resume 使暫停的執行緒繼續執行 64

65 Thread 類別 (2) 靜態方法 Sleep 暫停執行緒一段時間 靜態屬性 CurrentThread 取得目前執行緒 用法 ThreadStart mythreadstart = new ThreadStart( 方法成員名稱 ); Thread mythread = new Thread(myThreadStart); 65

66 實例探討 sample6-a11 a11 (1) 程式功能 遊戲半成品,Thread 類別測試 程式內容 class box public static bool stopflag = false; private System.Windows.Forms.Label mylb; public box(system.windows.forms.label LB) p ( y ) mylb = LB; } 66

67 實例探討 sample6-a11 a11 (2) 程式內容 public void action() Random rnd = new Random(); } do 50; 100; } mylb.top += rnd.next(0,2) == 0? 50: - if(mylb.top <= 0) mylb.top += 100; else if(mylb.top >= 400) mylb.top -= Thread.Sleep(500); }while(!stopflag); 67

68 實例探討 sample6-a11 a11 (3) 程式內容 private void startbtn_click(object sender, System.EventArgs e) startbtn.enabled = false; box mybox1 = new box(box1lb); box mybox2 = new box(box2lb); Thread box1thread = new Thread(new ThreadStart(myBox1.action)); Thread box2thread = new Thread(new ThreadStart(myBox2.action)); box1thread.name = "box1"; box2thread.name = "box2"; 68

69 實例探討 sample6-a11 a11 (4) 程式內容 box1thread.start(); Thread.Sleep(200); box2thread.start(); } private void endbtn_click(object sender, System.EventArgs e) box.stopflag = true; Application.Exit(); } 69

70 實例探討 sample6-a12 a12 (1) 程式功能 利用單一執行緒執行高運算量計算 程式內容 private void computebtn_click(object sender, System.EventArgs e) computing(); } private void computing() try resultlb.text = } (garbage(int.parse(numtb.text))).tostring(); 70

71 實例探討 sample6-a12 a12 (2) 程式內容 catch resultlb.text = "--"; } } private int garbage(int num) if(num <= 4) return num; else return garbage(num-1)-garbage(num-2) +garbage(num-3)-garbage(num-4); b ( } 71

72 課堂練習 sample6-b9 程式功能 利用多執行緒修改 sample6-a12 a12 範例程式 使其在運算過程中, 視窗介面仍可自由操控 基本概念 引用命名空間 System.Threading, 利用 Thread 類別產生一條新的執行緒來執行運算方法內容 72

73 安裝與部署 (1).NET 提供安裝和部署專案, 我們可以透過此專案快速產生視窗應用程式的安裝程式 73

74 安裝與部署 (2) 在檔案系統中, 我們可以設定檔案與捷徑要分別安裝在那些地方 使用者的桌面 設定欲安裝至桌面上的檔案 使用者的程式功能表 設定欲安裝至程式集的檔案 應用程式資料夾 設定欲安裝至 Program Files 料夾的檔案 資 74

75 安裝與部署 (3) 在資料夾上點選右鍵, 選擇 [ 加入 ][ 檔案 ] 後, 即可選擇欲加入檔案 75

76 安裝與部署 (4) 在已加入的檔案名稱上點選右鍵, 即可為該檔案建立捷徑 76

77 安裝與部署 (5) 我們可以將專案的執行檔及欲連結的資料庫檔案加入至應用程式資料夾中 建立主要執行檔捷徑, 將捷徑加入至使用者桌面及使用者的程式功能表資料夾中 建置專案後, 即會產生 Setup.Exe 安裝檔案 77

untitled

untitled 1 MessageBox 類 MessageBox 類 Show Show (,,, ); Show (string, string, MessageBoxButtons, MessageBoxIcon) MessageBox 類 列 數 MessageBoxButtons.OK MessageBoxButtons.OKCancel MessageBoxButtons.AbortRetryIgnore

More information

untitled

untitled 1 行 行 行 行.NET 行 行 類 來 行 行 Thread 類 行 System.Threading 來 類 Thread 類 (1) public Thread(ThreadStart start ); Name 行 IsAlive 行 行狀 Start 行 行 Suspend 行 Resume 行 行 Thread 類 (2) Sleep 行 CurrentThread 行 ThreadStart

More information

untitled

untitled 1 .NET 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Response 類 Write 料 Redirect URL Response.Write("!! ives!!"); Response.Redirect("WebForm2.aspx"); (1) (2) Web Form

More information

untitled

untitled 1 LinkButton LinkButton 連 Button Text Visible Click HyperLink HyperLink 來 立 連 Text ImageUrl ( ) NavigateUrl 連 Target 連 _blank _parent frameset _search _self 連 _top 例 sample2-a1 易 連 private void Page_Load(object

More information

IsPostBack 2

IsPostBack 2 5 IsPostBack 2 TextBox 3 TextBox TextBox 4 TextBox TextBox 1 2 5 TextBox Columns MaxLength ReadOnly Rows Text TextMode TextMode MultiLine TextMode MultiLine True False TextMode MultiLine Password MulitLine

More information

PowerPoint Presentation

PowerPoint Presentation Visual Basic 2005 學 習 範 本 第 7 章 陣 列 的 活 用 7-1 陣 列 當 我 們 需 要 處 理 資 料 時, 都 使 用 變 數 來 存 放 資 料 因 為 一 個 變 數 只 能 代 表 一 個 資 料, 若 需 要 處 理 100 位 同 學 的 成 績 時, 便 要 使 用 100 個 不 同 的 變 數 名 稱, 這 不 但 會 增 加 變 數 名 稱 命 名

More information

untitled

untitled 1 .NET sln csproj dll cs aspx 說 料 料 利 來 料 ( 來 ) 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Click 滑 料 Response 列 料 Response HttpResponse 類 Write 料 Redirect URL Response.Write("!!

More information

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class 踩地雷遊戲 高慧君南港高中 開啟專案 MineSweep 任務一 : 產生 30X20 個磚塊編輯 Table 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.util.arraylist; Write a description of class MyWorld

More information

Chapter 16 集合

Chapter 16 集合 Chapter 16 集合 20 ArrayList StringCollection 16 本章學習目標 : ArrayList ArrayList Array StringCollection 16-1 21 10-3-8 System.Array Clear Clear 16-1 Clear System.Array Microsoft System.Collection IList 542

More information

投影片 1

投影片 1 資料庫管理程式 ( 補充教材 -Part2) 使用 ADO.NET 連結資料庫 ( 自行撰寫程式碼 以實現新增 刪除 修改等功能 ) Private Sub InsertButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InsertButton.Click ' 宣告相關的 Connection

More information

Microsoft PowerPoint - VB14.ppt

Microsoft PowerPoint - VB14.ppt VB 列表盒 LISTBOX 應用 資科系 林偉川 執行畫面 1 2 1 重要屬性 LISTBOX 物件 (VB6) 新增至 LISTBOX 物件中 ADDITEM 自 LISTBOX 物件中刪除選取物件 REMOVEITEM 自 LISTBOX 物件中取出選取物件 ListIndex 顯示 LISTBOX 物件中紀錄個數 Listcount 3 LISTBOX 物件 (VB.NET) 重要屬性 新增至

More information

VB程序设计教程

VB程序设计教程 高 等 学 校 教 材 Visual Basic 程 序 设 计 教 程 魏 东 平 郑 立 垠 梁 玉 环 石 油 大 学 出 版 社 内 容 提 要 本 书 是 按 高 等 学 校 计 算 机 程 序 设 计 课 程 教 学 大 纲 编 写 的 大 学 教 材, 主 要 包 括 VB 基 础 知 识 常 用 程 序 结 构 和 算 法 Windows 用 户 界 面 设 计 基 础 文 件 处

More information

主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new

主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new ListView 自訂排版 主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new int[]{r.drawable.dog1, R.drawable.dog2,

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Java application Java main applet Web applet Runnable Thread CPU Thread 1 Thread 2 Thread 3 CUP Thread 1 Thread 2 Thread 3 ,,. (new) Thread (runnable) start( ) CPU (running) run ( ) blocked CPU sleep(

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

Microsoft Word - GUI design.doc

Microsoft Word - GUI design.doc GUI 程式設計 壹 圖形元件 一 認識圖形元件 hndlgraf 指令 Handle graph 的縮寫 說明 二 認識圖形元件的 handle 指令 get(h, 'pr') get(h) set(h, 'pr1', 'val1', 'pr2', 'val2') set(h) 說明取得 handle h 的某屬性 (properity) 之數值取得 handle h 的所有屬性之數值設定 handle

More information

The golden pins of the PCI card can be oxidized after months or years

The golden pins of the PCI card can be oxidized after months or years Q. 如何在 LabWindows/CVI 編譯 DAQ Card 程式? A: 請參考至下列步驟 : 步驟 1: 安裝驅動程式 1. 安裝 UniDAQ 驅動程式 UniDAQ 驅動程式下載位置 : CD:\NAPDOS\PCI\UniDAQ\DLL\Driver\ ftp://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/unidaq/dll/driver/

More information

untitled

untitled 1 Access 料 (1) 立 料 [] [] [ 料 ] 立 料 Access 料 (2) 料 [ 立 料 ] Access 料 (3) 料 料 料 料 料 料 欄 ADO.NET ADO.NET.NET Framework 類 來 料 料 料 料 料 Ex MSSQL Access Excel XML ADO.NET 連 .NET 料.NET 料 料來 類.NET Data Provider

More information

Visual Basic D 3D

Visual Basic D 3D Visual Basic 2008 2D 3D 6-1 6-1 - 6-2 - 06 6-2 STEP 1 5-2 (1) STEP 2 5-3 (2) - 6-3 - Visual Basic 2008 2D 3D STEP 3 User1 6-4 (3) STEP 4 User1 6-5 (4) - 6-4 - 06 STEP 5 6-6 (5) 6-3 6-3-1 (LoginForm) PictureBox1

More information

Microsoft PowerPoint - ch2.ppt

Microsoft PowerPoint - ch2.ppt 1 ASP.NET 網頁程式設計 ( 使 用 C#) CSIE NTU LinkButton 控制項 2 LinkButton 的外觀上為一個超連結, 實值上的功能和 Button 控制項一模一樣 常用屬性 Text 設定要顯示的文字 Visible 是否顯示控制項 常用事件 Click 按一下時發生 HyperLink 控制項 3 HyperLink 控制項可用來建立文字或圖片超連結 常用屬性 Text

More information

untitled

untitled 1 .NET 料.NET 料 料來 類.NET Data Provider SQL.NET Data Provider System.Data.SqlClient 料 MS-SQL OLE DB.NET Data Provider System.Data.OleDb 料 Dbase FoxPro Excel Access Oracle Access ODBC.NET Data Provider 料

More information

用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應

用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應 專題進度 老師 : 趙啟時老師 學生 : 陳建廷 2013/10/13 用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應 程式碼 : package com.example.phone; import java.util.arraylist;

More information

Microsoft PowerPoint - Chap03.ppt [相容模式]

Microsoft PowerPoint - Chap03.ppt [相容模式] 本章目的 2D / 3D 遊戲程式設計入門使用 XNA 3.0 與 C# 探討 XNA 遊戲程式內部的基本架構與遊戲開發流程 示範如何完成一個簡單的 XNA 遊戲方案 第三章 XNA 遊戲程式基本架構 1 2 新增 XNA 專案 新增 XNA 專案 3 4 XNA 相關的命名空間 Game1.cs 程式中的六個函數 using Microsoft.Xna.Framework; // 和 XNA 架構相關的型別

More information

星星排列 _for loop Protected Sub Page_Load(ByVal sender As Object, ByVal e As Dim h As Integer = 7 'h 為變數 ' Dim i, j As Integer For i = 1 To h

星星排列 _for loop Protected Sub Page_Load(ByVal sender As Object, ByVal e As Dim h As Integer = 7 'h 為變數 ' Dim i, j As Integer For i = 1 To h 資訊系統與實習 製作 : 林郁君 一 2009.09.28 9X9 'button 被按下後 ' Dim i, j As Integer For i = 1 To 9 'i 從 1 到 9' For j = 1 To 9 'j 從 1 到 9' If j * i < 10 Then ' 如果 j 乘上 i 是為個位數 ' Response.Write(i & "*" & j & " =" & i *

More information

untitled

untitled 1 Access 料 (1) 立 料 [] [] [ 料 ] 立 料 Access 料 (2) 料 [ 立 料 ] Access 料 (3) 料 料 料 料 料 料 欄 ADO.NET ADO.NET.NET Framework 類 來 料 料 料 料 料 Ex MSSQL Access Excel XML ADO.NET 連 .NET 料.NET 料 料來 類.NET Data Provider

More information

Advanced ASP.NET Controls

Advanced ASP.NET Controls 第 5 章資料輸入與選擇控制項 第 5 章資料輸入與選擇控制項 5-1 資料輸入控制項 5-2 顯示狀態與 IsPostBack 屬性 5-3 選擇控制項 5-4 清單控制項 5-5 自動送回的事件處理 5-6 月曆 Calendar 控制項 http://www1.chihlee.edu.tw/teachers/chienhua/ 2 5-1 資料輸入控制項 5-1-1 TextBox 文字方塊控制項

More information

基于ECO的UML模型驱动的数据库应用开发1.doc

基于ECO的UML模型驱动的数据库应用开发1.doc ECO UML () Object RDBMS Mapping.Net Framework Java C# RAD DataSetOleDbConnection DataGrod RAD Client/Server RAD RAD DataReader["Spell"].ToString() AObj.XXX bug sql UML OR Mapping RAD Lazy load round trip

More information

untitled

untitled 1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 ives.net@gmail.com www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立

More information

untitled

untitled 1 MSDN Library MSDN Library 量 例 參 列 [ 說 ] [] [ 索 ] [] 來 MSDN Library 了 類 類 利 F1 http://msdn.microsoft.com/library/ http://msdn.microsoft.com/library/cht/ Object object 參 類 都 object 參 object Boxing 參 boxing

More information

Ch6 Visual Basic表單,功能表與模組

Ch6 Visual Basic表單,功能表與模組 Ch6 Visual Basic 輸入與輸出本章將會介紹. 標籤 (Label). 文字方塊 (Text Box). 訊息對話方塊 (Message Box). 輸入對話方塊 (Input Box) Visual Basic 在推出後, 隨即引起一陣熱列的回響和使用, 除了它繼承了 Basic 原有的易學易用的特性之外, 更重要的是它提供了許多控制項, 供程式設計師快速地完成程式設計的工作 在本章的內容,

More information

<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074>

<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074> 程 序 设 计 实 习 INFO130048 3-2.C++ 面 向 对 象 程 序 设 计 重 载 继 承 多 态 和 聚 合 复 旦 大 学 计 算 机 科 学 与 工 程 系 彭 鑫 pengxin@fudan.edu.cn 内 容 摘 要 方 法 重 载 类 的 继 承 对 象 引 用 和 拷 贝 构 造 函 数 虚 函 数 和 多 态 性 类 的 聚 集 复 旦 大 学 计 算 机 科 学

More information

untitled

untitled 1 Outline ArrayList 類 列類 串類 類 類 例 理 MSDN Library MSDN Library 量 例 參 列 [ 說 ] [] [ 索 ] [] 來 MSDN Library 了 類 類 利 F1 http://msdn.microsoft.com/library/ http://msdn.microsoft.com/library/cht/ Object object

More information

Microsoft PowerPoint - asp07.ppt

Microsoft PowerPoint - asp07.ppt Web 控制項 資科系林偉川 Web 表單的 ViewState 狀態管理 顯示狀態 (ViewState) 屬於 ASP.NET 的機制, 它可以保留伺服端控制項的狀態, 也就是輸入的值, 例如 : 在 Web 表單擁有文字方塊控制項, 一旦輸入值, 不論表單送回 (Postback) 多少次, 除非更改控制項的值, 否則顯示狀態都能夠自動保留欄位值 2 1 ViewState 狀態管理的基礎 ASP.NET

More information

Microsoft PowerPoint - 09_CommonComponents.pptx

Microsoft PowerPoint - 09_CommonComponents.pptx 第九章 常用控制項 ( 一 ) 9.1 Timer 計時控制項 9.3 GroupBox/Panel 容器控制項 9.2 PictureBox 圖片方塊控制項 9.4 RadioButton/CheckBox 選擇控制項 備註 : 可依進度點選小節 9.1 Timer 計時控制項 設計程式時, 若想製作動畫 延遲時間或每隔多少時間就執行某項工作等都可用計時控制項來完成 如使用 for while{

More information

Microsoft Word - AEL CH07

Microsoft Word - AEL CH07 7 選擇結構 [速食店點餐系統] 7-1 是否選條件控制 7-2 選擇控制項 7-3 二選一條件控制 7-4 多選一條件控制 7-1 是否選條件控制 在日常生活中, 是否選的情況十分常見, 我們常常需要判斷氣溫是否有些涼, 需要加件衣服 ; 如果下雨需要拿把傘 If Then 條件控制是一種是否執行的條件判斷, 可以決定是否執行程式區塊內的程式碼, 當 If 條件為 True, 就執行 Then/End

More information

Microsoft Office SharePoint Server MOSS Web SharePoint Web SharePoint 22 Web SharePoint Web Web SharePoint Web Web f Lists.asmx Web Web CAML f

Microsoft Office SharePoint Server MOSS Web SharePoint Web SharePoint 22 Web SharePoint Web Web SharePoint Web Web f Lists.asmx Web Web CAML f Web Chapter 22 SharePoint Web Microsoft Office SharePoint Server MOSS Web SharePoint Web SharePoint 22 Web 21 22-1 SharePoint Web Web SharePoint Web Web f Lists.asmx Web Web CAML f Views.asmx View SharePoint

More information

Spyder Anaconda Spyder Python Spyder Python Spyder Spyder Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Sp

Spyder Anaconda Spyder Python Spyder Python Spyder Spyder Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Sp 01 1.6 Spyder Anaconda Spyder Python Spyder Python Spyder Spyder 1.6.1 Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Spyder Python File

More information

ActiveX Control

ActiveX Control ActiveX Control For Visual Basic 2005.NET [ 版本 : 1.0] 1 安裝 Windows 驅動程式 請依照下列步驟 : 1. 執行 Windows 驅動程式安裝程式 ( 此範例為 PIO-DIO) 驅動程式位置 : CD:\NAPDOS\PCI\PIO-DIO\dll_ocx\Driver http://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/pio-dio/dll_ocx/driver/

More information

投影片 1

投影片 1 計算機程式及實習 期末報告 題目 : 六宿炒翻天 班級 : 奈米一乙姓名 : 陳洋翼學號 :4A514050 老師 : 謝慶存 程式說明 設計結帳系統, 選擇數量後, 在按下計算, 將會顯示總金額 若是老人或小孩, 將可享 8 折或 9 折的優惠 程式畫面 填選數量 在火腿蛋炒飯的數量選擇 1, 並按下計算, 可得總金額 50 元 程式畫面 打折 填選完後, 若客人是小孩或老人, 選擇欲打折項目,

More information

Microsoft PowerPoint - Chapter5

Microsoft PowerPoint - Chapter5 CH5 表 單 與 控 制 項 課 程 目 標 : 暸 解 VBA 語 言 中 的 控 制 項 及 常 用 屬 性 表 單 在 視 窗 環 境 中, 使 用 者 所 使 用 的 對 話 窗, 精 靈 等 都 是 以 表 單 為 基 本 單 位, 再 加 上 其 它 控 制 項 所 構 成 的 操 作 環 境 利 用 插 入 表 單 為 指 定 的 專 案 插 入 一 個 自 訂 表 單 表 單 常

More information

雲端 Cloud Computing 技術指南 運算 應用 平台與架構 10/04/15 11:55:46 INFO 10/04/15 11:55:53 INFO 10/04/15 11:55:56 INFO 10/04/15 11:56:05 INFO 10/04/15 11:56:07 INFO

雲端 Cloud Computing 技術指南 運算 應用 平台與架構 10/04/15 11:55:46 INFO 10/04/15 11:55:53 INFO 10/04/15 11:55:56 INFO 10/04/15 11:56:05 INFO 10/04/15 11:56:07 INFO CHAPTER 使用 Hadoop 打造自己的雲 8 8.3 測試 Hadoop 雲端系統 4 Nodes Hadoop Map Reduce Hadoop WordCount 4 Nodes Hadoop Map/Reduce $HADOOP_HOME /home/ hadoop/hadoop-0.20.2 wordcount echo $ mkdir wordcount $ cd wordcount

More information

Microsoft Word - ch04三校.doc

Microsoft Word - ch04三校.doc 4-1 4-1-1 (Object) (State) (Behavior) ( ) ( ) ( method) ( properties) ( functions) 4-2 4-1-2 (Message) ( ) ( ) ( ) A B A ( ) ( ) ( YourCar) ( changegear) ( lowergear) 4-1-3 (Class) (Blueprint) 4-3 changegear

More information

7 DataSet DataSet TableColumnDataSet DataSet NOTE DataSet DataAdapterDataSetDataAdapter DataSet DataSetDataSetDataSet NorthwindDataSet DataSet Dim Nor

7 DataSet DataSet TableColumnDataSet DataSet NOTE DataSet DataAdapterDataSetDataAdapter DataSet DataSetDataSetDataSet NorthwindDataSet DataSet Dim Nor 1DataSet 1 DataSet DataSetSystem.Data DataSet DataTableDataRelation DataTable DataSet DataSetTyped DataSet DataSet DataSetDataTable DataSetDataTable DataTable 45 DataSet DataSet DataSetTypedUntyped DataSetsDataSet

More information

Microsoft PowerPoint - EmbSys101_Java Basics.ppt [相容模式]

Microsoft PowerPoint - EmbSys101_Java Basics.ppt [相容模式] Java Basics Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan chanhl@maili.cgu.edu.twcgu 執行環境 - eclipse 點選 eclipse 軟體執行檔 設定工作路徑 eclipse 開啟 2 建置 Java 專案 File New project

More information

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF Chapter 2 WF 2.1 WF 2.2 2. XAML 2. 2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF WF WF WF WF EDI API WF Visual Studio Designer 1 2.1 WF Windows Workflow Foundation 2 WF 1 WF Domain-Specific

More information

<A4E2BEF7B4FAB8D5B3F8A F52322E786C7378>

<A4E2BEF7B4FAB8D5B3F8A F52322E786C7378> 製表日期 : 2008 年 9 月 17 日 Mobile Java Applet 手機安裝測試報告表 已完成測試機型數量 :317 台 ; 無問題 ( 可安裝 / 可執行 ) 機型 :315 台無法使用 :2 台 ; 特殊註記機型 :2 台 廠牌 機型 測試狀況 OK 不 OK 安裝資料夾 ( 目錄 ) 備註 NOKIA N95 應用程式 NOKIA 6110 應用程式 NOKIA 3120 應用程式

More information

投影片 1

投影片 1 ASP.NET 網頁程式設計 ( 使用 C#) CSIE NTU 1 .NET 資料提供者.NET 資料提供者為存取資料來源的一組類別.NET Data Provider SQL.NET Data Provider 命名空間.. System.Data.SqlClient 可用資料庫.. MS-SQL OLE DB.NET Data Provider 命名空間.. System.Data.OleDb

More information

Microsoft PowerPoint - 09.Android 程式設計-SQLite

Microsoft PowerPoint - 09.Android 程式設計-SQLite 計劃名稱 : 104 年度教育部資通訊軟體創新人才推升推廣計畫跨校資源中心 : 雲端運算 ( 國立中山大學 ) 課程名稱 : 網路及平台服務 Part1- 課程教材 教材名稱 :Android 程式設計 -SQLite 國立高雄大學資訊工程學系張保榮教授 大綱 SQLite execsql() 函式 rawquery() 函式 insert() 函式 delet() 函式 update() 函式 query()

More information

單步除錯 (1/10) 打開 Android Studio, 點選 Start a new Android Studio project 建立專案 Application name 輸入 BMI 點下 Next 2 P a g e

單步除錯 (1/10) 打開 Android Studio, 點選 Start a new Android Studio project 建立專案 Application name 輸入 BMI 點下 Next 2 P a g e Android Studio Debugging 本篇教學除了最基本的中斷點教學之外, 還有條件式中斷的教學 條件式中斷是進階的除錯技巧, 在某些特定情況中, 我們有一個函數可能會被呼叫數次, 但是我們只希望在某種條件成立時才進行中斷, 進而觀察變數的狀態 而條件式中斷這項技巧正是符合這項需求 本教學分兩部分 單步除錯 (Page2~11, 共 10) 條件式中斷點 (Page12~17, 共 6)

More information

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2 Chapter 02 變數與運算式 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 type 2.2.4 2.3 2.3.1 print 2.3.2 input 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 + 2.4.6 Python Python 2.1 2.1.1 a p p l e b e a r c 65438790

More information

建立Android新專案

建立Android新專案 經濟部工業局 Android 智慧型手機程式設計實務應用班 Android WebService 建國科技大學資管系 饒瑞佶 2012/4 WebService 需要 ksoap2-android-assembly-2.5.2-jar-withdependencies.jar 或 ksoap2-android-assembly-2.5.2-jar-withdependencies_timeout1.jar

More information

e01 1....5 1.1....5 1.1.1....5 1.1.2....6 1.1.3....8 1.1.4....9 1.1.5....11 1.1.6. /...16 1.1.7. /...19 1.1.8. /...21 1.1.9....24 1.1.10....24 1.1.11....28 1.1.12....36 1.1.13....45 1.1.14....48 1.1.15....50

More information

投影片 1

投影片 1 1 ASP.NET 互動式網頁程式設計 ( 使用 C#) CSIE NTU LinkButton 控制項 2 LinkButton 的外觀上為一個超連結, 實值上的功能和 Button 控制項一模一樣 常用屬性 Text 設定要顯示的文字 Visible 是否顯示控制項 常用事件 Click 按一下時發生 HyperLink 控制項 3 HyperLink 控制項可用來建立文字或圖片超連結 常用屬性

More information

Visual C# 2010 與 UML 開發實戰 C# 第 5 章物件導向基礎 C# C# 第 6 章資料與變數 C# 第 7 章判斷式與迴圈 C# 第 8 章陣列與集合 C# 第 9 章偵錯與例外狀況處理 Visual Studio 2010 C# try...catch ix

Visual C# 2010 與 UML 開發實戰 C# 第 5 章物件導向基礎 C# C# 第 6 章資料與變數 C# 第 7 章判斷式與迴圈 C# 第 8 章陣列與集合 C# 第 9 章偵錯與例外狀況處理 Visual Studio 2010 C# try...catch ix C# Visual Studio 2010.NET Framework 4 Visual C# WPF 第 1 章 Visual Studio 2010 概述.NET Framework 4 Visual Studio 2010 第 2 章建立 WPF 視窗應用程式 WPF Visual Studio 2010 WPF C# 第 3 章 WPF 基本控制項 WPF WPF Label TextBox

More information

Microsoft PowerPoint - ch15_1.ppt

Microsoft PowerPoint - ch15_1.ppt JavaScript 實用範例 15-1 視窗基本操作 15-1-1 歡迎對話方塊 顯示歡迎視窗 15-1-2 告別對話方塊 顯示告別視窗

More information

《大话设计模式》第一章

《大话设计模式》第一章 第 1 章 代 码 无 错 就 是 优? 简 单 工 厂 模 式 1.1 面 试 受 挫 小 菜 今 年 计 算 机 专 业 大 四 了, 学 了 不 少 软 件 开 发 方 面 的 东 西, 也 学 着 编 了 些 小 程 序, 踌 躇 满 志, 一 心 要 找 一 个 好 单 位 当 投 递 了 无 数 份 简 历 后, 终 于 收 到 了 一 个 单 位 的 面 试 通 知, 小 菜 欣 喜

More information

Microsoft PowerPoint - 第14章.ppt

Microsoft PowerPoint - 第14章.ppt Windows 繪圖的認識 在視窗 Form 表單上, 繪製圖案, 必須要有幾個動作 : Step 1: 定義及取得 Graphics 物件,Graphics 代表 Windows 中的繪圖區域, 範圍為 Form 表單視窗 Step 2: 利用 Graphics 物件來進行各種繪圖 Step 3: 必須釋放 Graphics 物件, 使用 Dispose( ) 釋放 [ 範例 ] 設計一個程式,

More information

Dynamic Layout in Android

Dynamic Layout in Android Dynamic Layout in Android 建國科技大學資管系 饒瑞佶 2013/5 V1 Layout 多半都透過 res/layout/xml 格式設定來達成 Android 是 OOP, 所以可以動態產生 Layout 重點是 Layout 的階層關係 (Hierarchy) 需要處理對應事件 最後一樣用 setcontentview 加入 Layout 一 加入現有 Layout 中

More information

輕鬆學 Dreamweaver CS5 網頁設計..\Example\Ch0\ \.html..\example\ch0\ \mouse.txt..\example\ch0\ \ _Ok.html 學習重點 JavaScript 複製程式碼 mouse.txt Ctrl+C Ctrl+C 0-4

輕鬆學 Dreamweaver CS5 網頁設計..\Example\Ch0\ \.html..\example\ch0\ \mouse.txt..\example\ch0\ \ _Ok.html 學習重點 JavaScript 複製程式碼 mouse.txt Ctrl+C Ctrl+C 0-4 JAVA Extension 0..\Example\Ch0\ \ T.html..\Example\Ch0\ \ T.txt T.txt..\Example\Ch0\ \ T_Ok.html 提示 :. Marquee Marquee Font Color #FFFFFF BG Color #867bf Width 90 Height 50. T.txt Ctrl+C your scrolling

More information

投影片 1

投影片 1 1 ASP.NET 互動式網頁程式設計 ( 使用 C#) CSIE NTU 實例探討 sample3-a1 (1) 2 程式功能 建立與資料庫間的連線 程式內容 protected void Page_Load(object sender, EventArgs e) { Response.Write(" 尚未連線.."); Response.Write(" 進行連線.."); AccessDataSource

More information

Microsoft PowerPoint - P766Ch09.ppt

Microsoft PowerPoint - P766Ch09.ppt PHP5&MySQL 程式設計 第 9 章在網頁之間傳遞資訊 9-1 蒐集網頁上的資訊 9-1-1 建立表單一 決定要蒐集的資訊二 建立表單三 撰寫表單處理程式 單行文字方塊 多行文字方塊 選擇鈕 核取方塊 下拉式功能表 按鈕 密碼欄位 ... 標籤 ACCEPT-CHARSET="... CHARSET="... ACCEPT="... ACTION="URL URL"

More information

Microsoft PowerPoint - ASP_NET_04

Microsoft PowerPoint - ASP_NET_04 第 4 章 Web Form 表單與事件處理 大綱 事件處理的基礎 ASP.NET 網頁與 Page 物件 ASP.NET 的伺服端控制項 資料輸出控制項 送出資料的控制項 圖片和超連結控制項 2 事件處理的基礎 事件的基礎 建立事件處理程序 事件處理程序的參數列 共用事件處理程序 3 事件的基礎 事件 (Event) 是在執行應用程式時, 滑鼠或控制項載入等操作所觸發的一些動作 例如 : 將應用程式視為一輛公共汽車,

More information

INTRODUCTION TO COM.DOC

INTRODUCTION TO COM.DOC How About COM & ActiveX Control With Visual C++ 6.0 Author: Curtis CHOU mahler@ms16.hinet.net This document can be freely release and distribute without modify. ACTIVEX CONTROLS... 3 ACTIVEX... 3 MFC ACTIVEX

More information

2 4 WPF1 T I P 10 ) (XIII2) Aero Luna Royale Classic 4.1WPF Button (ContentControl) (ItemsControl) (RangeBase) Ink 4.1 System.Windows.Controls.Content

2 4 WPF1 T I P 10 ) (XIII2) Aero Luna Royale Classic 4.1WPF Button (ContentControl) (ItemsControl) (RangeBase) Ink 4.1 System.Windows.Controls.Content 第 4 章 WPF 4.1 4.2 4. 4.4 Ink 4. Windows Presentation Foundation WPFWindows Vista AeroWPF Windows WPF Aero (Windows Vista) Luna (Windows XP) Royale (Windows XP Media Center Edition 200Windows XP Tablet

More information

1: public class MyOutputStream implements AutoCloseable { 3: public void close() throws IOException { 4: throw new IOException(); 5: } 6:

1: public class MyOutputStream implements AutoCloseable { 3: public void close() throws IOException { 4: throw new IOException(); 5: } 6: Chapter 15. Suppressed Exception CH14 Finally Block Java SE 7 try-with-resources JVM cleanup try-with-resources JVM cleanup cleanup Java SE 7 Throwable getsuppressed Throwable[] getsuppressed() Suppressed

More information

Microsoft PowerPoint - 14Threads.ppt

Microsoft PowerPoint - 14Threads.ppt Threads Outline Introduction to Threads How to create Thread extend Thread implement Runnable interface Synchronization What is thread? 定義 : 程式的執行軌跡 Single Thread Multi-Thread 依序執行 int x, y; int z; x =

More information

untitled

untitled 1 Outline 流 ( ) 流 ( ) 流 ( ) 流 ( ) 流 ( ) 狀 流 ( ) 利 來 行流 if () 立 行 ; else 不 立 行 ; 例 sample2-a1 (1) 列 // 料 Console.Write(""); string name = Console.ReadLine(); Console.WriteLine(" " + name + "!!"); 例 sample2-a1

More information

1-6 Access 2016 實力養成暨評量解題秘笈 102. 書籍與作者 Step1 按 建立 索引標籤 資料表 群組的 資料表設計 按鈕 Step2 由上而下分別建立下列欄位並設定資料類型 : 欄位名稱 : ID, 資料類型 : 自動編號 欄位名稱 : BName, 資料類型 :

1-6 Access 2016 實力養成暨評量解題秘笈 102. 書籍與作者 Step1 按 建立 索引標籤 資料表 群組的 資料表設計 按鈕 Step2 由上而下分別建立下列欄位並設定資料類型 : 欄位名稱 : ID, 資料類型 : 自動編號 欄位名稱 : BName, 資料類型 : 1-6 102. 書籍與作者 102-1. Step1 按 建立 索引標籤 資料表 群組的 資料表設計 按鈕 Step2 由上而下分別建立下列欄位並設定資料類型 : 欄位名稱 : ID, 資料類型 : 自動編號 欄位名稱 : BName, 資料類型 : 簡短文字 欄位名稱 : AuthorID, 資料類型 : 數字 欄位名稱 : Publisher, 資料類型 : 簡短文字 欄位名稱 : Price,

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

Microsoft PowerPoint - 11_EventHandle.pptx

Microsoft PowerPoint - 11_EventHandle.pptx 第十一章 視窗事件處理技巧 11.1 事件介紹 11.3 滑鼠事件 11.2 鍵盤事件 11.4 共享事件 備註 : 可依進度點選小節 11.1 事件介紹 事件 (Event) 是物件受到外力因素的影響, 而發生某種動作 將觸發事件的物件稱為 事件傳送者事件傳送者 將捕捉事件並且回應它的物件稱為 事件接收者事件接收者 當事件發生時, 這物件的事件處理函式會被啟動 事件處理函式內的程式碼是依程式的需求而撰寫的,

More information

視窗程式設計

視窗程式設計 視窗程式設計 Windows Programming 視窗元件二 大綱 清單 (List) 下拉式選單 (Combo Box) 功能表 (Menu) 功能表處理事件 面板 (Panel) 捲軸 (Scroller) JList( 清單 ) 清單 是用來製作一連串的選項, 供使用者可以從清單中挑出所要選項, 所挑出可以有幾種方式, 例如 : JList( 清單 ) 清單的建立 使用 DefaultListModel

More information

1. 2. Flex Adobe 3.

1. 2. Flex Adobe 3. 1. 2. Flex Adobe 3. Flex Adobe Flex Flex Web Flex Flex Flex Adobe Flash Player 9 /rich Internet applications/ria Flex 1. 2. 3. 4. 5. 6. SWF Flash Player Flex 1. Flex framework Adobe Flex 2 framework RIA

More information

PowerPoint Presentation

PowerPoint Presentation 1 Programming the.net Compact Framework Programming the.net Compact Framework.NET Compact Framework 概 述 常 用 设 备 控 件 其 他 文 件 线 程 2 .NET Compact Framework 概 述.NET Compact Framework 是 较 小 版 本 的.NET Framework.NET

More information

Microsoft Word - Mail2000_SecurityPatch_

Microsoft Word - Mail2000_SecurityPatch_ Mail2000 安全性加強程式 網擎資訊軟體股份有限公司謹呈 1 Mail2000 安全性加強程式 Introduction Mail2000 安全性加強程式, 是針對 Mail2000 V4.0 以上版本, 包括 V4.0 及 V4.5 版本所提供, 以加強系統的安全性, 減少因惡意信件而引起的安全性問題 版本名稱 Mail2000 版本作業系統檔案名稱 V4.0 單一網域版本 V4.0 SDSS

More information

Web Form 表單與事件處理

Web Form 表單與事件處理 第 4 章 Web Form 表單與事件處理 第 4 章 Web Form 表單與事件處理 4-1 事件處理的基礎 4-2 ASP.NET 網頁與 Page 物件 4-3 ASP.NET 的伺服端控制項 4-4 資料輸出控制項 4-5 送出資料的控制項 4-6 圖片和超連結控制項 http://www1.chihlee.edu.tw/teachers/chienhua/ 2 4-1 事件處理的基礎

More information

投影片 1

投影片 1 軟體說明書繁體中文 RGB A 目錄 - CONTENTS 01 09 15 17 22 軟體主介面 巨集設定說明 主介面概觀 個人設定檔 (Profiles) 一般模式 / 遊戲模式 按鍵功能分配 巨集管理器概觀 巨集管理器 巨集錄製設定 巨集錄製時間列表 插入指令 閃移系統 - I.S.S (Instant Shift System) 燈光設定更新韌體 閃移系統啟動鈕設定說明 燈光設定介面 介面區域一

More information

Microsoft Word - App Inventor 2 的範例程式MoleMash.doc

Microsoft Word - App Inventor 2 的範例程式MoleMash.doc App Inventor 2 打地鼠程式 - MoleMash MoleMash 為一個簡單的動畫遊戲 遊戲內容 : 鼴鼠會隨機彈跳在遊戲區域裡, 而玩家在鼴鼠跳到別的地方前, 點擊它將會獲得分數 程式功能分析 : 設計一個遊戲, 讓鼴鼠每半秒移動一次 當它被觸摸時, 分數會加一分, 並且手機會發生震動 按下 Reset, 得分會歸零 需求元件 : hole mole 開發步驟 : 1. 請先新增一個名稱為

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

Microsoft PowerPoint - 09_事件驅動.ppt

Microsoft PowerPoint - 09_事件驅動.ppt 事件驅動程式設計 事件驅動是 Windows 程式設計的精髓 事件驅動與真實世界的運作模式非常類似 1 事件驅動的基本概念 2 事件驅動程式的要素 A. 物件 消防隊 物件 事件程序 B. 事件 C. 事件程序 事件 失火 救火程序 : 警鈴大作隊員穿著消防裝備出動消防車... 3 實例 : 把 消防隊 視為一種物件 把 失火 視為這種物件需要處理的事件 把 救火程序 視為這種物件的一種事件程序,

More information

Microsoft PowerPoint - 07_WinProg.pptx

Microsoft PowerPoint - 07_WinProg.pptx 第七章 視窗應用程式開發 7.1 建立視窗應用程式專案 7.2 整合開發環境介紹 7.3 控制項編輯與命名 7.4 視窗應用程式的開發 備註 : 可依進度點選小節 7.1 建立視窗應用程式專案 執行 開始 / / 會進入 Visual C# 2008 起始頁畫面 2 若希望能顯示起始頁, 執行功能表的 視窗 (W)/ 重設視窗配置 (R) 即可重新打開起始頁 其中 最近使用的專案 窗格用來顯示最近更新過的專案清單,

More information

TPM BIOS Infineon TPM Smart TPM Infineon TPM Smart TPM TPM Smart TPM TPM Advanced Mode...8

TPM BIOS Infineon TPM Smart TPM Infineon TPM Smart TPM TPM Smart TPM TPM Advanced Mode...8 Smart TPM Rev. 1001 Smart TPM Ultra TPM Smart TPM TPM...3 1. BIOS... 3 2. Infineon TPM Smart TPM... 4 2.1. Infineon TPM...4 2.2. Smart TPM...4 3. TPM... 5 3.1. Smart TPM TPM...5 3.2. Advanced Mode...8

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

1 1 Excel VBA 說明 ( ) (_) STEP4 Excel 2 STEP5 A1 1 B2 2 C3 3 STEP6 A1 STEP7 > > 1-11

1 1 Excel VBA 說明 ( ) (_) STEP4 Excel 2 STEP5 A1 1 B2 2 C3 3 STEP6 A1 STEP7 > > 1-11 1-3 1-3-1 Excel VBA VBA OK CD DVD Excel VBA Excel VBA Excel Visual Basic A1 1 B2 2 C3 3 STEP1 Excel Ch01_VBA.xlsm 1 > > STEP2 Excel 1 2 STEP3 1-10 1 1 Excel VBA 說明 ( ) (_) STEP4 Excel 2 STEP5 A1 1 B2 2

More information

ebook39-5

ebook39-5 5 3 last-in-first-out, LIFO 3-1 L i n e a r L i s t 3-8 C h a i n 3 3. 8. 3 C + + 5.1 [ ] s t a c k t o p b o t t o m 5-1a 5-1a E D 5-1b 5-1b E E 5-1a 5-1b 5-1c E t o p D t o p D C C B B B t o p A b o

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

JavaIO.PDF

JavaIO.PDF O u t p u t S t ream j a v a. i o. O u t p u t S t r e a m w r i t e () f l u s h () c l o s e () public abstract void write(int b) throws IOException public void write(byte[] data) throws IOException

More information

Microsoft PowerPoint - vb_net5

Microsoft PowerPoint - vb_net5 選 擇 控 制 項 與 條 件 敘 述 資 訊 科 技 系 林 偉 川 結 構 化 程 式 設 計 結 構 化 程 式 設 計 是 一 種 軟 體 開 發 方 法, 它 是 一 種 組 織 和 撰 寫 程 式 碼 的 技 術, 使 用 由 上 而 下 的 設 計 方 法 來 分 析 問 題, 將 程 式 分 解 成 階 層 架 構 的 模 組, 每 個 模 組 是 一 段 擁 有 獨 立 功 能 的

More information

840 提示 Excel - Excel -- Excel (=) Excel ch0.xlsx H5 =D5+E5+F5+G5 (=) = - Excel 00

840 提示 Excel - Excel -- Excel (=) Excel ch0.xlsx H5 =D5+E5+F5+G5 (=) = - Excel 00 Excel - - Excel - -4-5 840 提示 Excel - Excel -- Excel (=) Excel ch0.xlsx H5 =D5+E5+F5+G5 (=) = - Excel 00 ( 0 ) 智慧標籤 相關說明提示 -5 -- Excel 4 5 6 7 8 + - * / % ^ = < >= & 9 0 (:) (,) ( ) Chapter - :,

More information

Visual C# 2005程式設計

Visual C# 2005程式設計 Visual Basic 2005 程式設 計 第 5 章流程控制 5-1 認識流程控制 判斷結構 (decision structures) If...Then Else Select Case Try Catch Finally 迴圈結構 (loop structures) For...Next For Each...Next Do...Loop While End While 5-2 If Then

More information

ch02

ch02 AEL019400- Visual C# 2017 基礎必修課 < 勘誤資料 > 勘誤日期 :2017/9/10 ch02 P2-25 int a= 2400; //a 為 int( 整數 ) 資料型別 double d = 3.56; //d 為 double( 倍精確度浮點數 ) d = a + 34.6; //a 會先被電腦自動轉型為 double 型別, 再進行相加運算 a = d * 8;

More information

untitled

untitled 12-1 -2 VC# Web Blog 12-1 -1-1 12-1.1-1 C:\ ChartModuleSample_CSharp\Application\2001\ Files\ 4096 KB 120 Web.Config httpruntime maxrequestlength executiontimeout 12-2

More information

2010年3月计算机等级考试四级网络工程师笔试

2010年3月计算机等级考试四级网络工程师笔试 计 算 机 二 级 VB 经 典 预 测 题 下 列 各 题 A) B) C) D) 四 个 选 项 中, 只 有 一 个 选 项 是 正 确 的 请 将 正 确 选 项 填 涂 在 答 题 卡 相 应 位 置 上, 答 在 试 卷 上 不 得 分 (1) 下 列 叙 述 中 正 确 的 是 ( ) A) 循 环 队 列 是 队 列 的 一 种 链 式 存 储 结 构 B) 循 环 队 列 是 队

More information

05855BB03.indd

05855BB03.indd 3 Visual Basic 控制項 智慧型手機的功能日益強大, 不論是哪一種廠牌的手機, 都會提供用來顯示運作狀態的螢幕 用來拍照或攝影的鏡頭, 以及供使用者撥號的按鍵等 視窗應用程式也有類似之處, 通常都會提供可與使用者互動的元件, 例如操控程式執行的按鈕 提示操作的標籤文字 等控制項, 可用來佈建使用者介面 你曾注意到人氣超高的遊戲軟體 ( 如神魔之塔 ), 多半都提供操作簡易的使用者介面嗎?

More information

EJB-Programming-3.PDF

EJB-Programming-3.PDF :, JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Value Object Design Pattern J2EE Design Patterns Value Object Value Object Factory J2EE EJB Test Client

More information

Microsoft PowerPoint - vb_net4

Microsoft PowerPoint - vb_net4 視窗應用程式表單的基本輸出入 資科系 林偉川 VB.NET 的物件說明 VB.NET 物件可以視為一個提供特定功能的元件或黑盒子, 並不用考慮元件內部的資料是什麼或程式碼怎麼寫, 只需知道這個物件提供什麼方法和屬性, 以及如何使用它, 就可以用來建立所需的應用程式 2 1 VB.NET 的物件說明 - 物件 物件 (Objects): 物件為物件導向程式的基礎, 物件是資料和包含處理此資料程式碼 (

More information

全国计算机技术与软件专业技术资格(水平)考试

全国计算机技术与软件专业技术资格(水平)考试 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2008 年 上 半 年 程 序 员 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 ) 试 题 一 ( 共 15 分 ) 阅 读 以 下 说 明 和 流 程 图, 填 补 流 程 图 中 的 空 缺 (1)~(9), 将 解 答 填 入 答 题 纸 的 对 应 栏 内 [ 说 明

More information

基于UML建模的管理管理信息系统项目案例导航——VB篇

基于UML建模的管理管理信息系统项目案例导航——VB篇 PowerBuilder 8.0 PowerBuilder 8.0 12 PowerBuilder 8.0 PowerScript PowerBuilder CIP PowerBuilder 8.0 /. 2004 21 ISBN 7-03-014600-X.P.. -,PowerBuilder 8.0 - -.TP311.56 CIP 2004 117494 / / 16 100717 http://www.sciencep.com

More information