├── .gitattributes
├── .gitignore
├── GluttonousSnakeWPF.sln
├── GluttonousSnakeWPF
├── App.config
├── App.xaml
├── App.xaml.cs
├── GluttonousSnakeWPF.csproj
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Resources
│ ├── Go.png
│ ├── again.png
│ ├── begingame.png
│ ├── body.png
│ ├── brick.png
│ ├── chi.png
│ ├── gameover.png
│ ├── head.png
│ ├── home.png
│ ├── initpintu.png
│ ├── initpintu1.png
│ ├── jingdian.png
│ ├── kback.png
│ ├── mback.png
│ ├── moshi.png
│ ├── order.png
│ ├── pattern.png
│ ├── pause.png
│ ├── pause1.png
│ ├── rank.png
│ ├── runback.png
│ ├── title.png
│ ├── wujin.png
│ ├── xuanwo.png
│ └── zhuan.png
├── rank.data
├── 场景
│ ├── CGameChooseScene.cs
│ ├── CGameOverScene.cs
│ ├── CGameRankScene.cs
│ ├── CGameRunScene.cs
│ └── CGameStartScene.cs
└── 工具
│ ├── CCustomImage.cs
│ ├── CScene.cs
│ ├── CSceneManager.cs
│ └── CUtil.cs
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | [Rr]eleases/
21 | x64/
22 | x86/
23 | bld/
24 | [Bb]in/
25 | [Oo]bj/
26 | [Ll]og/
27 |
28 | # Visual Studio 2015/2017 cache/options directory
29 | .vs/
30 | # Uncomment if you have tasks that create the project's static files in wwwroot
31 | #wwwroot/
32 |
33 | # Visual Studio 2017 auto generated files
34 | Generated\ Files/
35 |
36 | # MSTest test Results
37 | [Tt]est[Rr]esult*/
38 | [Bb]uild[Ll]og.*
39 |
40 | # NUNIT
41 | *.VisualState.xml
42 | TestResult.xml
43 |
44 | # Build Results of an ATL Project
45 | [Dd]ebugPS/
46 | [Rr]eleasePS/
47 | dlldata.c
48 |
49 | # Benchmark Results
50 | BenchmarkDotNet.Artifacts/
51 |
52 | # .NET Core
53 | project.lock.json
54 | project.fragment.lock.json
55 | artifacts/
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_h.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *_wpftmp.csproj
81 | *.log
82 | *.vspscc
83 | *.vssscc
84 | .builds
85 | *.pidb
86 | *.svclog
87 | *.scc
88 |
89 | # Chutzpah Test files
90 | _Chutzpah*
91 |
92 | # Visual C++ cache files
93 | ipch/
94 | *.aps
95 | *.ncb
96 | *.opendb
97 | *.opensdf
98 | *.sdf
99 | *.cachefile
100 | *.VC.db
101 | *.VC.VC.opendb
102 |
103 | # Visual Studio profiler
104 | *.psess
105 | *.vsp
106 | *.vspx
107 | *.sap
108 |
109 | # Visual Studio Trace Files
110 | *.e2e
111 |
112 | # TFS 2012 Local Workspace
113 | $tf/
114 |
115 | # Guidance Automation Toolkit
116 | *.gpState
117 |
118 | # ReSharper is a .NET coding add-in
119 | _ReSharper*/
120 | *.[Rr]e[Ss]harper
121 | *.DotSettings.user
122 |
123 | # JustCode is a .NET coding add-in
124 | .JustCode
125 |
126 | # TeamCity is a build add-in
127 | _TeamCity*
128 |
129 | # DotCover is a Code Coverage Tool
130 | *.dotCover
131 |
132 | # AxoCover is a Code Coverage Tool
133 | .axoCover/*
134 | !.axoCover/settings.json
135 |
136 | # Visual Studio code coverage results
137 | *.coverage
138 | *.coveragexml
139 |
140 | # NCrunch
141 | _NCrunch_*
142 | .*crunch*.local.xml
143 | nCrunchTemp_*
144 |
145 | # MightyMoose
146 | *.mm.*
147 | AutoTest.Net/
148 |
149 | # Web workbench (sass)
150 | .sass-cache/
151 |
152 | # Installshield output folder
153 | [Ee]xpress/
154 |
155 | # DocProject is a documentation generator add-in
156 | DocProject/buildhelp/
157 | DocProject/Help/*.HxT
158 | DocProject/Help/*.HxC
159 | DocProject/Help/*.hhc
160 | DocProject/Help/*.hhk
161 | DocProject/Help/*.hhp
162 | DocProject/Help/Html2
163 | DocProject/Help/html
164 |
165 | # Click-Once directory
166 | publish/
167 |
168 | # Publish Web Output
169 | *.[Pp]ublish.xml
170 | *.azurePubxml
171 | # Note: Comment the next line if you want to checkin your web deploy settings,
172 | # but database connection strings (with potential passwords) will be unencrypted
173 | *.pubxml
174 | *.publishproj
175 |
176 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
177 | # checkin your Azure Web App publish settings, but sensitive information contained
178 | # in these scripts will be unencrypted
179 | PublishScripts/
180 |
181 | # NuGet Packages
182 | *.nupkg
183 | # The packages folder can be ignored because of Package Restore
184 | **/[Pp]ackages/*
185 | # except build/, which is used as an MSBuild target.
186 | !**/[Pp]ackages/build/
187 | # Uncomment if necessary however generally it will be regenerated when needed
188 | #!**/[Pp]ackages/repositories.config
189 | # NuGet v3's project.json files produces more ignorable files
190 | *.nuget.props
191 | *.nuget.targets
192 |
193 | # Microsoft Azure Build Output
194 | csx/
195 | *.build.csdef
196 |
197 | # Microsoft Azure Emulator
198 | ecf/
199 | rcf/
200 |
201 | # Windows Store app package directories and files
202 | AppPackages/
203 | BundleArtifacts/
204 | Package.StoreAssociation.xml
205 | _pkginfo.txt
206 | *.appx
207 |
208 | # Visual Studio cache files
209 | # files ending in .cache can be ignored
210 | *.[Cc]ache
211 | # but keep track of directories ending in .cache
212 | !*.[Cc]ache/
213 |
214 | # Others
215 | ClientBin/
216 | ~$*
217 | *~
218 | *.dbmdl
219 | *.dbproj.schemaview
220 | *.jfm
221 | *.pfx
222 | *.publishsettings
223 | orleans.codegen.cs
224 |
225 | # Including strong name files can present a security risk
226 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
227 | #*.snk
228 |
229 | # Since there are multiple workflows, uncomment next line to ignore bower_components
230 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
231 | #bower_components/
232 |
233 | # RIA/Silverlight projects
234 | Generated_Code/
235 |
236 | # Backup & report files from converting an old project file
237 | # to a newer Visual Studio version. Backup files are not needed,
238 | # because we have git ;-)
239 | _UpgradeReport_Files/
240 | Backup*/
241 | UpgradeLog*.XML
242 | UpgradeLog*.htm
243 | ServiceFabricBackup/
244 | *.rptproj.bak
245 |
246 | # SQL Server files
247 | *.mdf
248 | *.ldf
249 | *.ndf
250 |
251 | # Business Intelligence projects
252 | *.rdl.data
253 | *.bim.layout
254 | *.bim_*.settings
255 | *.rptproj.rsuser
256 |
257 | # Microsoft Fakes
258 | FakesAssemblies/
259 |
260 | # GhostDoc plugin setting file
261 | *.GhostDoc.xml
262 |
263 | # Node.js Tools for Visual Studio
264 | .ntvs_analysis.dat
265 | node_modules/
266 |
267 | # Visual Studio 6 build log
268 | *.plg
269 |
270 | # Visual Studio 6 workspace options file
271 | *.opt
272 |
273 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
274 | *.vbw
275 |
276 | # Visual Studio LightSwitch build output
277 | **/*.HTMLClient/GeneratedArtifacts
278 | **/*.DesktopClient/GeneratedArtifacts
279 | **/*.DesktopClient/ModelManifest.xml
280 | **/*.Server/GeneratedArtifacts
281 | **/*.Server/ModelManifest.xml
282 | _Pvt_Extensions
283 |
284 | # Paket dependency manager
285 | .paket/paket.exe
286 | paket-files/
287 |
288 | # FAKE - F# Make
289 | .fake/
290 |
291 | # JetBrains Rider
292 | .idea/
293 | *.sln.iml
294 |
295 | # CodeRush personal settings
296 | .cr/personal
297 |
298 | # Python Tools for Visual Studio (PTVS)
299 | __pycache__/
300 | *.pyc
301 |
302 | # Cake - Uncomment if you are using it
303 | # tools/**
304 | # !tools/packages.config
305 |
306 | # Tabs Studio
307 | *.tss
308 |
309 | # Telerik's JustMock configuration file
310 | *.jmconfig
311 |
312 | # BizTalk build output
313 | *.btp.cs
314 | *.btm.cs
315 | *.odx.cs
316 | *.xsd.cs
317 |
318 | # OpenCover UI analysis results
319 | OpenCover/
320 |
321 | # Azure Stream Analytics local run output
322 | ASALocalRun/
323 |
324 | # MSBuild Binary and Structured Log
325 | *.binlog
326 |
327 | # NVidia Nsight GPU debugger configuration file
328 | *.nvuser
329 |
330 | # MFractors (Xamarin productivity tool) working folder
331 | .mfractor/
332 |
333 | # Local History for Visual Studio
334 | .localhistory/
335 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.489
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GluttonousSnakeWPF", "GluttonousSnakeWPF\GluttonousSnakeWPF.csproj", "{F1CECC00-4788-4EAF-AAC7-16A0BD0B4D73}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {F1CECC00-4788-4EAF-AAC7-16A0BD0B4D73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {F1CECC00-4788-4EAF-AAC7-16A0BD0B4D73}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {F1CECC00-4788-4EAF-AAC7-16A0BD0B4D73}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {F1CECC00-4788-4EAF-AAC7-16A0BD0B4D73}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {C2C9C01B-B136-4A09-9FDA-5CF4B9DBAB18}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace GluttonousSnakeWPF
10 | {
11 | ///
12 | /// App.xaml 的交互逻辑
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/GluttonousSnakeWPF.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {F1CECC00-4788-4EAF-AAC7-16A0BD0B4D73}
8 | WinExe
9 | GluttonousSnakeWPF
10 | GluttonousSnakeWPF
11 | v4.6.1
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 | true
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 4.0
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | MSBuild:Compile
57 | Designer
58 |
59 |
60 |
61 | True
62 | True
63 | Resources.resx
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | MSBuild:Compile
75 | Designer
76 |
77 |
78 | App.xaml
79 | Code
80 |
81 |
82 | MainWindow.xaml
83 | Code
84 |
85 |
86 |
87 |
88 | Code
89 |
90 |
91 | True
92 | Settings.settings
93 | True
94 |
95 |
96 | ResXFileCodeGenerator
97 | Resources.Designer.cs
98 |
99 |
100 | SettingsSingleFileGenerator
101 | Settings.Designer.cs
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Timers;
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.Windows.Data;
10 | using System.Windows.Documents;
11 | using System.Windows.Input;
12 | using System.Windows.Media;
13 | using System.Windows.Media.Imaging;
14 | using System.Windows.Navigation;
15 | using System.Windows.Shapes;
16 |
17 | namespace GluttonousSnakeWPF
18 | {
19 | ///
20 | /// MainWindow.xaml 的交互逻辑
21 | ///
22 | public partial class MainWindow : Window
23 | {
24 | //计时器
25 | public static Timer timer;
26 | //场景管理器
27 | public static CSceneManager SceneManager = new CSceneManager();
28 | public static bool On = true;
29 | public MainWindow()
30 | {
31 | InitializeComponent();
32 | //初始化主面板画布
33 | CUtil.mainCanvas = _Canvas;
34 | //初始化计时器
35 | timer = new Timer();
36 | //设置定时器调用时间间隔
37 | timer.Interval = 16;
38 | timer.Enabled = true;
39 | //委托
40 | timer.Elapsed += Updata;
41 | //加载场景
42 | SceneManager.LoadScene("开始场景", new CGameStartScene());
43 | SceneManager.LoadScene("选择场景", new CGameChooseScene());
44 | SceneManager.LoadScene("榜单场景", new CGameRankScene());
45 | SceneManager.LoadScene("游戏场景", new CGameRunScene());
46 | SceneManager.LoadScene("结束场景", new CGameOverScene());
47 | //设置初次运行场景
48 | SceneManager.SetInitScene("开始场景");
49 |
50 | }
51 | public void Updata(object sender, ElapsedEventArgs e)
52 | {
53 | if (On)
54 | {
55 | timer.Interval = 16;
56 | }
57 | else
58 | {
59 | timer.Interval = 500;
60 | }
61 | this.Dispatcher.Invoke
62 | (
63 | new Action
64 | (
65 | delegate
66 | {
67 | //场景显示状态
68 | if (SceneManager.m_CurScene.GetState() == 1)
69 | SceneManager.m_CurScene.Show();
70 | //当前场景为空 return
71 | if (SceneManager.m_CurScene == null)
72 | return;
73 | else
74 | //当前场景运行
75 | SceneManager.m_CurScene.Run();
76 | //是否需要切换场景
77 | if (SceneManager.m_NextScene != null)
78 | {
79 | //执行当前场景结束函数
80 | SceneManager.m_CurScene.End();
81 | //当前场景显示状态
82 | if (SceneManager.m_CurScene.GetState() == -1)
83 | SceneManager.m_CurScene.Hide();
84 | //执行切换场景初始化
85 | SceneManager.m_NextScene.Init();
86 | //当前场景改为要切换的场景
87 | SceneManager.m_CurScene = SceneManager.m_NextScene;
88 | //重置切换场景为空
89 | SceneManager.m_NextScene = null;
90 | }
91 | }
92 | )
93 | );
94 | }
95 |
96 | public void Window_KeyDown(object sender, KeyEventArgs e)
97 | {
98 | if (SceneManager.m_CurScene is CGameRunScene)
99 | {
100 | (SceneManager.m_CurScene as CGameRunScene).CheckKey(e.Key);
101 | }
102 | }
103 |
104 | private void Window_KeyUp(object sender, KeyEventArgs e)
105 | {
106 | if (SceneManager.m_CurScene is CGameRunScene)
107 | {
108 | if (On)
109 | (SceneManager.m_CurScene as CGameRunScene).KeyUp(e.Key);
110 | }
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // 有关程序集的一般信息由以下
8 | // 控制。更改这些特性值可修改
9 | // 与程序集关联的信息。
10 | [assembly: AssemblyTitle("GluttonousSnakeWPF")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("HP Inc.")]
14 | [assembly: AssemblyProduct("GluttonousSnakeWPF")]
15 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2019")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // 将 ComVisible 设置为 false 会使此程序集中的类型
20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
21 | //请将此类型的 ComVisible 特性设置为 true。
22 | [assembly: ComVisible(false)]
23 |
24 | //若要开始生成可本地化的应用程序,请设置
25 | //.csproj 文件中的 CultureYouAreCodingWith
26 | //例如,如果您在源文件中使用的是美国英语,
27 | //使用的是美国英语,请将 设置为 en-US。 然后取消
28 | //对以下 NeutralResourceLanguage 特性的注释。 更新
29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
36 | //(未在页面中找到资源时使用,
37 | //或应用程序资源字典中找到时使用)
38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
39 | //(未在页面中找到资源时使用,
40 | //、应用程序或任何主题专用资源字典中找到时使用)
41 | )]
42 |
43 |
44 | // 程序集的版本信息由下列四个值组成:
45 | //
46 | // 主版本
47 | // 次版本
48 | // 生成号
49 | // 修订号
50 | //
51 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
52 | // 方法是按如下所示使用“*”: :
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace GluttonousSnakeWPF.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GluttonousSnakeWPF.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 重写当前线程的 CurrentUICulture 属性
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
65 | ///
66 | internal static System.Drawing.Bitmap again {
67 | get {
68 | object obj = ResourceManager.GetObject("again", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
75 | ///
76 | internal static System.Drawing.Bitmap begingame {
77 | get {
78 | object obj = ResourceManager.GetObject("begingame", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
85 | ///
86 | internal static System.Drawing.Bitmap body {
87 | get {
88 | object obj = ResourceManager.GetObject("body", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
95 | ///
96 | internal static System.Drawing.Bitmap brick {
97 | get {
98 | object obj = ResourceManager.GetObject("brick", resourceCulture);
99 | return ((System.Drawing.Bitmap)(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
105 | ///
106 | internal static System.Drawing.Bitmap chi {
107 | get {
108 | object obj = ResourceManager.GetObject("chi", resourceCulture);
109 | return ((System.Drawing.Bitmap)(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
115 | ///
116 | internal static System.Drawing.Bitmap gameover {
117 | get {
118 | object obj = ResourceManager.GetObject("gameover", resourceCulture);
119 | return ((System.Drawing.Bitmap)(obj));
120 | }
121 | }
122 |
123 | ///
124 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
125 | ///
126 | internal static System.Drawing.Bitmap Go {
127 | get {
128 | object obj = ResourceManager.GetObject("Go", resourceCulture);
129 | return ((System.Drawing.Bitmap)(obj));
130 | }
131 | }
132 |
133 | ///
134 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
135 | ///
136 | internal static System.Drawing.Bitmap head {
137 | get {
138 | object obj = ResourceManager.GetObject("head", resourceCulture);
139 | return ((System.Drawing.Bitmap)(obj));
140 | }
141 | }
142 |
143 | ///
144 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
145 | ///
146 | internal static System.Drawing.Bitmap home {
147 | get {
148 | object obj = ResourceManager.GetObject("home", resourceCulture);
149 | return ((System.Drawing.Bitmap)(obj));
150 | }
151 | }
152 |
153 | ///
154 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
155 | ///
156 | internal static System.Drawing.Bitmap initpintu {
157 | get {
158 | object obj = ResourceManager.GetObject("initpintu", resourceCulture);
159 | return ((System.Drawing.Bitmap)(obj));
160 | }
161 | }
162 |
163 | ///
164 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
165 | ///
166 | internal static System.Drawing.Bitmap initpintu1 {
167 | get {
168 | object obj = ResourceManager.GetObject("initpintu1", resourceCulture);
169 | return ((System.Drawing.Bitmap)(obj));
170 | }
171 | }
172 |
173 | ///
174 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
175 | ///
176 | internal static System.Drawing.Bitmap jingdian {
177 | get {
178 | object obj = ResourceManager.GetObject("jingdian", resourceCulture);
179 | return ((System.Drawing.Bitmap)(obj));
180 | }
181 | }
182 |
183 | ///
184 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
185 | ///
186 | internal static System.Drawing.Bitmap kback {
187 | get {
188 | object obj = ResourceManager.GetObject("kback", resourceCulture);
189 | return ((System.Drawing.Bitmap)(obj));
190 | }
191 | }
192 |
193 | ///
194 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
195 | ///
196 | internal static System.Drawing.Bitmap mback {
197 | get {
198 | object obj = ResourceManager.GetObject("mback", resourceCulture);
199 | return ((System.Drawing.Bitmap)(obj));
200 | }
201 | }
202 |
203 | ///
204 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
205 | ///
206 | internal static System.Drawing.Bitmap order {
207 | get {
208 | object obj = ResourceManager.GetObject("order", resourceCulture);
209 | return ((System.Drawing.Bitmap)(obj));
210 | }
211 | }
212 |
213 | ///
214 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
215 | ///
216 | internal static System.Drawing.Bitmap pause {
217 | get {
218 | object obj = ResourceManager.GetObject("pause", resourceCulture);
219 | return ((System.Drawing.Bitmap)(obj));
220 | }
221 | }
222 |
223 | ///
224 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
225 | ///
226 | internal static System.Drawing.Bitmap pause1 {
227 | get {
228 | object obj = ResourceManager.GetObject("pause1", resourceCulture);
229 | return ((System.Drawing.Bitmap)(obj));
230 | }
231 | }
232 |
233 | ///
234 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
235 | ///
236 | internal static System.Drawing.Bitmap rank {
237 | get {
238 | object obj = ResourceManager.GetObject("rank", resourceCulture);
239 | return ((System.Drawing.Bitmap)(obj));
240 | }
241 | }
242 |
243 | ///
244 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
245 | ///
246 | internal static System.Drawing.Bitmap runback {
247 | get {
248 | object obj = ResourceManager.GetObject("runback", resourceCulture);
249 | return ((System.Drawing.Bitmap)(obj));
250 | }
251 | }
252 |
253 | ///
254 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
255 | ///
256 | internal static System.Drawing.Bitmap title {
257 | get {
258 | object obj = ResourceManager.GetObject("title", resourceCulture);
259 | return ((System.Drawing.Bitmap)(obj));
260 | }
261 | }
262 |
263 | ///
264 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
265 | ///
266 | internal static System.Drawing.Bitmap wujin {
267 | get {
268 | object obj = ResourceManager.GetObject("wujin", resourceCulture);
269 | return ((System.Drawing.Bitmap)(obj));
270 | }
271 | }
272 |
273 | ///
274 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
275 | ///
276 | internal static System.Drawing.Bitmap xuanwo {
277 | get {
278 | object obj = ResourceManager.GetObject("xuanwo", resourceCulture);
279 | return ((System.Drawing.Bitmap)(obj));
280 | }
281 | }
282 |
283 | ///
284 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
285 | ///
286 | internal static System.Drawing.Bitmap zhuan {
287 | get {
288 | object obj = ResourceManager.GetObject("zhuan", resourceCulture);
289 | return ((System.Drawing.Bitmap)(obj));
290 | }
291 | }
292 | }
293 | }
294 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\again.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\begingame.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\body.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\Resources\brick.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\Resources\chi.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\Resources\gameover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\Resources\Go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\Resources\head.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\Resources\home.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
149 | ..\Resources\initpintu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
150 |
151 |
152 | ..\Resources\initpintu1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
153 |
154 |
155 | ..\Resources\jingdian.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
156 |
157 |
158 | ..\Resources\kback.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
159 |
160 |
161 | ..\Resources\mback.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
162 |
163 |
164 | ..\Resources\order.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
165 |
166 |
167 | ..\Resources\pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
168 |
169 |
170 | ..\Resources\pause1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
171 |
172 |
173 | ..\Resources\rank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
174 |
175 |
176 | ..\Resources\runback.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
177 |
178 |
179 | ..\Resources\title.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
180 |
181 |
182 | ..\Resources\wujin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
183 |
184 |
185 | ..\Resources\xuanwo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
186 |
187 |
188 | ..\Resources\zhuan.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
189 |
190 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace GluttonousSnakeWPF.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/Go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/Go.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/again.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/again.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/begingame.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/begingame.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/body.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/body.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/brick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/brick.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/chi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/chi.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/gameover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/gameover.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/head.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/home.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/initpintu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/initpintu.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/initpintu1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/initpintu1.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/jingdian.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/jingdian.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/kback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/kback.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/mback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/mback.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/moshi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/moshi.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/order.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/pattern.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/pause.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/pause1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/pause1.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/rank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/rank.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/runback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/runback.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/title.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/wujin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/wujin.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/xuanwo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/xuanwo.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/Resources/zhuan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UnityMeow/WPFGluttonousSnake/cf3be64061721b703a9f942eb967f85f23203251/GluttonousSnakeWPF/Resources/zhuan.png
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/rank.data:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/场景/CGameChooseScene.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Input;
7 |
8 | namespace GluttonousSnakeWPF
9 | {
10 | class CGameChooseScene : CScene
11 | {
12 | //转圈圈
13 | CCustomImage pattern1;
14 | //吃吃吃
15 | CCustomImage pattern2;
16 | CCustomImage presen;
17 | //返回
18 | CCustomImage back;
19 | CCustomImage go;
20 | CCustomImage xuanwo;
21 | //背景
22 | CCustomImage background;
23 | int b;
24 | //初始化场景
25 | public override void Init()
26 | {
27 | b = 0;
28 | //初始化Image
29 | xuanwo = new CCustomImage(Properties.Resources.xuanwo, 100, 70);
30 | pattern1 = new CCustomImage(Properties.Resources.zhuan, 150, 150);
31 | pattern2 = new CCustomImage(Properties.Resources.chi, 150, 150);
32 | presen = new CCustomImage(Properties.Resources.wujin, 400, 100);
33 | back = new CCustomImage(Properties.Resources.mback, 170, 100);
34 | go = new CCustomImage(Properties.Resources.Go, 100, 100);
35 | background = new CCustomImage(Properties.Resources.initpintu1, 795, 415);
36 | pattern1.SetPos(150, 80);
37 | pattern2.SetPos(400, 80);
38 | presen.SetPos(150, 250);
39 | xuanwo.SetPos(250, 50);
40 | go.SetPos(520, 260);
41 | back.SetPos(-5, 0);
42 | background.SetPos(-5, 0);
43 | //设置场景状态
44 | m_SceneState = 1;
45 | pattern1.MouseDown += pattern1Run;
46 | pattern2.MouseDown += pattern2Run;
47 | go.MouseDown += goRun;
48 | back.MouseDown += backRun;
49 | }
50 | //间隔固定时间 执行一次该函数
51 | public void pattern1Run(object sender, MouseButtonEventArgs e)
52 | {
53 | pattern1.Dispatcher.Invoke
54 | (
55 | new Action
56 | (
57 | delegate
58 | {
59 | MainWindow.On = true;
60 | b = 1;
61 | }
62 | )
63 | );
64 | }
65 | //间隔固定时间 执行一次该函数
66 | public void pattern2Run(object sender, MouseButtonEventArgs e)
67 | {
68 | pattern2.Dispatcher.Invoke
69 | (
70 | new Action
71 | (
72 | delegate
73 | {
74 | MainWindow.On = false;
75 | b = 2;
76 | }
77 | )
78 | );
79 | }
80 | //间隔固定时间 执行一次该函数
81 | public void backRun(object sender, MouseButtonEventArgs e)
82 | {
83 | back.Dispatcher.Invoke
84 | (
85 | new Action
86 | (
87 | delegate
88 | {
89 | MainWindow.SceneManager.SetNextScene("开始场景");
90 | }
91 | )
92 | );
93 | }
94 | public void goRun(object sender, MouseButtonEventArgs e)
95 | {
96 | go.Dispatcher.Invoke
97 | (
98 | new Action
99 | (
100 | delegate
101 | {
102 | MainWindow.SceneManager.SetNextScene("游戏场景");
103 | }
104 | )
105 | );
106 | }
107 | public override void Run()
108 | {
109 | m_SceneState = 0;
110 | if (b == 1)
111 | {
112 | presen.SetPos(150, 250);
113 | presen.SetPic(Properties.Resources.wujin);
114 | xuanwo.SetPos(500, 50);
115 | go.SetPos(520, 260);
116 | }
117 | else if (b == 2)
118 | {
119 | presen.SetPos(150, 250);
120 | presen.SetPic(Properties.Resources.jingdian);
121 | xuanwo.SetPos(250, 50);
122 | go.SetPos(520, 260);
123 | }
124 | else
125 | {
126 | presen.SetPos(999, 999);
127 | go.SetPos(999, 999);
128 | }
129 |
130 | //MainWindow.SceneManager.SetNextScene("开始场景");
131 | }
132 | public override void End()
133 | {
134 | m_SceneState = -1;
135 | }
136 | //显示Image
137 | public override void Show()
138 | {
139 | CUtil.AddControlInCanvas(background);
140 | CUtil.AddControlInCanvas(pattern1);
141 | CUtil.AddControlInCanvas(pattern2);
142 | CUtil.AddControlInCanvas(back);
143 | CUtil.AddControlInCanvas(presen);
144 | CUtil.AddControlInCanvas(go);
145 | CUtil.AddControlInCanvas(xuanwo);
146 | }
147 | //隐藏Image
148 | public override void Hide()
149 | {
150 | CUtil.Clear();
151 | }
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/场景/CGameOverScene.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Controls;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 |
11 | namespace GluttonousSnakeWPF
12 | {
13 | class CGameOverScene : CScene
14 | {
15 | Label lable;
16 | CCustomImage again;
17 | CCustomImage home;
18 | string m_path;
19 | byte[] m_rdata;
20 | //初始化场景
21 | public override void Init()
22 | {
23 | lable = new Label();
24 | lable.Content = "Game Over";
25 | lable.Width = 250;
26 | lable.Height = 50;
27 | lable.FontSize = 35;
28 | lable.FontFamily = new FontFamily("Consolas");
29 | Canvas.SetLeft(lable,280);
30 | Canvas.SetTop(lable, 100);
31 | again = new CCustomImage(Properties.Resources.again, 130, 100);
32 | again.SetPos(550,250);
33 | home = new CCustomImage(Properties.Resources.home, 130, 100);
34 | home.SetPos(380, 245);
35 | m_SceneState = 1;
36 | again.MouseDown += againRun;
37 | home.MouseDown += homeRun;
38 |
39 | m_path = "..\\..\\rank.data";
40 | m_rdata = new byte[8];
41 | //安全检测
42 | if (!File.Exists(m_path))
43 | return;
44 | //打开文件
45 | FileStream stream = new FileStream(m_path, FileMode.OpenOrCreate);
46 | //移动指针位置
47 | stream.Seek(0, SeekOrigin.Begin);
48 | //读取文件信息
49 | stream.Read(m_rdata, 0, m_rdata.Length);
50 | //关闭文件
51 | stream.Close();
52 | int Score = CGameRunScene.fen / 5;
53 | if ((byte)Score >= m_rdata[m_rdata.Length - 1])
54 | {
55 | m_rdata[m_rdata.Length - 1] = (byte)Score;
56 | }
57 | for (int i = m_rdata.Length - 1; i > 0;)
58 | {
59 |
60 | if (m_rdata[i] > m_rdata[i - 1])
61 | {
62 | byte bTmp = m_rdata[i];
63 | m_rdata[i] = m_rdata[i - 1];
64 | m_rdata[i - 1] = bTmp;
65 | }
66 | i--;
67 | }
68 | FileStream stream1 = new FileStream(m_path, FileMode.OpenOrCreate);
69 | //移动指针位置
70 | stream1.Seek(0, SeekOrigin.Begin);
71 | //读取文件信息
72 | stream1.Write(m_rdata, 0, 8);
73 | //关闭文件
74 | stream1.Close();
75 | }
76 | //间隔固定时间 执行一次该函数
77 | public void againRun(object sender, MouseButtonEventArgs e)
78 | {
79 | again.Dispatcher.Invoke
80 | (
81 | new Action
82 | (
83 | delegate
84 | {
85 | MainWindow.SceneManager.SetNextScene("游戏场景");
86 | }
87 | )
88 | );
89 |
90 | }
91 | public void homeRun(object sender, MouseButtonEventArgs e)
92 | {
93 | again.Dispatcher.Invoke
94 | (
95 | new Action
96 | (
97 | delegate
98 | {
99 | MainWindow.SceneManager.SetNextScene("开始场景");
100 | }
101 | )
102 | );
103 |
104 | }
105 | public override void Run()
106 | {
107 | m_SceneState = 0;
108 | }
109 | public override void End()
110 | { }
111 | //显示Image
112 | public override void Show()
113 | {
114 | CUtil.AddControlInCanvas(lable);
115 | CUtil.AddControlInCanvas(again);
116 | CUtil.AddControlInCanvas(home);
117 | }
118 | //隐藏Image
119 | public override void Hide()
120 | {
121 | CUtil.Clear();
122 |
123 | }
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/GluttonousSnakeWPF/场景/CGameRankScene.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Controls;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 |
11 | namespace GluttonousSnakeWPF
12 | {
13 | class CGameRankScene : CScene
14 | {
15 | CCustomImage rank;
16 | CCustomImage background;
17 | CCustomImage back;
18 | Label R;
19 | List