untitled

Similar documents
untitled

untitled

Microsoft PowerPoint - ch6.pptx

untitled

untitled

第五章 實例個案

untitled

個人教室 / 網路硬碟

untitled

untitled

untitled

untitled

untitled

龍華科技大學

untitled

untitled

untitled

九十三年第三期檔案管理工作研習營學員建議事項答覆情形彙整表

1

隱形眼鏡的世界

untitled

untitled

臺灣地區的警察教育現況與展望

地方公共服務績效比較評量之探討—標竿學習策略的觀點

Slide 1

untitled

untitled

untitled

untitled

untitled

untitled

台南縣全民學區數位學習課程進階班—PhotoImpact 10

untitled

大陸黨報集團化發展之研究

untitled

untitled

untitled

untitled

untitled

untitled

untitled

untitled

國立中山大學學位論文典藏.PDF

untitled

untitled

國立故宮博物院九十三年提升服務品質績效報告

untitled

第一場

untitled

PowerPoint 簡報

教學組報告

了 立 連 立 量 領 來 例 蘭 便 不 數 不 論 更 更 更 力 更 參 例 來 例 見 量 度 量 量 參 論 量 行 量 量 瑩 理 來 錄 量 量 不 力 省 力 立 力 量 量 量 了 量 便 錄 錄 錄 料 說 省 6

untitled

十四、特殊需求的嬰兒

untitled

untitled

性別主流化簡介

自學進修學力鑑定考試職業證照與專科學校類科及筆試科目對照表

untitled

untitled

untitled

I/O Files讀寫檔案:


專 題 論 述

untitled

4-04 論文封面(樣式)

untitled

施政計畫管理資訊系統

untitled

untitled

untitled

untitled

untitled

第一章 導論

untitled

untitled

吃寒天真的能減肥嗎

人身保險業務員資格測驗方案

untitled

untitled

廉 樂 不 廉 倫 理 廉 倫 理 領 不 參 領 不 若 不 不 不 不 利 聯 行 李 聯 例 律

untitled

台灣紡織產業發展史物件徵集計畫研究報告

untitled

untitled

untitled

2011台灣高中職專題暨小論文競賽

untitled

電腦組裝訓練

untitled

untitled

untitled

untitled

中華人民共和國殘疾人保障法(2008年修訂)

教育部九十四年公費留學考試簡章

95

untitled

untitled

untitled

國立政治大學新研所碩士在職專班

Transcription:

1

MessageBox 類 MessageBox 類 Show Show (,,, ); Show (string, string, MessageBoxButtons, MessageBoxIcon)

MessageBox 類 列 數 MessageBoxButtons.OK MessageBoxButtons.OKCancel MessageBoxButtons.AbortRetryIgnore MessageBoxButtons.YesNoCancel MessageBoxButtons.YesNo MessageBoxButtons.RetryCancel 說 異 略

MessageBox 類 列 數 MessageBoxIcon.Asterisk MessageBoxIcon.Information MessageBoxIcon.Exclamation MessageBoxIcon.Warning MessageBoxIcon.Error MessageBoxIcon.Hand MessageBoxIcon.Stop MessageBoxIcon.Question MessageBoxIcon.None

MessageBox 類 MessageBox.Show DialogResult 列 列 DialogResult.OK DialogResult.Cancel DialogResult.Abort DialogResult.Retry DialogResult.Ignore DialogResult.Yes DialogResult.No 1 2 3 4 5 6 7 異 略

例 sample8-a1 (1) ( ) private void okbtn_click(object sender, System.EventArgs e) if(pwtb.text.length!= 4) MessageBox.Show(" 數!!", "", MessageBoxButtons.OK, MessageBoxIcon.Error); else MessageBox.Show("!!", "", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit();

例 sample8-a1 (2) private void exitbtn_click(object sender, System.EventArgs e) DialogResult result; result = MessageBox.Show(" 離!?", " 離 ", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if(result == DialogResult.OK) Application.Exit(); else pwtb.focus();

RadioButton RadioButton 利 GroupBox Panel 來 CheckAlign Checked Text CheckedChanged Checked

例 sample8-a2 (1) 料 利 GroupBox RadioButton private void exitbtn_click(object sender, System.EventArgs e) Application.Exit();

例 sample8-a2 (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, " 料 ");

CheckBox CheckBox CheckAlign Checked Text ThreeState CheckState 狀 CheckedChanged Checked CheckStateChanged CheckState

例 sample8-a3 (1) 立 更 private void monitorcb_checkedchanged(object sender, System.EventArgs e) int cost = monitorcb.checked? 12000: -12000; totallb.text = (int.parse(totallb.text) + cost).tostring();

例 sample8-a3 (2) private void boxcb_checkedchanged(object sender, System.EventArgs e) int cost = boxcb.checked? 15000: -15000; totallb.text = (int.parse(totallb.text) + cost).tostring(); private void mousecb_checkedchanged(object sender, System.EventArgs e) int cost = mousecb.checked? 500: -500; totallb.text = (int.parse(totallb.text) + cost).tostring();

例 sample8-a3 (3) private void keyboardcb_checkedchanged(object sender, System.EventArgs e) int cost = keyboardcb.checked? 500: -500; totallb.text = (int.parse(totallb.text) + cost).tostring();

練 sample8-b1 CPU RAM 類 CPU RAM 若 念 利 讀 GroupBox

ListBox (1) ListBox Items (ListBox.ObjectCollection 類 ) MultiColumn 欄 ColumnWidth 欄 欄 度 SelectionMode 數 None 不 One MultiSimple () MultiExtended ( 利 Ctrl Shift )

ListBox (2) SelectedItem SelectedItems SelectedIndex 索 SelectedIndices 索 SelectedIndexChange

類 ListBox.ObjectCollection 類 Count 數 Add Remove Clear Ex listbox1.items.add("alice");

例 sample8-a4 (1) private void Form1_Load(object sender, System.EventArgs e) string[] funcstr = "","","",""," ","","",""," 說 "; foreach(string str in funcstr) alllb.items.add(str);

例 sample8-a4 (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); alllb.items.remove(alllb.selecteditem);

例 sample8-a4 (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);

ComboBox ComboBox 拉 ListBox Text MaxLength 度 MaxDropDownItems 拉 數 DropDownStyle DropDown DropDownList 不 Simple

例 sample8-a5 (1) private void addresstb_enter(object sender, System.EventArgs e) if(addresstb.text == "") addresstb.text = "";

例 sample8-a5 (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();

練 sample8-b2 類 說 神 龍 C# JAVA 料 料理 料理 料理 念 利 ComboBox ListBox

TreeView TreeView 狀 Nodes SelectedNode CheckBoxes PathSeperator 路 串 AfterSelect 更

類 TreeNodeCollection 類 Count 數 Add Remove ( TreeNode) TreeNode 類 Text Remove FullPath 狀 狀 路

例 sample8-a6 (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);

例 sample8-a6 (2) private void diskcb_selectedindexchanged(object sender, System.EventArgs e) updatetreeview(diskcb.text); private void updatetreeview(string disk) try dirtv.nodes.clear(); string[] dirs = Directory.GetDirectories(disk);

例 sample8-a6 (3) int i=0; foreach(string dir in dirs) catch dirtv.nodes.add(dir); i++; try string[] subdirs = Directory.GetDirectories(dir); foreach(string subdir in subdirs) dirtv.nodes[i-1].nodes.add(subdir); catch

練 sample8-b3 料 不 念 利 TreeView

ListView ListView Columns 欄 Items (ListView.ListViewItemCollection 類 ) View CheckBoxes GridLines

類 (1) ListView.ListViewItemCollection 類 Count 數 Add Remove Clear ListViewItem 類 SubItems (ListViewItem.ListViewSubItemCollection 類 ) Text

類 (2) ListViewItem.ListViewSubItemCollection 類 Count 數 Add Remove Clear ListViewItem.ListViewSubItem 類 Text

例 sample8-a7 (1) private void clearbtn_click(object sender, System.EventArgs e) idtb.text = ""; nametb.text = ""; studentlv.items.clear();

例 sample8-a7 (2) private void addbtn_click(object sender, System.EventArgs e) if(idtb.text!= "" && nametb.text!= "") ListViewItem item = new ListViewItem(); item.subitems.add(idtb.text); item.subitems.add(nametb.text); studentlv.items.add(item);

練 sample8-b4 料 念 利 ListView 來