Вы находитесь на странице: 1из 24

==============form1.cs====================== 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 WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Equals("") || textBox2.Text.Equals("") || comboBox 1.Text.Equals("") || comboBox2.Text.Equals("")) { MessageBox.Show("veuillez remplir tout les champs ", "Erreur", M essageBoxButtons.OK, MessageBoxIcon.Warning); } else { Form2 f2 = new Form2(comboBox1.Text,textBox1.Text,textBox2.Text, comboBox2.Text); this.Hide(); f2.ShowDialog(); } } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { comboBox1.Text = ""; comboBox2.Text = ""; textBox1.Text = ""; textBox2.Text = ""; } private void button3_Click(object sender, EventArgs e) { Environment.Exit(0);

} } ==========================================form1.designer.cs==== namespace WindowsFormsApplication1 { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed ; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.label3 = new System.Windows.Forms.Label(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label4 = new System.Windows.Forms.Label(); this.comboBox2 = new System.Windows.Forms.ComboBox(); this.button3 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.F

ontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label1.Location = new System.Drawing.Point(48, 73); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(43, 15); this.label1.TabIndex = 0; this.label1.Text = "NOM:"; // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.F ontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label2.Location = new System.Drawing.Point(23, 99); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(75, 15); this.label2.TabIndex = 1; this.label2.Text = "PRENOM :"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(129, 68); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(101, 20); this.textBox1.TabIndex = 2; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(129, 94); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(101, 20); this.textBox2.TabIndex = 3; // // button1 // this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byt e)(0))); this.button1.Location = new System.Drawing.Point(33, 173); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 28); this.button1.TabIndex = 4; this.button1.Text = "Valider"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byt e)(0))); this.button2.Location = new System.Drawing.Point(129, 174); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(72, 27); this.button2.TabIndex = 5; this.button2.Text = "Annuler"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click);

// // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.F ontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label3.Location = new System.Drawing.Point(25, 48); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(72, 15); this.label3.TabIndex = 6; this.label3.Text = "EXAMEN :"; // // comboBox1 // this.comboBox1.FormattingEnabled = true; this.comboBox1.Items.AddRange(new object[] { "culture"}); this.comboBox1.Location = new System.Drawing.Point(129, 42); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(101, 21); this.comboBox1.TabIndex = 7; this.comboBox1.Text = "culture"; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this. comboBox1_SelectedIndexChanged); // // label4 // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.F ontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label4.Location = new System.Drawing.Point(30, 121); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(64, 15); this.label4.TabIndex = 8; this.label4.Text = "NIVEAU :"; // // comboBox2 // this.comboBox2.FormattingEnabled = true; this.comboBox2.Items.AddRange(new object[] { "4IA", "4R1", "4R2"}); this.comboBox2.Location = new System.Drawing.Point(129, 121); this.comboBox2.Name = "comboBox2"; this.comboBox2.Size = new System.Drawing.Size(101, 21); this.comboBox2.TabIndex = 9; this.comboBox2.Text = "4IA"; // // button3 // this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byt e)(0))); this.button3.Location = new System.Drawing.Point(223, 174); this.button3.Name = "button3";

this.button3.Size = new System.Drawing.Size(67, 26); this.button3.TabIndex = 10; this.button3.Text = "Quitter"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // // Form1 // this.AcceptButton = this.button1; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScroll = true; this.AutoSize = true; this.ClientSize = new System.Drawing.Size(318, 285); this.Controls.Add(this.button3); this.Controls.Add(this.comboBox2); this.Controls.Add(this.label4); this.Controls.Add(this.comboBox1); this.Controls.Add(this.label3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.textBox2); this.Controls.Add(this.textBox1); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "Form1"; this.Text = "Informations"; this.Load += new System.EventHandler(this.Form1_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Label label3; public System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.Label label4; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.Button button3; } } =========================================form1.resx============= <?xml version="1.0" encoding="utf-8"?> <root> <!-Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format

that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows .Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows .Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a c omment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.bas e64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="appl ication/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: value : : : mimetype: value : : : mimetype: value : : : --> <xsd:schema application/x-microsoft.net.object.binary.base64 The object must be serialized with System.Runtime.Serialization.Formatters.Binary.BinaryFormatter and then encoded with base64 encoding. application/x-microsoft.net.object.soap.base64 The object must be serialized with System.Runtime.Serialization.Formatters.Soap.SoapFormatter and then encoded with base64 encoding. application/x-microsoft.net.object.bytearray.base64 The object must be serialized into a byte array using a System.ComponentModel.TypeConverter and then encoded with base64 encoding. id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xm

lns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata :Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msda ta:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata :Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4 " /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata :Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>

</resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root> =====================form2.cs====================== using using using using using using using using using using using System; System.Xml; System.Collections; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Linq; System.Text; System.Windows.Forms; System.Xml.XPath;

namespace WindowsFormsApplication1 { public partial class Form2 : Form { public DateTime dbut = DateTime.Now; ArrayList liste = new ArrayList(); ArrayList questionvue = (); ArrayList indicerep = new ArrayList(); int i = 0; string j bool dejavu = false; int note = 0; int rang = 0; int fin = public Form2(String a1,String a2,String a3,String a4) { InitializeComponent(); label1.Text = a1;//nom de la matire == nom du fichier label2.Text = a2; label3.Text = a3; label4.Text = a4; } private void label1_Click(object sender, EventArgs e) { } private void Form2_Load(object sender, EventArgs e) {

new ArrayList = ""; 0;

xml

XPathDocument doc = new XPathDocument(label1.Text+".xml"); XPathNavigator nav = doc.CreateNavigator(); // On rcupre un XPathNodeIterator sur les Record XPathNodeIterator iter = nav.Select("QCM/questions"); // Pour chaque Record try { button1.Enabled = false; while (iter.MoveNext()) { // On rcupre l'info

string string string string string ice rponse exacte

v1 v2 v3 v4 v5

= = = = =

iter.Current.SelectSingleNode("quest").Value; iter.Current.SelectSingleNode("prop1").Value; iter.Current.SelectSingleNode("prop2").Value; iter.Current.SelectSingleNode("prop3").Value; iter.Current.SelectSingleNode("rep").Value;//ind

string s = Environment.NewLine + v1 + Environment.NewLine + Environment.NewLine + v2 + Environment.NewLine + Environment.NewLine + v3 + Envi ronment.NewLine + Environment.NewLine + v4 + Environment.NewLine; liste.Add(s); indicerep.Add(v5); textBox1.Text = "Cliquez sur commencer pour voir les questio ns" + Environment.NewLine + "La dure de l'examen est : 30 minutes" + Environment. NewLine + "Le nombre de questions est :" + liste.Count + Environment.NewLine + " Examen ralis par : Zaheni anis"; } } catch { }

} private void button2_Click(object sender, EventArgs e) { if (fin !=1) MessageBox.Show("C'est fini votre score est :" + note, "Fin de l'ex amen ", MessageBoxButtons.OK, MessageBoxIcon.Information); Environment.Exit(0); } private void button1_Click(object sender, EventArgs e) {//valider try { rang++; if (j.Equals(indicerep[i])) { note++; } liste[i] += Environment.NewLine + "question traite"; button1.Enab led = false; if (rang == liste.Count) { timer1.Enabled = false; label11.Text = note.ToString(); label10.Visible = true; MessageBox.Show("C'est fini votre score est :"+note, "Fin d e l'examen ",MessageBoxButtons.OK, MessageBoxIcon.Information); fin = 1; } } catch { }

} private void radioButton1_CheckedChanged(object sender, EventArgs e) { button1.Enabled = true; j = "1"; } private void radioButton2_CheckedChanged(object sender, EventArgs e) { button1.Enabled = true; j = "2"; } private void radioButton3_CheckedChanged(object sender, EventArgs e) { button1.Enabled = true; j = "3"; } private void button3_Click(object sender, EventArgs e) { try { if (i == 0 ) { i++; textBox1.Text = liste[i].ToString(); dejavu = true; } if (i < liste.Count-1 && i != 0 && dejavu == false) { i++; textBox1.Text = liste[i].ToString(); dejavu = true; } if (i == liste.Count-1 && dejavu == false) { i = 0; textBox1.Text = liste[i].ToString(); } dejavu = false; if (textBox1.Text.EndsWith("question traite") == true) button1.Enabled = false; else button1.Enabled = true; } catch { } } private void button4_Click(object sender, EventArgs e) { try

{ if (i == 0) { i = liste.Count - 1; textBox1.Text = liste[i].ToString() ; dejavu = true; } if (i > 0 && dejavu==false) { i--; textBox1.Text = liste[i].ToString(); } dejavu = false; if (textBox1.Text.EndsWith("question traite") == true) button1.Enabled = false; else button1.Enabled = true; } catch { } } private void timer1_Tick(object sender, EventArgs e) { try { // une seconde s'est coule DateTime maintenant = DateTime.Now; TimeSpan dure = maintenant - dbut; // on met jour le chronomtre label9.Text = dure.Hours.ToString("d2") + ":" + dure.Minutes.ToStr ing("d2") + ":" + dure.Seconds.ToString("d2"); if(label9.Text.Equals("00:30:00"))//dure de l'exam ( modifier par user ) { timer1.Enabled=false; MessageBox.Show("C'est fini votre score est :" + note, "Fin de l'examen ", MessageBoxButtons.OK, MessageBoxIcon.Information); button1.Enabled = false; button3.Enabled = false; button4.En abled = false; label11.Text = note.ToString(); label10.Visible = true; } } catch { } } private void button5_Click(object sender, EventArgs e) { try { button3.Enabled = true; button4.Enabled = true; // on note l'heure de dbut dbut = DateTime.Now; // on l'affiche label9.Text = "00:00:00";

// on lance le timer timer1.Enabled = true; button5.Enabled = false; } catch { } }

} } ===================================form2.designer.cs============ namespace WindowsFormsApplication1 { partial class Form2 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed ; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.textBox1 = new System.Windows.Forms.TextBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.button5 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.radioButton3 = new System.Windows.Forms.RadioButton(); this.radioButton2 = new System.Windows.Forms.RadioButton(); this.radioButton1 = new System.Windows.Forms.RadioButton(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label();

this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.label9 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // textBox1 // this.textBox1.BackColor = System.Drawing.SystemColors.Menu; this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte )(0))); this.textBox1.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.textBox1.Location = new System.Drawing.Point(232, 44); this.textBox1.MaxLength = 327673; this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox1.Size = new System.Drawing.Size(447, 210); this.textBox1.TabIndex = 0; // // groupBox1 // this.groupBox1.Controls.Add(this.button5); this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.radioButton3); this.groupBox1.Controls.Add(this.radioButton2); this.groupBox1.Controls.Add(this.radioButton1); this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif" , 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((b yte)(0))); this.groupBox1.Location = new System.Drawing.Point(233, 269); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(445, 124); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; this.groupBox1.Text = "Choix Possibles :"; // // button5 // this.button5.Location = new System.Drawing.Point(330, 31); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(109, 31); this.button5.TabIndex = 4; this.button5.Text = "Commencer"; this.button5.UseVisualStyleBackColor = true; this.button5.Click += new System.EventHandler(this.button5_Click); // // button1

// this.button1.Location = new System.Drawing.Point(331, 83); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(108, 30); this.button1.TabIndex = 3; this.button1.Text = "Valider"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // radioButton3 // this.radioButton3.AutoSize = true; this.radioButton3.Location = new System.Drawing.Point(23, 96); this.radioButton3.Name = "radioButton3"; this.radioButton3.Size = new System.Drawing.Size(33, 20); this.radioButton3.TabIndex = 2; this.radioButton3.TabStop = true; this.radioButton3.Text = "3"; this.radioButton3.UseVisualStyleBackColor = true; this.radioButton3.CheckedChanged += new System.EventHandler(this.rad ioButton3_CheckedChanged); // // radioButton2 // this.radioButton2.AutoSize = true; this.radioButton2.Location = new System.Drawing.Point(23, 67); this.radioButton2.Name = "radioButton2"; this.radioButton2.Size = new System.Drawing.Size(33, 20); this.radioButton2.TabIndex = 1; this.radioButton2.TabStop = true; this.radioButton2.Text = "2"; this.radioButton2.UseVisualStyleBackColor = true; this.radioButton2.CheckedChanged += new System.EventHandler(this.rad ioButton2_CheckedChanged); // // radioButton1 // this.radioButton1.AutoSize = true; this.radioButton1.Location = new System.Drawing.Point(24, 34); this.radioButton1.Name = "radioButton1"; this.radioButton1.Size = new System.Drawing.Size(33, 20); this.radioButton1.TabIndex = 0; this.radioButton1.TabStop = true; this.radioButton1.Text = "1"; this.radioButton1.UseVisualStyleBackColor = true; this.radioButton1.CheckedChanged += new System.EventHandler(this.rad ioButton1_CheckedChanged); // // button2 // this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byt e)(0))); this.button2.Location = new System.Drawing.Point(570, 444); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(108, 31); this.button2.TabIndex = 2; this.button2.Text = "Quitter"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click);

// // button3 // this.button3.Enabled = false; this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byt e)(0))); this.button3.Location = new System.Drawing.Point(403, 444); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(110, 31); this.button3.TabIndex = 3; this.button3.Text = "Suivante >>"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // // button4 // this.button4.Enabled = false; this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byt e)(0))); this.button4.Location = new System.Drawing.Point(233, 444); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(114, 31); this.button4.TabIndex = 4; this.button4.Text = "<< Prcdente"; this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.button4_Click); // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label1.Location = new System.Drawing.Point(101, 134); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(0, 16); this.label1.TabIndex = 5; this.label1.Click += new System.EventHandler(this.label1_Click); // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label2.Location = new System.Drawing.Point(10, 81); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(0, 16); this.label2.TabIndex = 6; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));

this.label3.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label3.Location = new System.Drawing.Point(101, 81); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(0, 16); this.label3.TabIndex = 7; // // label4 // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label4.Location = new System.Drawing.Point(101, 181); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(0, 16); this.label4.TabIndex = 8; // // label5 // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label5.Location = new System.Drawing.Point(230, 9); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(85, 16); this.label5.TabIndex = 9; this.label5.Text = "Questions :"; // // label6 // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label6.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label6.Location = new System.Drawing.Point(7, 134); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(68, 16); this.label6.TabIndex = 10; this.label6.Text = "Matire :"; // // label7 // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label7.Location = new System.Drawing.Point(10, 181); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(65, 16); this.label7.TabIndex = 11; this.label7.Text = "Niveau :"; // // label8 // this.label8.AutoSize = true;

this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9 .75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawin g.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label8.ForeColor = System.Drawing.SystemColors.ActiveCaption; this.label8.Location = new System.Drawing.Point(7, 30); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(101, 16); this.label8.TabIndex = 12; this.label8.Text = "Coordones :"; // // timer1 // this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // label9 // this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 1 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0) )); this.label9.Location = new System.Drawing.Point(17, 14); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(111, 29); this.label9.TabIndex = 13; this.label9.Text = "00:00:00"; // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.ActiveCaption; this.panel1.Controls.Add(this.label9); this.panel1.ForeColor = System.Drawing.SystemColors.WindowFrame; this.panel1.Location = new System.Drawing.Point(40, 338); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(146, 54); this.panel1.TabIndex = 14; // // label10 // this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte )(0))); this.label10.ForeColor = System.Drawing.SystemColors.AppWorkspace; this.label10.Location = new System.Drawing.Point(44, 434); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(94, 25); this.label10.TabIndex = 15; this.label10.Text = "NOTE ="; this.label10.Visible = false; // // label11 // this.label11.AutoSize = true; this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte )(0))); this.label11.ForeColor = System.Drawing.SystemColors.AppWorkspace; this.label11.Location = new System.Drawing.Point(129, 434); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(0, 25);

this.label11.TabIndex = 16; // // Form2 // this.AcceptButton = this.button1; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScroll = true; this.AutoSize = true; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.ClientSize = new System.Drawing.Size(691, 499); this.Controls.Add(this.label11); this.Controls.Add(this.label10); this.Controls.Add(this.panel1); this.Controls.Add(this.label8); this.Controls.Add(this.label7); this.Controls.Add(this.label6); this.Controls.Add(this.label5); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.textBox1); this.Name = "Form2"; this.Text = "Examen"; this.Load += new System.EventHandler(this.Form2_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private private private private private private private private private private private private private private private private private private private System.Windows.Forms.TextBox textBox1; System.Windows.Forms.GroupBox groupBox1; System.Windows.Forms.Button button1; System.Windows.Forms.RadioButton radioButton3; System.Windows.Forms.RadioButton radioButton2; System.Windows.Forms.RadioButton radioButton1; System.Windows.Forms.Button button2; System.Windows.Forms.Button button3; System.Windows.Forms.Button button4; System.Windows.Forms.Label label1; System.Windows.Forms.Label label2; System.Windows.Forms.Label label3; System.Windows.Forms.Label label4; System.Windows.Forms.Label label5; System.Windows.Forms.Label label6; System.Windows.Forms.Label label7; System.Windows.Forms.Label label8; System.Windows.Forms.Timer timer1; System.Windows.Forms.Label label9;

private private private private } }

System.Windows.Forms.Button button5; System.Windows.Forms.Panel panel1; System.Windows.Forms.Label label10; System.Windows.Forms.Label label11;

============================================form2.resx========== <?xml version="1.0" encoding="utf-8"?> <root> <!-Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows .Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows .Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a c omment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.bas e64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="appl ication/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below.

mimetype: value : : : mimetype: value : : :

application/x-microsoft.net.object.binary.base64 The object must be serialized with System.Runtime.Serialization.Formatters.Binary.BinaryFormatter and then encoded with base64 encoding. application/x-microsoft.net.object.soap.base64 The object must be serialized with System.Runtime.Serialization.Formatters.Soap.SoapFormatter and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xm lns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata :Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msda ta:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata :Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4 " /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata :Ordinal="1" />

</xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="textBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0 .0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawin g, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root> ==================================program.cs============================ using using using using System; System.Collections.Generic; System.Linq; System.Windows.Forms;

namespace WindowsFormsApplication1 { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } } ==============================QCM.csproj================= <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microso

ft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{4AB72ACF-E302-489E-8982-8EE0FDCDDA53}</ProjectGuid> <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>WindowsFormsApplication1</RootNamespace> <AssemblyName>QCM</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <PublishUrl>publish\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> <UpdateEnabled>false</UpdateEnabled> <UpdateMode>Foreground</UpdateMode> <UpdateInterval>7</UpdateInterval> <UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>0</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <IsWebBootstrapper>false</IsWebBootstrapper> <UseApplicationTrust>false</UseApplicationTrust> <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile> </DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile> </DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data.DataSetExtensions"> <RequiredTargetFramework>3.5</RequiredTargetFramework>

</Reference> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Form1.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Form1.Designer.cs"> <DependentUpon>Form1.cs</DependentUpon> </Compile> <Compile Include="Form2.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Form2.Designer.cs"> <DependentUpon>Form2.cs</DependentUpon> </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <EmbeddedResource Include="Form1.resx"> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Form2.resx"> <DependentUpon>Form2.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> <SubType>Designer</SubType> </EmbeddedResource> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> </Compile> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> </ItemGroup> <ItemGroup> <Content Include="XMLFile1.xml" /> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> <Visible>False</Visible> <ProductName>.NET Framework Client Profile</ProductName> <Install>false</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> <Visible>False</Visible> <ProductName>.NET Framework 2.0 %28x86%29</ProductName> <Install>false</Install>

</BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.3.0"> <Visible>False</Visible> <ProductName>.NET Framework 3.0 %28x86%29</ProductName> <Install>false</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5"> <Visible>False</Visible> <ProductName>.NET Framework 3.5</ProductName> <Install>false</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <Visible>False</Visible> <ProductName>.NET Framework 3.5 SP1</ProductName> <Install>true</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> <Visible>False</Visible> <ProductName>Windows Installer 3.1</ProductName> <Install>true</Install> </BootstrapperPackage> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> ===============================qcm.csproj.user====================== <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <PublishUrlHistory>publish\</PublishUrlHistory> <InstallUrlHistory> </InstallUrlHistory> <SupportUrlHistory> </SupportUrlHistory> <UpdateUrlHistory> </UpdateUrlHistory> <BootstrapperUrlHistory> </BootstrapperUrlHistory> <ErrorReportUrlHistory> </ErrorReportUrlHistory> <FallbackCulture>en-US</FallbackCulture> <VerifyUploadedFiles>false</VerifyUploadedFiles> </PropertyGroup> </Project> =========================================================================