Skip to content
Snippets Groups Projects
Commit 1e85def4 authored by GROSS LOIC's avatar GROSS LOIC
Browse files

Merge branch 'master' into 'master'

InterfaceClasse trackBar coef

See merge request !27
parents 33fa9df1 9255ea4d
Branches
1 merge request!27InterfaceClasse trackBar coef
......@@ -40,9 +40,13 @@
this.pnlListeEleve = new System.Windows.Forms.Panel();
this.lblListeEleve = new System.Windows.Forms.Label();
this.imgListPerso = new System.Windows.Forms.ImageList(this.components);
this.pnlChoix = new System.Windows.Forms.Panel();
this.lblNotation = new System.Windows.Forms.Label();
this.lblCours = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pb_action_suivante)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pb_sortir)).BeginInit();
this.pnlListeEleve.SuspendLayout();
this.pnlChoix.SuspendLayout();
this.SuspendLayout();
//
// pb_action_suivante
......@@ -161,6 +165,33 @@
this.imgListPerso.Images.SetKeyName(4, "prof1.png");
this.imgListPerso.Images.SetKeyName(5, "prof2.png");
//
// pnlChoix
//
this.pnlChoix.Controls.Add(this.lblCours);
this.pnlChoix.Controls.Add(this.lblNotation);
this.pnlChoix.Location = new System.Drawing.Point(1107, 99);
this.pnlChoix.Name = "pnlChoix";
this.pnlChoix.Size = new System.Drawing.Size(189, 528);
this.pnlChoix.TabIndex = 8;
//
// lblNotation
//
this.lblNotation.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.lblNotation.Location = new System.Drawing.Point(13, 87);
this.lblNotation.Name = "lblNotation";
this.lblNotation.Size = new System.Drawing.Size(164, 59);
this.lblNotation.TabIndex = 0;
this.lblNotation.Text = "Type de notation visant à aider les eleves de competence :";
//
// lblCours
//
this.lblCours.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.lblCours.Location = new System.Drawing.Point(13, 282);
this.lblCours.Name = "lblCours";
this.lblCours.Size = new System.Drawing.Size(164, 59);
this.lblCours.TabIndex = 1;
this.lblCours.Text = "Type de cours visant à aider les eleves de competence :";
//
// InterfaceClasse
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
......@@ -169,6 +200,7 @@
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(1357, 783);
this.Controls.Add(this.pnlChoix);
this.Controls.Add(this.lblEffort);
this.Controls.Add(this.lblCompetence);
this.Controls.Add(this.lblMoyenne);
......@@ -189,6 +221,7 @@
((System.ComponentModel.ISupportInitialize)(this.pb_sortir)).EndInit();
this.pnlListeEleve.ResumeLayout(false);
this.pnlListeEleve.PerformLayout();
this.pnlChoix.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
......@@ -208,6 +241,9 @@
private System.Windows.Forms.Panel pnlListeEleve;
private System.Windows.Forms.Label lblListeEleve;
private System.Windows.Forms.ImageList imgListPerso;
private System.Windows.Forms.Panel pnlChoix;
private System.Windows.Forms.Label lblNotation;
private System.Windows.Forms.Label lblCours;
}
}
......@@ -20,7 +20,15 @@ namespace psychorientation
private int[] positionElevex = { 322, 571, 698, 951, 322, 571, 698, 951 };
private int[] positionElevey = { 398, 398, 398, 398, 505, 505, 505, 505 };
private string notaText = "Notation suivant les coefficients : ";
private string coursText = "Type de cours visant à aider les eleves de competence : ";
private double valCours = 5.0;
private double valNotation = 10.0;
private Label lblValEffort = new Label();
private Label lblValCompetence = new Label();
public InterfaceClasse()
{
InitializeComponent();
......@@ -46,6 +54,32 @@ namespace psychorientation
y += 220;
}
TrackBar tbNota = new TrackBar();
tbNota.Location = new System.Drawing.Point(0, lblNotation.Location.Y+lblNotation.Size.Height);
tbNota.Size = new System.Drawing.Size(184, 45);
tbNota.Maximum = 20;
tbNota.Value = 10;
tbNota.Scroll += new System.EventHandler(tbNota_Scroll);
pnlChoix.Controls.Add(tbNota);
lblNotation.Text = notaText;
lblValEffort.Tag = "Effort : ";
lblValCompetence.Tag = "Compétence : ";
lblValEffort.Location = new Point(130, 5 + tbNota.Location.Y + tbNota.Size.Height);
lblValCompetence.Location = new Point(1, 5 + tbNota.Location.Y + tbNota.Size.Height);
lblValEffort.Text = lblValEffort.Tag + ( (20- tbNota.Value) / 10.0).ToString();
lblValCompetence.Text = lblValCompetence.Tag + (tbNota.Value / 10.0).ToString();
pnlChoix.Controls.Add(lblValEffort);
pnlChoix.Controls.Add(lblValCompetence);
TrackBar tbCours = new TrackBar();
tbCours.Location = new System.Drawing.Point(0, 10 + lblCours.Location.Y + lblCours.Size.Height);
tbCours.Size = new System.Drawing.Size(184, 45);
tbCours.Value = 5;
tbCours.Scroll += new System.EventHandler(tbCours_Scroll);
pnlChoix.Controls.Add(tbCours);
lblCours.Text = coursText + tbCours.Value.ToString();
Message mAccueil = new Message("Bonjour apprenti prof, vous allez apprendre à éduquer des joueurs !! ", "Début", TypeMessage.INFORMATION);
mAccueil.ShowDialog();
......@@ -99,24 +133,14 @@ namespace psychorientation
private void Pb_action_suivante_Click(object sender, EventArgs e)
{
// Traite les actions à effectuer avant de passer au mois suivant.
/*
if (false)
{
// Lance l'interface appropriee.
return;
}*/
Message mControle = new Message("C'est la fin du mois, veuillez choisir le niveau de compétence du public cible de votre enseignement.", "Cours", TypeMessage.NOTATION);
mControle.ShowDialog();
foreach(Eleve el in gestEleve.GetListeEleves())
foreach (Eleve el in gestEleve.GetListeEleves())
{
el.Progression(mControle.getReponseDouble);
el.Progression(valCours);
el.AjouterNote("Controle " + lblClasse.Text + " " + lblDate.Text);
}
lblEffort.Text = "Effort de la classe : " + Math.Round(gestEleve.GetEffortClasse(), 1).ToString();
lblCompetence.Text = "Competence de la classe : " + Math.Round(gestEleve.GetCompetenceClasse(), 1).ToString();
lblMoyenne.Text = "Moyenne de la classe : " + Math.Round(gestEleve.GetMoyenneClasse(), 1).ToString();
......@@ -192,5 +216,21 @@ namespace psychorientation
Close();
}
}
private void tbNota_Scroll(object sender, EventArgs e)
{
TrackBar tbNota = (TrackBar)sender;
valNotation = (double)tbNota.Value;
lblValEffort.Text = lblValEffort.Tag + ( (20 - valNotation) / 10.0).ToString();
lblValCompetence.Text = lblValCompetence.Tag + (valNotation / 10.0).ToString();
}
private void tbCours_Scroll(object sender, EventArgs e)
{
TrackBar tbCours = (TrackBar)sender;
valCours = (double)tbCours.Value;
lblCours.Text = coursText + valCours.ToString();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
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
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>
......@@ -26,36 +26,36 @@
<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
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
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
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
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: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : 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
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
......@@ -125,6 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
mgEAAk1TRnQBSQFMAgEBBgEAARABAAEQAQAByAEAAcgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABIAEDAgABkAEBAgABAQEAAQgGAAHiAQQXAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEA
AcAB3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEA
......@@ -8869,4 +8870,4 @@
vVBvxOHiQa896v8HT8lffb465hIAAAAASUVORK5CYII=
</value>
</data>
</root>
\ No newline at end of file
</root>
......@@ -35,9 +35,9 @@
this.lblClasse = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.pnlEffort = new System.Windows.Forms.Panel();
this.lblEffort = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.pnlCompetence = new System.Windows.Forms.Panel();
this.lblEffort = new System.Windows.Forms.Label();
this.lblCompetence = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.lblMoyenne = new System.Windows.Forms.Label();
......@@ -100,6 +100,7 @@
//
this.panel1.BackColor = System.Drawing.Color.Silver;
this.panel1.Controls.Add(this.pnlEffort);
this.panel1.Controls.Add(this.lblEffort);
this.panel1.Location = new System.Drawing.Point(110, 95);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(92, 26);
......@@ -115,6 +116,14 @@
this.pnlEffort.TabIndex = 6;
this.pnlEffort.Click += new System.EventHandler(this.InterfaceInfoEleve_Click);
//
// lblEffort
//
this.lblEffort.AutoSize = true;
this.lblEffort.Location = new System.Drawing.Point(3, 5);
this.lblEffort.Name = "lblEffort";
this.lblEffort.Size = new System.Drawing.Size(0, 13);
this.lblEffort.TabIndex = 7;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Silver;
......@@ -134,14 +143,6 @@
this.pnlCompetence.TabIndex = 7;
this.pnlCompetence.Click += new System.EventHandler(this.InterfaceInfoEleve_Click);
//
// lblEffort
//
this.lblEffort.AutoSize = true;
this.lblEffort.Location = new System.Drawing.Point(49, 109);
this.lblEffort.Name = "lblEffort";
this.lblEffort.Size = new System.Drawing.Size(0, 13);
this.lblEffort.TabIndex = 7;
//
// lblCompetence
//
this.lblCompetence.AutoSize = true;
......@@ -178,7 +179,6 @@
this.Controls.Add(this.lblMoyenne);
this.Controls.Add(this.label4);
this.Controls.Add(this.lblCompetence);
this.Controls.Add(this.lblEffort);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.lblClasse);
......@@ -191,6 +191,7 @@
this.Load += new System.EventHandler(this.InterfaceInfoEleve_Load);
this.Click += new System.EventHandler(this.InterfaceInfoEleve_Click);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment