版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、視窗程式設(shè)計(jì)講解視窗程式設(shè)計(jì)講解綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理2綱要第一個(gè)視窗程式4綱要改寫主控臺程式為視窗程式加入圖形影像二十一點(diǎn)模擬程式0.1G版3綱要改寫主控臺程式為視窗程式5綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理4綱要第一個(gè)視窗程式6第一個(gè)C#視窗程式新增專案/名稱 (WindowsForm應(yīng)用程式)Form1.cs設(shè)計(jì)/屬性頁建置方案/啟動但不偵錯(cuò)方案總管/Program.cs方案總管/Form1.cs/Form1.Designer.cs重新命名5第一個(gè)C#
2、視窗程式新增專案/名稱 (WindowsForm應(yīng)Form6Form8Form 屬性7Form 屬性9WindowsFormsApplication1.Program.cs (1/2)using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;namespace WindowsFormsApplication1 static class Program / / 應(yīng)用程式的主要進(jìn)入點(diǎn)。 / STAThread 8WindowsFormsApplication1.ProgWin
3、dowsFormsApplication1.Program.cs (2/2) static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1(); 9WindowsFormsApplication1.ProgWindowsFormsApplication1.Form1.Designer.cs (1/3)namespace WindowsFormsApplication1 partial clas
4、s Form1 / / 設(shè)計(jì)工具所需的變數(shù)。 / private System.ComponentModel.IContainer components = null; / / 清除任何使用中的資源。 / / 如果應(yīng)該處置 Managed 資源則為 true,否則為 false。 10WindowsFormsApplication1.Form1WindowsFormsApplication1.Form1.Designer.cs (2/3) protected override void Dispose(bool disposing) if (disposing & (components !=
5、 null) components.Dispose(); base.Dispose(disposing); #region Windows Form 設(shè)計(jì)工具產(chǎn)生的程式碼 / / 此為設(shè)計(jì)工具支援所需的方法 - 請勿使用程式碼編輯器修改這個(gè)方法的內(nèi)容。 / / 11WindowsFormsApplication1.Form1WindowsFormsApplication1.Form1.Designer.cs (3/3) private void InitializeComponent() ponents = new System.ComponentModel.Container(); this
6、.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Text = Form1; #endregion 12WindowsFormsApplication1.Form1練習(xí)產(chǎn)生一個(gè)視窗程式,表單類別名為MainForm,表單標(biāo)題為Hello,嘗試改變其大小13練習(xí)產(chǎn)生一個(gè)視窗程式,表單類別名為MainForm,表單標(biāo)題綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理14綱要第一個(gè)視窗程式16工具箱檢視/工具箱通用控制項(xiàng)ButtonCheckBoxLabelProgressB
7、aretc.15工具箱檢視/工具箱17練習(xí)產(chǎn)生一個(gè)視窗程式,嘗試加入一些通用控制項(xiàng)16練習(xí)產(chǎn)生一個(gè)視窗程式,嘗試加入一些通用控制項(xiàng)18綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理17綱要第一個(gè)視窗程式19程式UsingMessageBox畫面18程式UsingMessageBox畫面20UsingMessageBox.Program.csusing System;using System.Collections.Generic;using System.Windows.Forms;namespace UsingMessageBox stat
8、ic class Program static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm(); /* MessageBox.Show(Main form has been closed); /* 19UsingMessageBox.Program.csusin綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理20綱要第一個(gè)視窗程式22
9、視窗程式執(zhí)行流程程式進(jìn)入程式初始化等待狀態(tài)事件處理資源釋放程式離開事件發(fā)生事件處理結(jié)束程式關(guān)閉21視窗程式執(zhí)行流程程式進(jìn)入程式初始化等待狀態(tài)事件處理資源釋放程事件處理22事件處理24程式HandlingEvents表單輸出23程式HandlingEvents表單輸出25HandlingEvents.MainForm.cs (1/2)using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;us
10、ing System.Windows.Forms;namespace HandlingEvents public partial class MainForm : Form public MainForm() InitializeComponent(); 24HandlingEvents.MainForm.cs (1/HandlingEvents.MainForm.cs (2/2) private void MainForm_Click(object sender, EventArgs e) /* MessageBox.Show( 滑鼠剛剛點(diǎn)擊 ); /* 25HandlingEvents.M
11、ainForm.cs (2/HandlingEvents.MainForm.Designer.cs片段 (1/2) #region Windows Form 設(shè)計(jì)工具產(chǎn)生的程式碼 / / 此為設(shè)計(jì)工具支援所需的方法 - 請勿使用程式碼編輯器修改 / 這個(gè)方法的內(nèi)容。 / / private void InitializeComponent() this.SuspendLayout(); / / MainForm / this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);26HandlingEvents.MainForm.Des
12、igHandlingEvents.MainForm.Designer.cs片段 (2/2)this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(292, 266); this.Name = MainForm; this.Text = MainForm; this.Click += new System.EventHandler(this.MainForm_Click); this.ResumeLayout(false); #endregion
13、27HandlingEvents.MainForm.Desig練習(xí)產(chǎn)生一個(gè)視窗程式,每次滑鼠雙擊,即顯示訊息修改程式,使能累計(jì)滑鼠雙擊次數(shù),並顯示於訊息盒28練習(xí)產(chǎn)生一個(gè)視窗程式,每次滑鼠雙擊,即顯示訊息30綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理29綱要第一個(gè)視窗程式31程式UsingLabels畫面30程式UsingLabels畫面32基本標(biāo)籤31基本標(biāo)籤33標(biāo)籤點(diǎn)擊事件處理(1/2)using System;using System.Collections.Generic;using System.ComponentModel;u
14、sing System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace UsingLabels public partial class MainForm : Form public MainForm() InitializeComponent(); 32標(biāo)籤點(diǎn)擊事件處理(1/2)using System;34標(biāo)籤點(diǎn)擊事件處理(2/2) private void label1_Click(object sender, EventArgs e) /* label1.Text = 程式
15、可關(guān)閉;/* 33標(biāo)籤點(diǎn)擊事件處理(2/2) private void l程式UsingButtons畫面34程式UsingButtons畫面36按鈕35按鈕37按鈕點(diǎn)擊事件處理(1/3)using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace UsingButtons public partial class Main
16、Form : Form public MainForm() InitializeComponent(); 36按鈕點(diǎn)擊事件處理(1/3)using System;38按鈕點(diǎn)擊事件處理(2/3) private void button1_Click( object sender, EventArgs e) /* if (button1.Text = 是(&Y) label1.Text = 檔案已刪除; button1.Text = 確定; button2.Visible = false; else Dispose(true); /* 37按鈕點(diǎn)擊事件處理(2/3) private void b按
17、鈕點(diǎn)擊事件處理(3/3) private void button2_Click(object sender, EventArgs e) /* Dispose(true); /* 38按鈕點(diǎn)擊事件處理(3/3) private void b練習(xí)撰寫應(yīng)用標(biāo)籤與按鈕的視窗程式,內(nèi)容自由發(fā)揮39練習(xí)撰寫應(yīng)用標(biāo)籤與按鈕的視窗程式,內(nèi)容自由發(fā)揮41綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理40綱要第一個(gè)視窗程式42程式UsingMenuStrip畫面41程式UsingMenuStrip畫面43主選單與選項(xiàng)42主選單與選項(xiàng)44練習(xí)設(shè)定主選單及選項(xiàng),內(nèi)容
18、自定43練習(xí)設(shè)定主選單及選項(xiàng),內(nèi)容自定45綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理44綱要第一個(gè)視窗程式46程式UsingDialogForm畫面45程式UsingDialogForm畫面47對話表單設(shè)計(jì)專案/加入新項(xiàng)目/Windows FormLabel/TextBox/ButtonTextBox屬性(Text, TextAlign)及Button行為調(diào)整設(shè)定46對話表單設(shè)計(jì)專案/加入新項(xiàng)目/Windows Form48UsingDialog.MainForm.cs (1/2)using System;using System.Col
19、lections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace UsingDialogForm public partial class MainForm : Form public MainForm() InitializeComponent(); 47UsingDialog.MainForm.cs (1/2)uUsingDialog.MainForm.cs (2/2) priva
20、te void 輸入表格ToolStripMenuItem_Click(object sender, EventArgs e) /* Dialog diag = new Dialog(); diag.ShowDialog(); /* 48UsingDialog.MainForm.cs (2/2)UsingDialog.Dialog.cs (1/3)using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System
21、.Text;using System.Windows.Forms;namespace UsingDialogForm public partial class Dialog : Form /* int , table = new int2, 3; /* public Dialog() InitializeComponent(); 49UsingDialog.Dialog.cs (1/3)usiUsingDialog.Dialog.cs (2/3) private void button1_Click(object sender, EventArgs e) /* table0, 0 = Conv
22、ert.ToInt32(textBox1.Text); table0, 1 = Convert.ToInt32(textBox2.Text); table0, 2 = Convert.ToInt32(textBox3.Text); table1, 0 = Convert.ToInt32(textBox4.Text); table1, 1 = Convert.ToInt32(textBox5.Text); table1, 2 = Convert.ToInt32(textBox6.Text); MessageBox.Show(table0, 0.ToString()+ t + table0, 1.
23、ToString()+ t + table0, 2.ToString()+ n + table1, 0.ToString()+ t + table1, 1.ToString()+ t + table1, 2.ToString() + n);/* 50UsingDialog.Dialog.cs (2/3) UsingDialog.Dialog.cs (3/3) private void button2_Click(object sender, EventArgs e) /* Dispose(); /* 51UsingDialog.Dialog.cs (3/3) 練習(xí)以對話表單輸入資料,內(nèi)容自定5
24、2練習(xí)以對話表單輸入資料,內(nèi)容自定54綱要第一個(gè)視窗程式工具箱與控制項(xiàng)訊息盒事件處理標(biāo)籤與按鈕選單對話表單MVC:模型-呈現(xiàn)-控制器原理53綱要第一個(gè)視窗程式55Model-View-Controller*D. Collins, Designing Object-Oriented User Interfaces, Benjamin/Cummings, 1995.54Model-View-Controller*D. Colli形式與功能Function determines forms資料處理核心與使用介面儘量分離 (Document vs. View)使用介面較常變動資料處理核心較為穩(wěn)定55形
25、式與功能Function determines forms綱要改寫主控臺程式為視窗程式加入圖形影像二十一點(diǎn)模擬程式0.1G版56綱要改寫主控臺程式為視窗程式58程式UsingGUI畫面57程式UsingGUI畫面59UsingGUI.MainForm.cs (1/3)using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespac
26、e UsingGUI public partial class MainForm : Form /* Table t = new Table(); /* 58UsingGUI.MainForm.cs (1/3)usinUsingGUI.MainForm.cs (2/3) public MainForm() InitializeComponent(); private void 輸入表格ToolStripMenuItem_Click(object sender, EventArgs e) /* Dialog diag = new Dialog(); diag.ShowDialog(); t.Co
27、ntent = diag.Content; 計(jì)算ToolStripMenuItem.Enabled = true; /* 59UsingGUI.MainForm.cs (2/3) pUsingGUI.MainForm.cs (3/3) private void 計(jì)算ToolStripMenuItem_Click(object sender, EventArgs e) /* Output output = new Output(); output.DoComputation(t); output.ShowDialog(); /* 60UsingGUI.MainForm.cs (3/3) pUsi
28、ngGUI.Dialog.cs (1/4)using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace UsingGUI public partial class Dialog : Form /* int , table = new int2, 3; /*61UsingGUI.Dialog.cs (1/4)using Usi
29、ngGUI.Dialog.cs (2/4) public Dialog() InitializeComponent(); private void button1_Click(object sender, EventArgs e) /* table0, 0 = Convert.ToInt32(textBox1.Text); table0, 1 = Convert.ToInt32(textBox2.Text); table0, 2 = Convert.ToInt32(textBox3.Text); table1, 0 = Convert.ToInt32(textBox4.Text); table
30、1, 1 = Convert.ToInt32(textBox5.Text); table1, 2 = Convert.ToInt32(textBox6.Text);62UsingGUI.Dialog.cs (2/4) pubUsingGUI.Dialog.cs (3/4)MessageBox.Show(table0, 0.ToString()+ t + table0, 1.ToString()+ t + table0, 2.ToString()+ n + table1, 0.ToString()+ t + table1, 1.ToString()+ t + table1, 2.ToString
31、()+ n); Dispose(); /* private void button2_Click(object sender, EventArgs e) /* Dispose(); /* 63UsingGUI.Dialog.cs (3/4)MessUsingGUI.Dialog.cs (4/4) /* public int, Content get return table; /* 64UsingGUI.Dialog.cs (4/4) /*UsingGUI.Output.cs (1/3)using System;using System.Collections.Generic;using Sy
32、stem.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace UsingGUI public partial class Output : Form public Output() InitializeComponent(); 65UsingGUI.Output.cs (1/3)using UsingGUI.Output.cs (2/3) private void Output_Load(object sender, EventA
33、rgs e) private void button1_Click(object sender, EventArgs e) /* Dispose(); /* /* public void DoComputation(Table t) int, table = t.Content; int rowSum = t.RowSum(); int colSum = t.ColSum(); int totalSum = t.TotalSum(); 66UsingGUI.Output.cs (2/3) priUsingGUI.Output.cs (3/3) label5.Text = table0, 0.T
34、oString(); label6.Text = table0, 1.ToString(); label7.Text = table0, 2.ToString(); label8.Text = rowSum0.ToString(); label9.Text = table1, 0.ToString(); label10.Text = table1, 1.ToString(); label11.Text = table1, 2.ToString(); label12.Text = rowSum1.ToString(); label13.Text = colSum0.ToString(); lab
35、el14.Text = colSum1.ToString(); label15.Text = colSum2.ToString(); label16.Text = totalSum.ToString(); /* 67UsingGUI.Output.cs (3/3) labeUsingGUI.Table.cs片段public int, Content get return data; set data = value; nRow = value.GetUpperBound(0) + 1; nCol = value.GetUpperBound(1) + 1; 68UsingGUI.Table.cs
36、片段public int綱要改寫主控臺程式為視窗程式加入圖形影像二十一點(diǎn)模擬程式0.1G版69綱要改寫主控臺程式為視窗程式71程式DisplayingCards畫面70程式DisplayingCards畫面72程式DisplayingCards注意事項(xiàng)檔案夾PlayingCards應(yīng)放在bin資料夾內(nèi),與Debug(偵錯(cuò)版)及Release(發(fā)行版)資料夾併行71程式DisplayingCards注意事項(xiàng)檔案夾PlayinDisplayingcCards.MainForm.Designer.cs (1/4)/*using System.Drawing;/*namespace Displayin
37、gCards partial class MainForm / / 設(shè)計(jì)工具所需的變數(shù)。 / private System.ComponentModel.IContainer components = null; /* private Image image; private Graphics graphics; private bool started = false; /*72DisplayingcCards.MainForm.DesDisplayingcCards.MainForm.Designer.cs (2/4) / / 清除任何使用中的資源。 / / 如果應(yīng)該處置 Managed
38、資源則為 true,否則為 false。 protected override void Dispose(bool disposing) if (disposing & (components != null) components.Dispose(); base.Dispose(disposing); 73DisplayingcCards.MainForm.DesDisplayingcCards.MainForm.Designer.cs (3/4) /* private void DisplayImage() int si = listBox1.SelectedIndex; string s
39、uit = s, h, d, c ; int i = listBox2.SelectedIndex + 1; string rank = i.ToString(); string fileName = .PlayingCards + suitsi + rank + .jpg; image = Image.FromFile(fileName); graphics = CreateGraphics(); graphics.DrawImage(image, 5, 5, 85, 150); 74DisplayingcCards.MainForm.DesDisplayingcCards.MainForm
40、.Designer.cs (4/4) protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) base.OnPaint(e); if (started) DisplayImage(); /* #region Windows Form 設(shè)計(jì)工具產(chǎn)生的程式碼 . . . . . . #endregion . . . . . . 75DisplayingcCards.MainForm.DesMainForm.cs (1/2)using System;using System.Collections.Generic;
41、using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace DisplayingCards public partial class MainForm : Form public MainForm() InitializeComponent(); 76MainForm.cs (1/2)using System;MainForm.cs (2/2) private void Mai
42、nForm_Load(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e) /* DisplayImage(); /* 77MainForm.cs (2/2) private v綱要改寫主控臺程式為視窗程式加入圖形影像二十一點(diǎn)模擬程式0.1G版78綱要改寫主控臺程式為視窗程式80BlackJack_0_1G 類別圖79BlackJack_0_1G 類別圖81互動設(shè)計(jì):Activity Diagram80互動設(shè)計(jì):Activity Diagram82Form Design莊家: 18
43、點(diǎn)玩家: 21 點(diǎn)要牌停開始清除81Form Design莊家: 18 點(diǎn)玩家: 21 點(diǎn)要牌停起始處理:Collaboration Diagram82起始處理:Collaboration Diagram84起始處理:Sequence Diagram83起始處理:Sequence Diagram85玩家要牌:Sequence Diagram84玩家要牌:Sequence Diagram86玩家停牌:Sequence Diagram85玩家停牌:Sequence Diagram87系統(tǒng)表單86系統(tǒng)表單88BlackJack_0_1G.MainForm.cs (1/11)using System;
44、using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace BlackJack_0_1G /* public struct PlayerInfo public string name; public Status status;87BlackJack_0_1G.MainForm.cs (1/BlackJack_0
45、_1G.MainForm.cs (2/11) public int totalPoints; public Card cards; public int nCards; /* public partial class MainForm : Form /* private Game game; private PlayerInfo playerInfo; private PlayerInfo dealerInfo; private Image image; private Graphics graphics; private bool inGame = false; /*88BlackJack_
46、0_1G.MainForm.cs (2/BlackJack_0_1G.MainForm.cs (3/11) public MainForm() InitializeComponent(); private void button1_Click(object sender, EventArgs e) /* game.ProcessPlayerRun(out playerInfo); ShowInfo(); CheckBlackJackOrBurst(playerInfo); CheckBlackJackOrBurst(dealerInfo); /* 89BlackJack_0_1G.MainFo
47、rm.cs (3/BlackJack_0_1G.MainForm.cs (4/11) /* private void ShowInfo() int i; string fileName; graphics = CreateGraphics(); for (i = 0; i playerInfo.nCards; +i) fileName = .PlayingCards + playerInfo.cardsi.Name() + .jpg; image = Image.FromFile(fileName); graphics.DrawImage(image, 5+100*i, 220, 85, 15
48、0); 90BlackJack_0_1G.MainForm.cs (4/BlackJack_0_1G.MainForm.cs (5/11) for (i = 0; i = playerInfo.totalPoints) MessageBox.Show(dealerI + 勝 + playerI); else MessageBox.Show(playerI + 勝 + dealerI); /* 94BlackJack_0_1G.MainForm.cs (8/BlackJack_0_1G.MainForm.cs (9/11) private void CheckBlackJackOrBurst(P
49、layerInfo info) if (info.status = Status.BLACK_JACK) MessageBox.Show(+ 二十一點(diǎn)); if (info.status = Status.BURST) MessageBox.Show( + 爆!); 95BlackJack_0_1G.MainForm.cs (9/BlackJack_0_1G.MainForm.cs (10/11) private void button4_Click(object sender, EventArgs e) /* / 清除按鈕 inGame = false; Invalidate(); labe
50、l1.Text = 0; label2.Text = 0; button4.Enabled = false; button3.Enabled = true; /* 96BlackJack_0_1G.MainForm.cs (10BlackJack_0_1G.MainForm.cs (11/11) /* protected override void OnPaint(PaintEventArgs e) base.OnPaint(e); if (inGame) ShowInfo(); /* 97BlackJack_0_1G.MainForm.cs (11BlackJack_0_1G.Game.cs
51、 (1/7)/* * 二十一點(diǎn)遊戲, for GUI version * 11/21/2008 */using System;namespace BlackJack_0_1G class Game const int N_PLAYERS = 2; Deck deck; Player players = new PlayerN_PLAYERS; public Game() 98BlackJack_0_1G.Game.cs (1/7)/*BlackJack_0_1G.Game.cs (2/7)players0 = new Player(Jeng); playersN_PLAYERS - 1 = n
52、ew Dealer(); deck = new Deck(); public void InitPlay(out PlayerInfo playerInfo, out PlayerInfo dealerInfo) int i; / 第一輪發(fā)牌 for (i = 0; i N_PLAYERS; +i) playersi.SaveACard(deck.DealACard(); 99BlackJack_0_1G.Game.cs (2/7)BlackJack_0_1G.Game.cs (3/7)/ 第二輪發(fā)牌 for (i = 0; i N_PLAYERS; +i) playersi.SaveACar
53、d(deck.DealACard(); playerI = players0.Name; playerInfo.status = players0.GetStatus(); playerInfo.totalPoints = players0.GetTotalPoints(); playerInfo.cards = players0.DumpCards(); playerInfo.nCards = players0.GetNCards();100BlackJack_0_1G.Game.cs (3/7)BlackJack_0_1G.Game.cs (4/7) dealerI = playersN_
54、PLAYERS - 1.Name; dealerInfo.status = playersN_PLAYERS - 1.GetStatus(); dealerInfo.totalPoints = playersN_PLAYERS - 1.GetTotalPoints(); dealerInfo.cards = playersN_PLAYERS - 1.DumpCards(); dealerInfo.nCards = playersN_PLAYERS - 1.GetNCards(); 101BlackJack_0_1G.Game.cs (4/7)BlackJack_0_1G.Game.cs (5/
55、7) public void ProcessPlayerRun(out PlayerInfo playerInfo) players0.SaveACard(deck.DealACard(); playerI = players0.Name; playerInfo.status = players0.GetStatus(); playerInfo.totalPoints = players0.GetTotalPoints(); playerInfo.cards = players0.DumpCards(); playerInfo.nCards = players0.GetNCards(); 102BlackJack_0_1G.Game.cs (5/7)BlackJack_0_1G.Game.cs (6/7) public void ProcessDealerRun(out PlayerInfo dealerInfo) while (playersN_PLAYERS - 1.WantOneMoreCard() playersN_PLAYERS - 1.SaveACard(deck
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024試用期接觸勞動合同范本
- 供應(yīng)合同-省級國家機(jī)關(guān)、事業(yè)單位和社會團(tuán)體計(jì)算機(jī)(或打印機(jī))協(xié)議供貨合同
- 廣東省七年級上學(xué)期語文期中考試試卷5套【附答案】
- 2024年車輛物流運(yùn)輸合同協(xié)議書
- 機(jī)械租賃合同模板集
- 展覽活動中的房產(chǎn)贈與合同
- 貨物倉儲出租協(xié)議
- 2024年詳細(xì)版租房協(xié)議書
- 手機(jī)銷售合同常見問題解答
- 2024版酒店經(jīng)營合作協(xié)議模板
- 人教版初中語文教材分析(課堂PPT)
- 護(hù)理核心制度督查表20179
- 紅色古色綠色文化教育活動策劃方案
- 《Monsters 怪獸》中英對照歌詞
- 《正交分解法》導(dǎo)學(xué)案
- 建筑材料知識點(diǎn)匯總
- 平面構(gòu)成作品欣賞
- 英語管道專業(yè)術(shù)語
- 社會工作畢業(yè)論文(優(yōu)秀范文8篇)
- 五篇500字左右的短劇劇本
- 新形勢下如何加強(qiáng)醫(yī)院新聞宣傳工作
評論
0/150
提交評論