Cov txheej txheem:
- Kauj Ruam 1: Tsim Txoj Haujlwm Tshiab hauv Microsoft Visual Studio
- Kauj Ruam 2: Ntxiv Txhua Yam rau Daim Ntawv
- Kauj Ruam 3: Ntxiv Kab
- Kauj Ruam 4: Ua ntej Sau Txoj Cai
- Kauj Ruam 5: Sau Txoj Cai
- Kauj Ruam 6: Code Code Code…
- Kauj ruam 7: Nws Ua tiav. Kuaj Nws
Video: Yuav Ua Li Cas Tsim Cov Ntawv Xov Tooj Yooj Yim C#: 7 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:31
Nyob zoo, Kuv yog Lukas, nws yog thawj qhov kev qhia kuv. Kuv xav qhia koj yuav tsim phau ntawv xov tooj yooj yim li cas hauv Microsoft Visual Studio siv C#. Nws yog qhov zoo kom muaj qee qhov kev paub pib ntawm kev ua haujlwm ua ntej ua qhov haujlwm no. Cia peb pib. Peb xav tau Microsoft Visual Studio, nws pub dawb rau cov tub ntxhais kawm, koj tuaj yeem tau txais Professional Edition los ntawm MSDNAA. Tshawb nrhiav google kom paub ntau ntxiv. Nov yog qhov peb daim ntawv thov yuav zoo li:
Kauj Ruam 1: Tsim Txoj Haujlwm Tshiab hauv Microsoft Visual Studio
Pib Microsoft Visual Studio, thiab tsim qhov Project tshiab, xaiv Windows Forms Application remeber project type is Visual C#. Koj tuaj yeem tso npe rau koj txoj haujlwm txhua yam koj xav tau thiab hloov chaw rau txoj haujlwm yog tias tsis xav tau.
Kauj Ruam 2: Ntxiv Txhua Yam rau Daim Ntawv
Tam sim no, nws yog Daim Ntawv Tsis Txaus. Wb ntxiv rau nws qee yam khoom siv los ntawm cov cuab yeej raws li pom hauv daim duab. Lawv yog: DataGridView, SaveFileDioalog, OpenFileDialog thiab menuStrip
Kauj Ruam 3: Ntxiv Kab
Tom qab ntxiv DataGridView, Peb muaj qhov chaw khoob, nyem txoj cai nas khawm ntawm nws thiab xaiv kho kab.
Kauj Ruam 4: Ua ntej Sau Txoj Cai
Xyuas kom koj daim ntawv zoo li qhov no thiab DataGridView lub npe "GRID". Koj tuaj yeem teeb nws hauv qhov tsim nyog qhov rai
Kauj Ruam 5: Sau Txoj Cai
Nyem ob zaug ntawm txhua ntu ntawm koj cov ntawv qhia zaub mov, txhawm rau tsim cov xwm txheej, txhua lub sijhawm lub qhov rai nrog tus lej yuav pom, yog li rov qab mus rau nws nrog txhua qhov (Txuag, Qhib, Kaw) Qhov peb xav tau hauv tus lej: ntiag tug tsis muaj dab tsi SaveToolStripMenuItem_Click (tus neeg xa khoom, EventArgs e) {} ntiag tug tsis muaj dab tsi OpenToolStripMenuItem_Click (tus xa khoom, EventArgs e) {} ntiag tug tsis muaj dab tsi CloseToolStripMenuItem_Click (tus xa khoom, EventArgs e) {}
Kauj Ruam 6: Code Code Code…
Nov yog tus lej tag nrho ntawm peb daim ntawv thov nrog cov lus pom tom qab "//" cov xwm txheej: siv System; siv System. Collections. Generic; siv System. ComponentModel; siv System. Data; siv System. Drawing; siv System. Linq; siv System. Ntawv; siv System. IO; // ntxiv siv System. Windows. Forms; siv System. Runtime. Serialization. Formatters. Binary; // ntxiv siv System. Runtime. Serialization; // addnamespace testowa // no kuv lub npe ntawm qhov project {pej xeem ib nrab chav kawm Form1: Daim ntawv {pej xeem Form1 () {InitializeComponent (); } [Serializable] // Nws tso cai rau peb chav kawm kom tau txais kev cawmdim hauv cov ntaub ntawv hauv chav kawm rau pej xeem // Peb chav kawm rau cov ntaub ntawv {pej xeem cov npe lub npe; pej xeem txoj hlua lub npe; pej xeem txoj hlua nroog; pej xeem txoj hlua tooj; } ntiag tug void SaveToolStripMenuItem_Click (tus xa khoom, EventArgs e) {GRID. EndEdit (); SaveFileDialog saveFileDialog1 = tshiab SaveFileDialog (); // Tsim cov ntawv khaws cia sib tham saveFileDialog1. RestoreDirectory = muaj tseeb; // nyeem thiab lim cov ntaub ntawv raw yog (saveFileDialog1. ShowDialog () == DialogResult. OK) {BinaryFormatter formatter = tshiab BinaryFormatter (); FileStream tso tawm = FileStream tshiab (saveFileDialog1. FileName, FileMode. OpenOrCreate, FileAccess. Write); ' int n = GRID. RowCount; cov ntaub ntawv Tus neeg = cov ntaub ntawv tshiab [n - 1]; // Peb muaj cov ntaub ntawv ntau npaum li ntau kab, kab tau ntxiv tsis siv neeg yog li peb ib txwm muaj ib kab ntau dua qhov peb xav tau, yog li n yog tus lej ntawm kab -1 kab tsis ua haujlwm rau (int i = 0; i <n - 1; i ++) {Tus neeg = cov ntaub ntawv tshiab (); // GRID muaj ob tus lej hauv "" thawj tus lej yog tus lej ntawm kab ntawv, thib ob yog tus lej sib txawv ntawm kab ', ntsuas ib txwm pib los ntawm 0' Tus neeg .name = GRID [0, i]. Value. ToString (); Tus neeg .surname = GRID [1, i]. Value. ToString (); Tus neeg .city = GRID [2, i]. Value. ToString (); Tus neeg .number = GRID [3, i]. Value. ToString (); } formatter. Serialize (tso tawm, Tus neeg); tso tawm. Close (); }} ntiag tug tsis muaj dab tsi OpenToolStripMenuItem_Click (tus xa khoom, EventArgs e) // Nyeem Ntawv thiab ntxiv cov ntaub ntawv rau GRID {openFileDialog1 = tshiab OpenFileDialog (); yog (openFileDialog1. ShowDialog () == DialogResult. OK) {BinaryFormatter nyeem ntawv = tshiab BinaryFormatter (); FileStream cov tswv yim = FileStream tshiab (openFileDialog1. FileName, FileMode. Open, FileAccess. Read); cov ntaub ntawv Tus neeg = (cov ntaub ntawv ) nyeem ntawv. Deserialize (tswv yim); GRID. Rows. Clear (); rau (int i = 0; i <Person. Length; i ++) {GRID. Rows. Add (); GRID [0, i]. Value = Tus neeg .name; GRID [1, i]. Value = Tus neeg .surname; GRID [2, i]. Value = Tus neeg .city; GRID [3, i]. Value = Tus neeg .number; }}} ntiag tug tsis muaj dab tsi CloseToolStripMenuItem_Click (tus xa khoom, EventArgs e) {Kaw (); // kaw ib qho app}}}
Kauj ruam 7: Nws Ua tiav. Kuaj Nws
Nyem rau ntawm cov ntawv qhia zaub mov Debug hauv Visual Studio dua li pib Debugging nws yuav tsum ua haujlwm. Sim sim lub app. Kuv paub tseeb tias koj yuav pom qee qhov kab, peb daim ntawv thov yooj yim heev yam tsis muaj kev ruaj ntseg thaum txuag, qhib cov ntaub ntawv, nws tsuas yog ua piv txwv yuav ua li cas thiaj li ua tau daim ntawv thov loj dua. Koj tuaj yeem txhim kho nws, ua koj tus kheej version! Ntxiv qee qhov tshiab, hloov txhua yam koj xav tau. Hmoov zoo!
Pom zoo:
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: 4 Cov Kauj Ruam (nrog Duab)
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: Hnub no kuv xav qhia yuav ua li cas kom pom lub teeb pom kev zoo los ntawm lub zog xa hluav taws xob tsis siv hluav taws xob los ntawm tus txhuam txhuam hniav thiab lub tshuab solenoid valve coils uas tau khaws los ntawm scrapyard.Ua ntej pib, thov saib cov vis dis aus hauv qab no:
Yuav Ua Li Cas Yooj Yim DTMF (suab) Tus Xov Tooj Kab Xov Tooj: 3 Kauj Ruam
Yuav Ua Li Cas Yooj Yim DTMF (suab nrov) Tus Xov Tooj Kab Xov Tooj: Qhov no yog txoj haujlwm yooj yim uas tso cai rau koj txiav txim siab DTMF cov cim ntawm ib puag ncig txhua lub xov tooj. Hauv qhov kev qhia no, peb siv lub decoder MT8870D. Peb tab tom siv lub suab hais lus tso suab ua ntej vim tias, ntseeg kuv, nws yog qhov mob tom qab los sim thiab ua nrog
EZ -Pelican - Durable, Yooj Yim Tsim thiab ya Xov Tooj Cua Xov Tooj Cua: 21 Cov Kauj Ruam (nrog Duab)
EZ-Pelican-Durable, Yooj Yim Tsim thiab Ya Dav Hlau Tswj Dav Hlau: Hauv phau ntawv qhia no kuv yuav qhia koj yuav tsim EZ-Pelican li cas! Nws yog lub dav hlau tswj lub dav hlau kuv tsim. Nws cov yam ntxwv tseem ceeb yog: Super Durable - Muaj peev xwm daws tau ntau yam kev sib tsoo Yooj Yim Tsim Kom Yooj Yim Yooj Yim Yooj Yim! Qee qhov ntawm nws yog kev txhawb siab
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS YOOJ YIM: 4 Cov Kauj Ruam
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS: Nyob zoo txhua tus hauv cov lus qhia no kuv yuav qhia koj yuav ua li cas kom yooj yim " SOIL DRYNESS SENSOR ". Qhuav ntawm cov av tau txheeb xyuas siv qhov taw qhia coj. Lub teeb ci wi
Ryobi 18vdc Lub Teeb Nrog Ipod lossis Lub Xov Tooj Ntawm Lub Xov Tooj Ntawm Lub Xov Tooj: 5 Kauj Ruam
Ryobi 18vdc Lub Teeb Nrog Ipod lossis Lub Xov Tooj Ntawm Lub Xov Tooj Ntawm Lub Xov Tooj: Nov yog qhov hack sai uas yuav ua rau siv koj li 18vdc Ryobi teeb nyem. Kuv tau ntxiv 12vdc tso zis rau them kuv lub ipod lossis xov tooj ntawm tes hauv qhov me me. Nws siv sijhawm li ib teev thiab tsis nyuaj heev. Txheeb nws. Cov npe ntu: 1-Ryobi 18vdc Teeb nyem