="justify"> {. Exit ();
}
}
}
Лістинг 3 - MainSystem;System.Collections.Generic;System.ComponentModel;System.Data;System.Drawing;System.Linq;System.Text;System.Windows.Forms;tester
{partial class frmMain: Form
{c=new Type (); [] RandomIndex; [] Results; frmMain ()
{();. Text=«Тестується» + Type.FirstName + « » + Type.SecondName;. StartPosition=FormStartPosition.CenterScreen; ();. Visible=false;
} void Start ()
{. Visible=false;. Visible=false;. Image=pictureBox1.Image;. Image=pictureBox1.Image;. Image=pictureBox1.Image;. Text=«»;. Text =«»;. Text=«»;. Visible=false;. Checked=true;. Enabled=false;. Enabled=false;. Enabled=false;. ReadOnly=true;. ContentFile=Application.StartupPath + Type.ContentFile; (System.IO.File.Exists (Type.ContentFile) == false)
{. Show («Не знайдений файл із питаннями. n Програма буде закрита.»);
Application.Exit ();
}
{. Index=0;=c.Randomize (c.GetCount);=new int [c.GetCount]; ();
}
} void Checked (RadioButton r)
{(r.Checked == true) {r.Image=pictureBox2.Image; } {R.Image=pictureBox1.Image; }
} void radioButton1_CheckedChanged (object sender, EventArgs e)
{(radioButton1);
} void radioButton2_CheckedChanged (object sender, EventArgs e)
{(radioButton2);
} void radioButton3_CheckedChanged (object sender, EventArgs e)
{(radioButton3);
} void NextQuesion ()
{. ReadItem (RandomIndex [Type.Index]);. Text=c.Question;. Text=c.Answer_1;. Text=c.Answer_2;. Text=c.Answer_3; p>
} void Report ()
{h=Type.Index; [] r={radioButton4, radioButton1, radioButton2, radioButton3}; (int i=0; i
{if (r [i]. Checked == true) {Results [RandomIndex [h] - 1]=i; }}
} void button1_Click (object sender, EventArgs e)
{(Type.Index
{(); ();. Checked=true; Type.Index + +;
}
{f=new frmReport (Results);. ShowDialog ();. Exit ();
}
}
}
}
Лістинг 4 - ReportSystem;System.Collections.Generic;System.ComponentModel;System.Data;System.Drawing;System.Linq;System.Text;System.Windows.Forms;tester
{partial class frmReport: Form
{c=new Type (); [] a=new int [0]; frmReport (int [] ans)
{();=ans;. ReportDir=Application.StartupPath + « reports»; (System.IO.Directory.Exists (Type.ReportDir) == false)
{System.IO.Directory.CreateDirectory (Type.ReportDir); }. StartPosition=FormStartPosition.CenterScreen;. FormBorderStyle=FormBorderStyle.FixedDialog;. MinimizeBox=false;. Text=«Докладний звіт»;. Text="Закрити";. Text=«Тестувався» + Type.FirstName + « » + Type.SecondName;. Text="Всього питань:» + Ans.L...