资源简介
使用C#实现基本的打字游戏,功能比较齐全,有等级变换,字体设置,大招控制,连续打击个数等

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using 打字游戏;
using System.Runtime.InteropServices;
using System.IO;
using System.Media;
namespace WordGame
{
public partial class Form1 : Form
{
[DllImport(“SHELL32.dll“)]
public extern static int ShellExecute(IntPtr hwnd string lpOperation
string lpFile string lpParameters string lpDirectory int nShowCmd);
public enum ShowWindowCommands : int
{
SW_HIDE = 0
SW_SHOWNORMAL = 1
SW_NORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_MAX = 10
}
Hashtable _htlab = new Hashtable();
int _count = 0;
int _life = 10;
int hour;
int min;
int seconds;
DateTime nowTime;
FileStream fs = null;
SoundPlayer sp = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender EventArgs e)
{
//SetTime();
fs = new FileStream(“Windows XP 启动.wav“ FileMode.Open);
sp = new SoundPlayer(fs);
sp.PlayLooping();
fs.Close();
this.toolStripStatusLabel2.Text = DateTime.Now.ToString();
}
private void SetTime()
{
DateTime now_Time = DateTime.Now;
TimeSpan timeSpan = now_Time - nowTime;
hour = timeSpan.Hours;
min = timeSpan.Minutes;
seconds = timeSpan.Seconds;
this.toolStripStatusLabel2.Text = hour.ToString() + “:“ + min.ToString() + “:“ + seconds.ToString();
}
private void StartToolStripMenuItem_Click(object sender EventArgs e)
{
this.timerlab.Enabled = true;
this.timerrate.Enabled = true;
this.timerrate.Interval = 1;
this.timerlab.Interval = 1; //计时器计时
_count = 0;
_life = 10;
if (_htlab == null)
_htlab = new Hashtable();
}
private void StopToolStripMenuItem_Click(object sender EventArgs e)
{
this.timerlab.Enabled = false;
this.timerrate.Enabled = false;
}
private void EndToolStripMenuItem_Click_1(object sender EventArgs e)
{
fs = new FileStream(“Windows XP 关机.wav“ FileMode.Open);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 516096 2012-05-11 14:20 WordGame\bin\Debug\IrisSkin2.dll
文件 282608 2006-10-27 20:30 WordGame\bin\Debug\Windows XP 关机.wav
文件 424644 2006-10-27 20:30 WordGame\bin\Debug\Windows XP 启动.wav
文件 299008 2012-07-09 22:58 WordGame\bin\Debug\WordGame.exe
文件 34304 2012-07-09 22:58 WordGame\bin\Debug\WordGame.pdb
文件 14328 2012-07-09 22:09 WordGame\bin\Debug\WordGame.vshost.exe
文件 490 2009-06-11 05:14 WordGame\bin\Debug\WordGame.vshost.exe.manifest
文件 101422 2006-12-05 17:33 WordGame\bin\Debug\光标放在按钮上时.mp3
文件 3765999 2012-06-30 21:50 WordGame\bin\Debug\有点甜.mp3
文件 516096 2012-05-11 14:20 WordGame\bin\Release\IrisSkin2.dll
文件 297984 2011-12-30 08:31 WordGame\bin\Release\WordGame.exe
文件 32256 2011-12-30 08:31 WordGame\bin\Release\WordGame.pdb
文件 101422 2006-12-05 17:33 WordGame\bin\光标放在按钮上时.wav
文件 1399 2012-07-07 21:37 WordGame\ClassDiagram1.cd
文件 9726 2012-07-09 22:59 WordGame\Form1.cs
文件 17123 2012-07-09 22:53 WordGame\Form1.Designer.cs
文件 427200 2012-07-09 22:53 WordGame\Form1.resx
文件 415 2011-12-30 10:17 WordGame\help\help.txt
文件 290816 2008-11-11 00:16 WordGame\Interop.WMPLib.dll
文件 516096 2012-05-11 14:20 WordGame\IrisSkin2.dll
文件 1026 2012-07-09 22:16 WordGame\myRandom.cs
文件 69011 2012-07-08 19:23 WordGame\obj\Debug\ResolveAssemblyReference.cache
文件 2490 2011-12-30 08:28 WordGame\obj\Debug\WordGame.csproj.FileListAbsolute.txt
文件 847 2012-07-08 19:07 WordGame\obj\Debug\WordGame.csproj.GenerateResource.Cache
文件 298496 2012-07-08 22:02 WordGame\obj\Debug\WordGame.exe
文件 280252 2012-07-08 19:11 WordGame\obj\Debug\WordGame.Form1.resources
文件 34304 2012-07-08 22:02 WordGame\obj\Debug\WordGame.pdb
文件 180 2012-07-08 19:11 WordGame\obj\Debug\WordGame.Properties.Resources.resources
文件 90270 2012-07-09 22:10 WordGame\obj\Release\ResolveAssemblyReference.cache
文件 4608 2012-07-09 22:19 WordGame\obj\Release\TempPE\ResourceR.Designer.cs.dll
............此处省略70个文件信息
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论