资源简介
自动出题判分小程序,可以自动出题,显示答案,对结果进行判断正误,难易程度,快进慢退,对做题结果进行统计,适合初学者学习借鉴

代码片段和文件信息
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;
namespace automatic
{
public partial class frmMatic : Form
{
public frmMatic()
{
InitializeComponent();
}
int a b;
string op;
int result;
Random rnd = new Random();
private void frmMatic_Load(object sender EventArgs e)
{
label5.Text = “默认5s“;
label6.Text = ““;
matic();
}
double ccount;
private void btnOk_Click(object sender EventArgs e)
{
matic();
ccount++;
}
private void timer1_Tick(object sender EventArgs e)
{
if (chkBox1.Checked)
{
matic();
ccount++;
}
}
//出题
void matic()
{
a = rnd.Next(9) + 1;
b = rnd.Next(9) + 1;
op = “+“;
result = a + b;
if (radBtn2.Checked)
{
op = “+“;
a = rnd.Next(19) + 1;
b = rnd.Next(19) + 1;
result = a + b;
}
else if (radBtn3.Checked)
{
op = “*“;
result = a * b;
}
label1.Text = a.ToString();
label3.Text = b.ToString();
label2.Text = op;
textBox1.Text = ““;
textBox1.Enabled = true;
textBox1.Focus();
textBox1.Font = new Font(“宋体“ 30);
textBox1.BackColor = Color.White;
}
//难易程度判断
void level()
{
{
switch ((a + b) / 10)
{
case 0:
textBox1.Text = “☆“;
break;
case 1:
textBox1.Text = “☆☆“;
break;
default:
textBox1.Text = “☆☆☆“;
break;
}
}
}
double sumcoutcocountfalcount;
private void textBox1_KeyDown(object sender KeyEventArgs e)
{
string str = textBox1.Text.Trim();
if (e.KeyCode == Keys.Enter && str == ““)
{
MessageBox.Show(“请输入答案“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Warning);
}
if (e.KeyCode == Keys.Enter && str != ““)
{
double d = double.Parse(str);
if (d == result)
{
textBox1.BackColor = Color.SeaGreen;
textBox1.Font = new Font
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1374 2014-12-17 14:15 automatic\automatic\Properties\AssemblyInfo.cs
文件 5612 2014-12-17 14:15 automatic\automatic\Properties\Resources.resx
文件 2869 2014-12-17 14:15 automatic\automatic\Properties\Resources.Designer.cs
文件 249 2014-12-17 14:15 automatic\automatic\Properties\Settings.settings
文件 1095 2014-12-17 14:15 automatic\automatic\Properties\Settings.Designer.cs
文件 6214 2014-12-20 11:41 automatic\automatic\Form1.cs
文件 12690 2014-12-19 18:00 automatic\automatic\Form1.Designer.cs
文件 493 2014-12-17 14:33 automatic\automatic\Program.cs
文件 3718 2014-12-18 08:45 automatic\automatic\automatic.csproj
文件 490 2010-03-17 22:39 automatic\automatic\bin\Debug\automatic.vshost.exe.manifest
文件 11600 2014-12-20 11:30 automatic\automatic\bin\Debug\automatic.vshost.exe
文件 14848 2014-12-20 11:23 automatic\automatic\bin\Debug\automatic.exe
文件 30208 2014-12-20 11:23 automatic\automatic\bin\Debug\automatic.pdb
文件 6231 2014-12-20 11:23 automatic\automatic\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 180 2014-12-19 18:00 automatic\automatic\obj\x86\Debug\automatic.frmMatic.resources
文件 180 2014-12-18 08:45 automatic\automatic\obj\x86\Debug\automatic.Properties.Resources.resources
文件 196 2014-12-19 18:00 automatic\automatic\obj\x86\Debug\GenerateResource.read.1.tlog
文件 504 2014-12-19 18:00 automatic\automatic\obj\x86\Debug\GenerateResource.write.1.tlog
文件 30208 2014-12-20 11:23 automatic\automatic\obj\x86\Debug\automatic.pdb
文件 14848 2014-12-20 11:23 automatic\automatic\obj\x86\Debug\automatic.exe
文件 595 2014-12-20 11:30 automatic\automatic\obj\x86\Debug\automatic.csproj.FileListAbsolute.txt
文件 4440 2014-12-17 18:04 automatic\automatic\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7897 2014-12-17 18:08 automatic\automatic\obj\x86\Debug\ResolveAssemblyReference.cache
文件 6206 2014-12-19 18:00 automatic\automatic\Form1.resx
文件 1 2014-12-18 08:43 automatic\automatic\ClassDiagram1.cd
文件 869 2014-12-17 14:15 automatic\automatic.sln
..A..H. 18432 2014-12-20 11:41 automatic\automatic.suo
文件 230 2014-12-20 11:40 automatic\算术练习说明.txt
目录 0 2014-12-17 14:15 automatic\automatic\obj\x86\Debug\TempPE
目录 0 2014-12-17 14:15 automatic\automatic\obj\x86\Debug
............此处省略10个文件信息
- 上一篇:C#实现的 路由 距离矢量算法
- 下一篇:C# 西门子PLC ppi通讯程序
相关资源
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- 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#自定义控件
评论
共有 条评论