Skip to content
Snippets Groups Projects
Commit aeb8e910 authored by Antoine Félix's avatar Antoine Félix
Browse files

Interface de la classe créée et affichage de la date mis en place.

parent 6069f112
No related merge requests found
...@@ -18,7 +18,7 @@ namespace psychorientation ...@@ -18,7 +18,7 @@ namespace psychorientation
public double coeffCompetenceEcrit; public double coeffCompetenceEcrit;
public double coeffEffortEcrit; public double coeffEffortEcrit;
public static Config getInstance() public static Config GetInstance()
{ {
if (Config.instance == null) if (Config.instance == null)
{ {
...@@ -33,22 +33,22 @@ namespace psychorientation ...@@ -33,22 +33,22 @@ namespace psychorientation
} }
} }
public double getCoeffEffortOral() public double GetCoeffEffortOral()
{ {
return this.coeffEffortOral; return this.coeffEffortOral;
} }
public double getCoeffCompetenceOral() public double GetCoeffCompetenceOral()
{ {
return this.coeffCompetenceOral; return this.coeffCompetenceOral;
} }
public double getCoeffCompetenceEcrit() public double GetCoeffCompetenceEcrit()
{ {
return this.coeffCompetenceOral; return this.coeffCompetenceOral;
} }
public double getCoeffEffortEcrit() public double GetCoeffEffortEcrit()
{ {
return this.coeffEffortEcrit; return this.coeffEffortEcrit;
} }
......
namespace psychorientation
{
partial class Form1
{
/// <summary>
/// Variable nécessaire au concepteur.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Nettoyage des ressources utilisées.
/// </summary>
/// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Code généré par le Concepteur Windows Form
/// <summary>
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
/// le contenu de cette méthode avec l'éditeur de code.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1024, 560);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Psychorientation";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace psychorientation
{
public partial class Form1 : Form
{
List<string> listClasse = new List<string>();
List<Eleve> listEleve = new List<Eleve>();
int nombreEleve = 5;
public Form1()
{
InitializeComponent();
}
private void InitialiserTableau()
{
listClasse.Add("Seconde");
listClasse.Add("Premiere");
listClasse.Add("Terminale");
}
private void CreerEleve(int nbEleve)
{
for(int i = 0; i < nbEleve; i++)
{
Eleve elev = new Eleve(i);
listEleve.Add(elev);
}
}
private void Form1_Load(object sender, EventArgs e)
{
InitialiserTableau();
CreerEleve(nombreEleve);
TypeMessage tm = TypeMessage.INFORMATION;
Message m = new Message(-1,"Bonjour apprenti prof, vous allez apprendre à éduquer des joueurs !! ","Début",tm);
m.ShowDialog();
InterfaceInfoEleve ii = new InterfaceInfoEleve();
ii.setParam(listEleve[0],listClasse);
ii.Left = 0;
ii.Top = 0;
ii.BorderStyle = BorderStyle.Fixed3D;
this.Controls.Add(ii);
}
}
}
namespace psychorientation
{
partial class InterfaceClasse
{
/// <summary>
/// Variable nécessaire au concepteur.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Nettoyage des ressources utilisées.
/// </summary>
/// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Code généré par le Concepteur Windows Form
/// <summary>
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
/// le contenu de cette méthode avec l'éditeur de code.
/// </summary>
private void InitializeComponent()
{
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();
((System.ComponentModel.ISupportInitialize)(this.pb_action_suivante)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pb_liste_eleves)).BeginInit();
this.SuspendLayout();
//
// pb_action_suivante
//
this.pb_action_suivante.BackColor = System.Drawing.SystemColors.ControlDark;
this.pb_action_suivante.Location = new System.Drawing.Point(922, 471);
this.pb_action_suivante.Name = "pb_action_suivante";
this.pb_action_suivante.Size = new System.Drawing.Size(90, 77);
this.pb_action_suivante.TabIndex = 0;
this.pb_action_suivante.TabStop = false;
this.pb_action_suivante.Click += new System.EventHandler(this.Pb_action_suivante_Click);
//
// pb_liste_eleves
//
this.pb_liste_eleves.Location = new System.Drawing.Point(12, 12);
this.pb_liste_eleves.Name = "pb_liste_eleves";
this.pb_liste_eleves.Size = new System.Drawing.Size(90, 78);
this.pb_liste_eleves.TabIndex = 1;
this.pb_liste_eleves.TabStop = false;
this.pb_liste_eleves.Click += new System.EventHandler(this.Pb_liste_eleves_Click);
//
// lbl_date
//
this.lbl_date.AutoSize = true;
this.lbl_date.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_date.Location = new System.Drawing.Point(108, 12);
this.lbl_date.Name = "lbl_date";
this.lbl_date.Size = new System.Drawing.Size(142, 24);
this.lbl_date.TabIndex = 2;
this.lbl_date.Text = "Chargement...";
//
// InterfaceClasse
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1024, 560);
this.Controls.Add(this.lbl_date);
this.Controls.Add(this.pb_liste_eleves);
this.Controls.Add(this.pb_action_suivante);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "InterfaceClasse";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Psychorientation";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pb_action_suivante)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pb_liste_eleves)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pb_action_suivante;
private System.Windows.Forms.PictureBox pb_liste_eleves;
private System.Windows.Forms.Label lbl_date;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace psychorientation
{
public partial class InterfaceClasse : Form
{
private List<String> libele_mois = new List<String>()
{"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"};
private List<String> libele_niveau = new List<String>()
{"Seconde", "Première", "Terminale"};
private int mois_actuel = 8;
private int annee_actuelle = 0;
public InterfaceClasse()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
lbl_date.Text = libele_mois[(mois_actuel % 12)] + " " + libele_niveau[annee_actuelle];
TypeMessage tm = TypeMessage.INFORMATION;
Message m = new Message(-1,"Bonjour apprenti prof, vous allez apprendre à éduquer des joueurs !! ","Début",tm);
m.ShowDialog();
}
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;
}
// Passe au mois suivant.
mois_actuel++;
switch(mois_actuel)
{
case 17: // Fin de la 1ère année : Début Juin.
mois_actuel = 20;
annee_actuelle = 1;
break;
case 29: // Fin de la 2nde année : Début Juin.
mois_actuel = 32;
annee_actuelle = 2;
break;
case 42: // Fin de la 3ème année : Debut Juillet.
// Fin de la partie.
break;
}
lbl_date.Text = libele_mois[(mois_actuel % 12)] + " " + libele_niveau[annee_actuelle];
}
private void Pb_liste_eleves_Click(object sender, EventArgs e)
{
}
}
}
...@@ -16,7 +16,7 @@ namespace psychorientation ...@@ -16,7 +16,7 @@ namespace psychorientation
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); Application.Run(new InterfaceClasse());
} }
} }
} }
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
<ItemGroup> <ItemGroup>
<Compile Include="Config.cs" /> <Compile Include="Config.cs" />
<Compile Include="Eleve.cs" /> <Compile Include="Eleve.cs" />
<Compile Include="Form1.cs"> <Compile Include="InterfaceClasse.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Form1.Designer.cs"> <Compile Include="InterfaceClasse.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>InterfaceClasse.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="InterfaceInfoEleve.cs"> <Compile Include="InterfaceInfoEleve.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
</Compile> </Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx"> <EmbeddedResource Include="InterfaceClasse.resx">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>InterfaceClasse.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="InterfaceInfoEleve.resx"> <EmbeddedResource Include="InterfaceInfoEleve.resx">
<DependentUpon>InterfaceInfoEleve.cs</DependentUpon> <DependentUpon>InterfaceInfoEleve.cs</DependentUpon>
......
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