diff --git a/psychorientation/psychorientation/Config.cs b/psychorientation/psychorientation/Config.cs index 16b19f61d75488cb12079ff45cf2a36ce370011a..f7dcb873bac01ceee1816f04d7c5df74ee2989ba 100644 --- a/psychorientation/psychorientation/Config.cs +++ b/psychorientation/psychorientation/Config.cs @@ -18,7 +18,7 @@ namespace psychorientation public double coeffCompetenceEcrit; public double coeffEffortEcrit; - public static Config getInstance() + public static Config GetInstance() { if (Config.instance == null) { @@ -33,22 +33,22 @@ namespace psychorientation } } - public double getCoeffEffortOral() + public double GetCoeffEffortOral() { return this.coeffEffortOral; } - public double getCoeffCompetenceOral() + public double GetCoeffCompetenceOral() { return this.coeffCompetenceOral; } - public double getCoeffCompetenceEcrit() + public double GetCoeffCompetenceEcrit() { return this.coeffCompetenceOral; } - public double getCoeffEffortEcrit() + public double GetCoeffEffortEcrit() { return this.coeffEffortEcrit; } diff --git a/psychorientation/psychorientation/Form1.Designer.cs b/psychorientation/psychorientation/Form1.Designer.cs index 27d836493902ca709dce268d64971783d9ba551a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/psychorientation/psychorientation/Form1.Designer.cs +++ b/psychorientation/psychorientation/Form1.Designer.cs @@ -1,51 +0,0 @@ -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 - } -} - diff --git a/psychorientation/psychorientation/Form1.cs b/psychorientation/psychorientation/Form1.cs index baf4f85c4c2c2695ec38bb3efdcda6588afc5536..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/psychorientation/psychorientation/Form1.cs +++ b/psychorientation/psychorientation/Form1.cs @@ -1,63 +0,0 @@ -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); - - - } - } -} diff --git a/psychorientation/psychorientation/InterfaceClasse.Designer.cs b/psychorientation/psychorientation/InterfaceClasse.Designer.cs new file mode 100644 index 0000000000000000000000000000000000000000..fbd748f616543491239c6dd6386c76b505582c18 --- /dev/null +++ b/psychorientation/psychorientation/InterfaceClasse.Designer.cs @@ -0,0 +1,95 @@ +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; + } +} + diff --git a/psychorientation/psychorientation/InterfaceClasse.cs b/psychorientation/psychorientation/InterfaceClasse.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc85503f882b2057fd3ef9331dfab0686ed9f504 --- /dev/null +++ b/psychorientation/psychorientation/InterfaceClasse.cs @@ -0,0 +1,71 @@ +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) + { + + } + } +} diff --git a/psychorientation/psychorientation/Form1.resx b/psychorientation/psychorientation/InterfaceClasse.resx similarity index 100% rename from psychorientation/psychorientation/Form1.resx rename to psychorientation/psychorientation/InterfaceClasse.resx diff --git a/psychorientation/psychorientation/Program.cs b/psychorientation/psychorientation/Program.cs index 41634b64976497c6ecde04d4b1db97b5e865c4aa..5f0feaef3dca7c8135265bd0b7ada4de49f35209 100644 --- a/psychorientation/psychorientation/Program.cs +++ b/psychorientation/psychorientation/Program.cs @@ -16,7 +16,7 @@ namespace psychorientation { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); + Application.Run(new InterfaceClasse()); } } } diff --git a/psychorientation/psychorientation/psychorientation.csproj b/psychorientation/psychorientation/psychorientation.csproj index 842cf6fdbc11df5aacef763bcbb27356c21e6105..37e02a3b97a5d8ac7a38711d54e163ad7f506ff3 100644 --- a/psychorientation/psychorientation/psychorientation.csproj +++ b/psychorientation/psychorientation/psychorientation.csproj @@ -51,11 +51,11 @@ <ItemGroup> <Compile Include="Config.cs" /> <Compile Include="Eleve.cs" /> - <Compile Include="Form1.cs"> + <Compile Include="InterfaceClasse.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Form1.Designer.cs"> - <DependentUpon>Form1.cs</DependentUpon> + <Compile Include="InterfaceClasse.Designer.cs"> + <DependentUpon>InterfaceClasse.cs</DependentUpon> </Compile> <Compile Include="InterfaceInfoEleve.cs"> <SubType>UserControl</SubType> @@ -71,8 +71,8 @@ </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> - <EmbeddedResource Include="Form1.resx"> - <DependentUpon>Form1.cs</DependentUpon> + <EmbeddedResource Include="InterfaceClasse.resx"> + <DependentUpon>InterfaceClasse.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="InterfaceInfoEleve.resx"> <DependentUpon>InterfaceInfoEleve.cs</DependentUpon>