• 大小: 58KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-12
  • 语言: 其他
  • 标签: 自动出题  选择  

资源简介

界面程序,自动出题,选择答案,问题答案默认为A,会自动计分,题库较小,可以自己再添加

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;


namespace ProblemTest
{
    class CPromble
    {
        EProblem myadd =new EProblem();
        public List ReadProblem()
        {
            string sPath = Application.StartupPath + “\\Problem.txt“;
            FileStream fs = new FileStream(sPath FileMode.Open);
            StreamReader sr = new StreamReader(fs);
            List lstProblem=new List();
            string sTmpContext = null;

            while ((sTmpContext = sr.ReadLine()) != null)
            {
                string[] splits;
                splits = sTmpContext.Split(‘=‘);
                if (splits[0].ToString().Trim() == “problem“)
                {
                    myadd.INum = Convert.ToInt32(splits[1].ToString().Trim());
                    myadd.Problem = splits[2];
                    continue;
                }
                if (splits[0].ToString().Trim() == “answer“)
                {
                    myadd.Answer_A = splits[1];
                    myadd.Answer_B = splits[2];
                    myadd.Answer_C = splits[3];
                    myadd.Answer_D = splits[4];
                    myadd.Answer = splits[5];
                }
                lstProblem.Add(myadd);
                myadd = new EProblem();
            }
            return lstProblem;
        }

    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        821  2012-06-18 23:42  ProblemTest\ProblemTest\bin\Debug\Problem.txt

     文件      14848  2012-07-31 10:29  ProblemTest\ProblemTest\bin\Debug\ProblemTest.exe

     文件      48640  2012-07-31 10:29  ProblemTest\ProblemTest\bin\Debug\ProblemTest.pdb

     文件      11600  2012-07-31 10:29  ProblemTest\ProblemTest\bin\Debug\ProblemTest.vshost.exe

     文件        490  2009-08-31 00:40  ProblemTest\ProblemTest\bin\Debug\ProblemTest.vshost.exe.manifest

     文件       1500  2012-06-20 00:03  ProblemTest\ProblemTest\CPromble.cs

     文件       1357  2012-06-18 21:51  ProblemTest\ProblemTest\EProblem.cs

     文件       3483  2012-06-20 00:03  ProblemTest\ProblemTest\Form1.cs

     文件       9405  2012-06-18 22:43  ProblemTest\ProblemTest\Form1.Designer.cs

     文件       5817  2012-06-18 22:27  ProblemTest\ProblemTest\Form1.resx

     文件        506  2012-06-18 17:29  ProblemTest\ProblemTest\Form2.cs

     文件       2041  2012-06-18 16:25  ProblemTest\ProblemTest\Form2.Designer.cs

     文件       5817  2012-06-18 16:25  ProblemTest\ProblemTest\Form2.resx

     文件       4440  2012-06-19 08:20  ProblemTest\ProblemTest\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6274  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        770  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\GenerateResource.read.1.tlog

     文件       1898  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\GenerateResource.write.1.tlog

     文件       1758  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\ProblemTest.csproj.FileListAbsolute.txt

     文件      14848  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\ProblemTest.exe

     文件        180  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\ProblemTest.Form2.resources

     文件        180  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\ProblemTest.MainForm1.resources

     文件      48640  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\ProblemTest.pdb

     文件        180  2012-07-31 10:29  ProblemTest\ProblemTest\obj\x86\Debug\ProblemTest.Properties.Resources.resources

     文件       7897  2012-06-19 08:20  ProblemTest\ProblemTest\obj\x86\Debug\ResolveAssemblyReference.cache

     文件       4063  2012-06-18 17:29  ProblemTest\ProblemTest\ProblemTest.csproj

     文件        496  2012-06-18 16:21  ProblemTest\ProblemTest\Program.cs

     文件       1354  2012-06-18 16:16  ProblemTest\ProblemTest\Properties\AssemblyInfo.cs

     文件       2872  2012-06-18 16:16  ProblemTest\ProblemTest\Properties\Resources.Designer.cs

     文件       5612  2012-06-18 16:16  ProblemTest\ProblemTest\Properties\Resources.resx

     文件       1096  2012-06-18 16:16  ProblemTest\ProblemTest\Properties\Settings.Designer.cs

............此处省略16个文件信息

评论

共有 条评论