資源簡(jiǎn)介
(1)屏幕上有爸爸媽媽?zhuān)瑑鹤优畠核膫€(gè)人,中間有一個(gè)盤(pán)子,容量為二。爸爸媽媽負(fù)責(zé)
放水果,兒子女兒負(fù)責(zé)吃水果;
(2)右邊有一個(gè)顯示框,依次顯示此時(shí)正在進(jìn)行的動(dòng)作,如“爸爸放了一個(gè)水果”、“兒子吃了一個(gè)水果”等;
(3)運(yùn)用多線(xiàn)程編寫(xiě)程序,不能把過(guò)程寫(xiě)死了,每次運(yùn)行程序都有多種可能(左邊界面有動(dòng)作的同時(shí),右邊界面文字顯示此時(shí)的動(dòng)作)。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?水果增減_多線(xiàn)程_.Properties;
namespace?水果增減_多線(xiàn)程_
{
????public?class?Fruit
????{
????????//Random?random?=?new?Random();
????????public?static?Image[]?imgs?=?new?Image[]?{?
????????????Resources.餐盤(pán)_已去底_
????????????Resources.蘋(píng)果_已去底_
????????????Resources.梨子_已去底_
????????};
????????//餐盤(pán)的Draw方法
????????public?void?PlateDraw(Graphics?g)
????????{
????????????g.DrawImage(imgs[0]?325?325);
????????}
????????//蘋(píng)果的Draw方法
????????public?void?AppleDraw(Graphics?g?int?i)
????????{
????????????switch?(i)
????????????{
????????????????case?0:
????????????????????break;
????????????????case?1:
????????????????????g.DrawImage(imgs[1]?375?375);
????????????????????break;
????????????????case?2:
????????????????????g.DrawImage(imgs[1]?375?375);
????????????????????g.DrawImage(imgs[1]?425?375);
????????????????????break;
????????????}
????????????
????????}
????????//梨子的Drwa方法
????????public?void?PeerDraw(Graphics?gint?i)
????????{
????????????switch?(i)
????????????{
????????????????case?0:
????????????????????break;
????????????????case?1:
????????????????????g.DrawImage(imgs[2]?375?425);
????????????????????break;
????????????????case?2:
????????????????????g.DrawImage(imgs[2]?375?425);
????????????????????g.DrawImage(imgs[1]?425?425);
????????????????????break;
????????????}
????????}
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件?????????189??2020-10-05?08:20??App.config
?????目錄???????????0??2020-10-05?08:20??bin\
?????目錄???????????0??2020-10-05?09:19??bin\Debug\
?????文件?????1232896??2020-10-12?20:52??bin\Debug\水果增減(多線(xiàn)程).exe
?????文件?????????189??2020-10-05?08:20??bin\Debug\水果增減(多線(xiàn)程).exe.config
?????文件???????54784??2020-10-12?20:52??bin\Debug\水果增減(多線(xiàn)程).pdb
?????目錄???????????0??2020-10-05?08:20??bin\Release\
?????文件????????1607??2020-10-12?20:37??Fruit.cs
?????文件????????6175??2020-10-12?20:52??FruitForm.cs
?????文件????????3441??2020-10-12?20:49??FruitForm.Designer.cs
?????文件????????6016??2020-10-12?20:49??FruitForm.resx
?????目錄???????????0??2020-10-05?08:20??obj\
?????目錄???????????0??2020-10-12?20:49??obj\Debug\
?????文件?????????214??2020-10-05?08:20??obj\Debug\.NETfr
?????文件????????1597??2020-10-12?20:02??obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件????????8817??2020-10-12?20:08??obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????目錄???????????0??2020-10-05?15:34??obj\Debug\TempPE\
?????文件????????4608??2020-10-12?20:08??obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件?????????180??2020-10-12?20:49??obj\Debug\水果增減_多線(xiàn)程_.FruitForm.resources
?????文件?????1217859??2020-10-12?20:08??obj\Debug\水果增減_多線(xiàn)程_.Properties.Resources.resources
?????文件??????????42??2020-10-05?19:15??obj\Debug\水果增減(多線(xiàn)程).csproj.CoreCompileInputs.cache
?????文件????????1321??2020-10-12?20:19??obj\Debug\水果增減(多線(xiàn)程).csproj.FileListAbsolute.txt
?????文件????????1404??2020-10-12?20:49??obj\Debug\水果增減(多線(xiàn)程).csproj.GenerateResource.cache
?????文件?????????424??2020-10-12?19:56??obj\Debug\水果增減(多線(xiàn)程).csprojAssemblyReference.cache
?????文件?????1232896??2020-10-12?20:52??obj\Debug\水果增減(多線(xiàn)程).exe
?????文件???????54784??2020-10-12?20:52??obj\Debug\水果增減(多線(xiàn)程).pdb
?????文件????????4398??2020-10-12?20:14??Person.cs
?????文件?????????539??2020-10-05?09:18??Program.cs
?????目錄???????????0??2020-10-12?20:08??Properties\
?????文件????????1346??2020-10-05?08:20??Properties\AssemblyInfo.cs
?????文件????????5987??2020-10-12?20:08??Properties\Resources.Designer.cs
............此處省略19個(gè)文件信息
評(píng)論
共有 條評(píng)論