diff --git a/psychorientation/images/icones/sortir.png b/psychorientation/images/icones/sortir.png new file mode 100644 index 0000000000000000000000000000000000000000..3b2233b63eb4c58ee1dc4b4ca05ff8483f694b47 Binary files /dev/null and b/psychorientation/images/icones/sortir.png differ diff --git a/psychorientation/psychorientation/InterfaceClasse.Designer.cs b/psychorientation/psychorientation/InterfaceClasse.Designer.cs index 32b648a11f5e8df1fc224ac66f2efb33477d7e3a..663153299a2431765e1cc7dd4390bc1441332be4 100644 --- a/psychorientation/psychorientation/InterfaceClasse.Designer.cs +++ b/psychorientation/psychorientation/InterfaceClasse.Designer.cs @@ -31,8 +31,10 @@ this.pb_action_suivante = new System.Windows.Forms.PictureBox(); this.pb_liste_eleves = new System.Windows.Forms.PictureBox(); this.lbl_date = new System.Windows.Forms.Label(); + this.pb_sortir = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.pb_action_suivante)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pb_liste_eleves)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pb_sortir)).BeginInit(); this.SuspendLayout(); // // pb_action_suivante @@ -68,6 +70,17 @@ this.lbl_date.TabIndex = 2; this.lbl_date.Text = "Chargement..."; // + // pb_sortir + // + this.pb_sortir.BackgroundImage = global::psychorientation.Properties.Resources.sortir; + this.pb_sortir.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pb_sortir.Location = new System.Drawing.Point(1283, -1); + this.pb_sortir.Name = "pb_sortir"; + this.pb_sortir.Size = new System.Drawing.Size(75, 75); + this.pb_sortir.TabIndex = 3; + this.pb_sortir.TabStop = false; + this.pb_sortir.Click += new System.EventHandler(this.Pb_sortir_Click); + // // InterfaceClasse // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -76,6 +89,7 @@ this.BackgroundImage = global::psychorientation.Properties.Resources.salleV1; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(1357, 783); + this.Controls.Add(this.pb_sortir); this.Controls.Add(this.lbl_date); this.Controls.Add(this.pb_liste_eleves); this.Controls.Add(this.pb_action_suivante); @@ -90,6 +104,7 @@ this.SizeChanged += new System.EventHandler(this.InterfaceClasse_SizeChanged); ((System.ComponentModel.ISupportInitialize)(this.pb_action_suivante)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pb_liste_eleves)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pb_sortir)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -100,6 +115,7 @@ private System.Windows.Forms.PictureBox pb_action_suivante; private System.Windows.Forms.PictureBox pb_liste_eleves; private System.Windows.Forms.Label lbl_date; + private System.Windows.Forms.PictureBox pb_sortir; } } diff --git a/psychorientation/psychorientation/InterfaceClasse.cs b/psychorientation/psychorientation/InterfaceClasse.cs index 245588fa525c59390383fa43092bc7b2e3d7d8ca..d28b2e6054fbe55ba630b9ee47289c08239cad7f 100644 --- a/psychorientation/psychorientation/InterfaceClasse.cs +++ b/psychorientation/psychorientation/InterfaceClasse.cs @@ -74,8 +74,20 @@ namespace psychorientation private void InterfaceClasse_SizeChanged(object sender, EventArgs e) { - PictureBox pb = pb_action_suivante; - pb.Location = new Point(Size.Width - pb.Width - 32, Size.Height - pb.Height - 32); + PictureBox pb1 = pb_action_suivante; + pb1.Location = new Point(Size.Width - pb1.Width - 32, Size.Height - pb1.Height - 32); + + PictureBox pb2 = pb_sortir; + pb2.Location = new Point(Size.Width - pb2.Width, 0); + } + + private void Pb_sortir_Click(object sender, EventArgs e) + { + if (MessageBox.Show("Souhaitez-vous quitter le jeu ?\nVous perdrez alors votre progression dans la partie en cours.", + "Confirmation de fermeture", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes) + { + Close(); + } } } } diff --git a/psychorientation/psychorientation/InterfaceInfoEleve.cs b/psychorientation/psychorientation/InterfaceInfoEleve.cs index c8c93df4799a5acbfa020ebf88a4c036c8a6ba43..c36ff67b9fee3bc10aa7fbb1cfdf10d28829cc6f 100644 --- a/psychorientation/psychorientation/InterfaceInfoEleve.cs +++ b/psychorientation/psychorientation/InterfaceInfoEleve.cs @@ -33,22 +33,22 @@ namespace psychorientation private void actualiser() { - lblEleve.Text = "Eleve n°"+eleve.getId(); - lblClasse.Text = listClasse[eleve.getClasse()]; - lblEffort.Text = eleve.getEffort().ToString(); - lblCompetence.Text = eleve.getCompetence().ToString(); - double moyenne = eleve.getMoyenne(); + lblEleve.Text = "Eleve n°" + eleve.GetId(); + lblClasse.Text = listClasse[eleve.GetClasse()]; + lblEffort.Text = eleve.GetEffort().ToString(); + lblCompetence.Text = eleve.GetCompetence().ToString(); + double moyenne = eleve.GetMoyenne(); if (moyenne == -1) { lblMoyenne.Text="Pas encore d'évaluation"; } else { - lblMoyenne.Text = eleve.getMoyenne().ToString()+"/20"; + lblMoyenne.Text = eleve.GetMoyenne().ToString()+"/20"; } - MajPanel(pnlCompetence,eleve.getCompetence()); - MajPanel(pnlEffort, eleve.getEffort()); + MajPanel(pnlCompetence,eleve.GetCompetence()); + MajPanel(pnlEffort, eleve.GetEffort()); } private void MajPanel(Panel p, double valeur) { diff --git a/psychorientation/psychorientation/Properties/Resources.Designer.cs b/psychorientation/psychorientation/Properties/Resources.Designer.cs index c94656df38b45e13beac46c0cfa28eb826f96cf2..3d8b1ed594f737fec479a74cc6e506dd1b678fb7 100644 --- a/psychorientation/psychorientation/Properties/Resources.Designer.cs +++ b/psychorientation/psychorientation/Properties/Resources.Designer.cs @@ -79,5 +79,15 @@ namespace psychorientation.Properties { return ((System.Drawing.Bitmap)(obj)); } } + + /// <summary> + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap sortir { + get { + object obj = ResourceManager.GetObject("sortir", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/psychorientation/psychorientation/Properties/Resources.resx b/psychorientation/psychorientation/Properties/Resources.resx index 883a18036ccf14c67d61d71fd433abd4156f5d52..0fa817a24a41468322b11bc88995240cc2c497fd 100644 --- a/psychorientation/psychorientation/Properties/Resources.resx +++ b/psychorientation/psychorientation/Properties/Resources.resx @@ -124,4 +124,7 @@ <data name="salleV1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\salleV1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="sortir" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\sortir.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root> \ No newline at end of file diff --git a/psychorientation/psychorientation/Resources/sortir.png b/psychorientation/psychorientation/Resources/sortir.png new file mode 100644 index 0000000000000000000000000000000000000000..3b2233b63eb4c58ee1dc4b4ca05ff8483f694b47 Binary files /dev/null and b/psychorientation/psychorientation/Resources/sortir.png differ diff --git a/psychorientation/psychorientation/psychorientation.csproj b/psychorientation/psychorientation/psychorientation.csproj index 8d3f5a0db11a75f366f6ae579d0c6599ba1a39fc..3373fc1fd98e4ae5518707efb2d2cdc8ab41c765 100644 --- a/psychorientation/psychorientation/psychorientation.csproj +++ b/psychorientation/psychorientation/psychorientation.csproj @@ -113,5 +113,8 @@ <ItemGroup> <None Include="Resources\salleV1.png" /> </ItemGroup> + <ItemGroup> + <None Include="Resources\sortir.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file