грама варіантів використання
В
Додаток Б
Лістинг програми
using
{partial class Form1: Form
{string name, surname, fath, group; int UserScore, lev; int [] QuestDone = new int [50]; conStr = "Data Source =. SQLEXPRESS; AttachDbFilename = | DataDirectory | Test.mdf; Integrated Security = True; User Instance = True "; myAdapQ; myAdapV; QuestTable; VarTable; [] ques; wrightAn; type; discip; answer1; questCount = 0; Form1 ()
{();
} void виходToolStripMenuItem_Click (object sender, EventArgs e)
{();
} void данныеОСоздателеToolStripMenuItem_Click (object sender, EventArgs e)
{ab = new About ();. Show ();
} void руководствоToolStripMenuItem_Click (object sender, EventArgs e)
{HTS = new HelpTester ();. Show ();
} void руководствоПреподавателяToolStripMenuItem_Click (object sender, EventArgs e)
{HTC = new HelpTeacher ();. Show ();
} void редакторТестовToolStripMenuItem_Click (object sender, EventArgs e)
{log = new Login ();. Show ();
} void tabPage1_Click (object sender, EventArgs e)
{
} void button1_Click (object sender, EventArgs e)
{= textBox1.Text;. Text = textBox1.Text; = textBox2.Text;. Text = textBox2.Text; = textBox3.Text;. Text = textBox3.Text; = textBox10.Text; . Text = textBox10.Text; = textBox11.Text;. Text = textBox11.Text; = int.Parse (textBox12.Text);. Text = textBox12.Text; = 0; sql = string.Format ("Select * From Question Where Discipline = '{0}' ", discip); = new SqlDataAdapter (sql, conStr); myDSQ = new DataSet (" Question ");. Fill (myDSQ," Question "); = myDSQ.Tables ["Question"]; = new SqlDataAdapter ("Select * From Variants", conStr); myDSV = new DataSet ("Variants");. Fill (myDSV, "Variants"); = myDSV.Tables [" ; Variants "];
// Починаємо Тест (discip, lev);
} void BeginTest (string disc, int Tlev)
{find = false; filter = string.Format ("Discipline = '{0}'", disc); = QuestTable.Select (filter); (ques.Length == 0)
{. Show ("Питання по даной тематиці відсутні.", "Увага.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
{(questCount == 0)
{(int j = 0; j
{q = ques [j]; lv = int.Parse (q ["Level"]. ToString ()); (lv == Tlev)
{+ +;
}
}
}
// Перебираються всі питання по даной дисципліні...