Commit 8ef4b91e authored by AMOCA OKKES's avatar AMOCA OKKES
Browse files

update Cours particulier

parent 2800cf2d
......@@ -70,12 +70,6 @@
<Compile Include="fmCoursParticulier.Designer.cs">
<DependentUpon>fmCoursParticulier.cs</DependentUpon>
</Compile>
<Compile Include="fmGameChargingcs.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fmGameChargingcs.Designer.cs">
<DependentUpon>fmGameChargingcs.cs</DependentUpon>
</Compile>
<Compile Include="fmGraphFinal.cs">
<SubType>Form</SubType>
</Compile>
......@@ -116,9 +110,6 @@
<EmbeddedResource Include="fmCoursParticulier.resx">
<DependentUpon>fmCoursParticulier.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fmGameChargingcs.resx">
<DependentUpon>fmGameChargingcs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="fmGraphFinal.resx">
<DependentUpon>fmGraphFinal.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -425,6 +425,7 @@
//
// btnOK
//
this.btnOK.BackColor = System.Drawing.Color.Bisque;
this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOK.Location = new System.Drawing.Point(284, 89);
......@@ -433,7 +434,7 @@
this.btnOK.Size = new System.Drawing.Size(97, 30);
this.btnOK.TabIndex = 1;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.UseVisualStyleBackColor = false;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// lblFinCoursParticulier
......
......@@ -30,11 +30,11 @@ namespace _20School
int erreurProf = 0;
//LIste des réponse possible de chaque étudiant (pour éviter les répétitions)
List<int> listeEtu1 = new List<int>() { 1, 2, 3 };
List<int> listeEtu2 = new List<int>() { 1, 2, 3 };
List<int> listeEtu3 = new List<int>() { 1, 2, 3 };
List<int> listeEtu4 = new List<int>() { 1, 2, 3 };
List<int> listeEtu5 = new List<int>() { 1, 2, 3 };
List<int> listeEtu1;
List<int> listeEtu2;
List<int> listeEtu3;
List<int> listeEtu4;
List<int> listeEtu5;
/// <summary>
/// Actions à effectuer au chargement du formulaire.
......@@ -124,9 +124,10 @@ namespace _20School
if (timerTickCours == 0)
{
lblTimer.Text = timerTickCours.ToString();
MessageBox.Show("Temps écoulé !");
}
timer.Stop();
this.Hide();
}
//L'lélève rempli le sudoku aléatoirement
int nb;
......@@ -419,12 +420,9 @@ namespace _20School
/// <param name="e"></param>
private void btnOK_Click(object sender, EventArgs e)
{
fmPlay.coursParticulier = false;
//Fermeture du formulaire actuelle et ouverture d'un nouveau
this.Hide();
fmPlay play = new fmPlay();
play.Closed += (s, args) => this.Close();
play.Show();
}
/// <summary>
......
namespace _20School
{
partial class fmGameChargingcs
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmGameChargingcs));
this.pbProgress = new System.Windows.Forms.ProgressBar();
this.lblProgress = new System.Windows.Forms.Label();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.pnlCharging = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// pbProgress
//
this.pbProgress.BackColor = System.Drawing.Color.Black;
this.pbProgress.ForeColor = System.Drawing.Color.OrangeRed;
this.pbProgress.Location = new System.Drawing.Point(88, 86);
this.pbProgress.Name = "pbProgress";
this.pbProgress.Size = new System.Drawing.Size(390, 51);
this.pbProgress.TabIndex = 0;
//
// lblProgress
//
this.lblProgress.AutoSize = true;
this.lblProgress.BackColor = System.Drawing.Color.Transparent;
this.lblProgress.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblProgress.ForeColor = System.Drawing.Color.White;
this.lblProgress.Location = new System.Drawing.Point(207, 55);
this.lblProgress.Name = "lblProgress";
this.lblProgress.Size = new System.Drawing.Size(157, 28);
this.lblProgress.TabIndex = 1;
this.lblProgress.Text = "Processing...0%";
//
// backgroundWorker1
//
this.backgroundWorker1.WorkerReportsProgress = true;
this.backgroundWorker1.WorkerSupportsCancellation = true;
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
this.backgroundWorker1.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorker1_ProgressChanged);
this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
//
// pnlCharging
//
this.pnlCharging.BackColor = System.Drawing.Color.Gray;
this.pnlCharging.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlCharging.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlCharging.Location = new System.Drawing.Point(0, 0);
this.pnlCharging.Name = "pnlCharging";
this.pnlCharging.Size = new System.Drawing.Size(590, 33);
this.pnlCharging.TabIndex = 6;
this.pnlCharging.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pnlCharging_MouseDown);
this.pnlCharging.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pnlCharging_MouseMove);
this.pnlCharging.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pnlCharging_MouseUp);
//
// fmGameChargingcs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(590, 192);
this.Controls.Add(this.pnlCharging);
this.Controls.Add(this.lblProgress);
this.Controls.Add(this.pbProgress);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "fmGameChargingcs";
this.Text = "Chargement du Jeu";
this.Load += new System.EventHandler(this.fmGameChargingcs_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar pbProgress;
private System.Windows.Forms.Label lblProgress;
private System.ComponentModel.BackgroundWorker backgroundWorker1;
private System.Windows.Forms.Panel pnlCharging;
}
}
\ No newline at end of file
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace _20School
{
public partial class fmGameChargingcs : Form
{
public fmGameChargingcs()
{
InitializeComponent();
}
//Coordonnés pour bouger le form avec le panel pnlMain
int mov, movX, movY;
/// <summary>
/// Paramétrage du progressBar & delais.
/// </summary>
struct DataParameter
{
public int Process;
public int Delay;
}
private DataParameter _inputparameter;
/// <summary>
/// Evènement changent au fil du temps.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
pbProgress.Value = e.ProgressPercentage;
lblProgress.Text = string.Format("Processing...{0}%", e.ProgressPercentage);
pbProgress.Update();
}
/// <summary>
/// Actions qui est fait au fil du temps.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
int process = ((DataParameter)e.Argument).Process;
int delay = ((DataParameter)e.Argument).Delay;
int index = 1;
try
{
for (int i = 0; i < process; i++)
{
if (!backgroundWorker1.CancellationPending)
{
backgroundWorker1.ReportProgress(index++ * 100 / process, string.Format("Process data {0}", i));
Thread.Sleep(delay);
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
/// <summary>
/// Actions à effectué au chargement du form fmGameCharging
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void fmGameChargingcs_Load(object sender, EventArgs e)
{
pbProgress.SetState(3);
//pbProgress.ForeColor = Color.Blue;
//pbProgress.Style = ProgressBarStyle.Continuous;
if (!backgroundWorker1.IsBusy)
{
_inputparameter.Delay = 5;
_inputparameter.Process = 1000;
backgroundWorker1.RunWorkerAsync(_inputparameter);
}
}
/// <summary>
/// Evenement permettant de déplacer la fenêtre en maintenant le click gauche de la souris.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pnlCharging_MouseMove(object sender, MouseEventArgs e)
{
if (mov == 1)
{
this.SetDesktopLocation(MousePosition.X - movX, MousePosition.Y - movY);
}
}
/// <summary>
/// Evenement permettant de déplacer la fenêtre en maintenant le click gauche de la souris.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pnlCharging_MouseUp(object sender, MouseEventArgs e)
{
mov = 0;
}
/// <summary>
/// Actions à effectuer lorsque c'est fini.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.Hide(); //Formulaire du menu caché
fmPlay formPlay = new fmPlay(); //Génération du formulaire de partie "Play"
formPlay.Show(); //Affichage du formulaire "Play"
}
/// <summary>
/// Evenement permettant de déplacer la fenêtre en maintenant le click gauche de la souris.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pnlCharging_MouseDown(object sender, MouseEventArgs e)
{
mov = 1;
movX = e.X;
movY = e.Y;
}
}
/// <summary>
/// Changement de la couleur du progressBar
/// </summary>
public static class ModifyProgressBarColor
{
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr w, IntPtr l);
public static void SetState(this ProgressBar pBar, int state)
{
SendMessage(pBar.Handle, 1040, (IntPtr)state, IntPtr.Zero);
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -55,6 +55,7 @@ namespace _20School
//
// graphRecap
//
this.graphRecap.ForeColor = System.Drawing.Color.White;
this.graphRecap.Location = new System.Drawing.Point(0, 2);
this.graphRecap.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.graphRecap.Name = "graphRecap";
......@@ -82,21 +83,21 @@ namespace _20School
this.lblGame.Location = new System.Drawing.Point(59, 30);
this.lblGame.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblGame.Name = "lblGame";
this.lblGame.Size = new System.Drawing.Size(344, 81);
this.lblGame.Size = new System.Drawing.Size(375, 81);
this.lblGame.TabIndex = 5;
this.lblGame.Text = "20School";
//
// lblWelcome
//
this.lblWelcome.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.lblWelcome.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblWelcome.BackColor = System.Drawing.Color.Transparent;
this.lblWelcome.Font = new System.Drawing.Font("Segoe UI", 24F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblWelcome.ForeColor = System.Drawing.Color.White;
this.lblWelcome.Location = new System.Drawing.Point(780, 52);
this.lblWelcome.Location = new System.Drawing.Point(758, 52);
this.lblWelcome.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWelcome.Name = "lblWelcome";
this.lblWelcome.Size = new System.Drawing.Size(540, 54);
this.lblWelcome.Size = new System.Drawing.Size(601, 54);
this.lblWelcome.TabIndex = 8;
this.lblWelcome.Text = "Graphique Recapitulatif";
//
......@@ -138,6 +139,7 @@ namespace _20School
this.btnRed.TabIndex = 8;
this.btnRed.Text = "__";
this.btnRed.UseVisualStyleBackColor = false;
this.btnRed.Click += new System.EventHandler(this.btnRed_Click);
//
// btnClose
//
......@@ -152,6 +154,7 @@ namespace _20School
this.btnClose.TabIndex = 7;
this.btnClose.Text = "X";
this.btnClose.UseVisualStyleBackColor = false;
this.btnClose.Click += new System.EventHandler(this.btnJury_Click);
//
// fmGraphFinal
//
......
......@@ -238,6 +238,16 @@ namespace _20School
Etu5.Clear();
}
/// <summary>
/// Bouton permettant de réduire la fenêtre du jeux.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnRed_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
/// <summary>
/// Procedure : Initialise les INE pour chaque élèves afin d'identifier les valeurs graphiques.
/// </summary>
......@@ -262,8 +272,5 @@ namespace _20School
fmRecap fmRecap = new fmRecap();
fmRecap.Show();
}
}
}
......@@ -4,6 +4,9 @@ using System.Data.OleDb;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace _20School
{
public partial class fmPlay : Form
......@@ -37,8 +40,7 @@ namespace _20School
public static int timerTick = 120;
public static double effortEtu;
int repetCoursParticulier = 0;
public static bool bavardageBackground = false;
public static bool bavardageBackground = false;
bool currentPause = false;
......@@ -1548,4 +1550,16 @@ namespace _20School
*/
}
}
/// <summary>
/// Changement de la couleur du progressBar
/// </summary>
public static class ModifyProgressBarColor
{
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr w, IntPtr l);
public static void SetState(this ProgressBar pBar, int state)
{
SendMessage(pBar.Handle, 1040, (IntPtr)state, IntPtr.Zero);
}
}
}
......@@ -87,7 +87,11 @@ namespace _20School
/// <param name="e"></param>
private void btnClose_Click(object sender, EventArgs e)
{
Application.Exit();
//Fermeture du formulaire actuelle et ouverture d'un nouveau
this.Hide();
Menu frmMenu = new Menu();
frmMenu.Closed += (s, args) => this.Close();
frmMenu.Show();
}
/// <summary>
......
cc0d3d311b5f48e3205c6ade40035f5d03cc1518
c05f0baaafd81bb9e925eb273c7ff410eac59d49
......@@ -54,7 +54,6 @@ C:\Users\okkes\Downloads\20schoolt3-7e98de1d4ec9bda0c475de4749d2e7f830acce4b\20S
C:\Users\okkes\Downloads\20schoolt3-7e98de1d4ec9bda0c475de4749d2e7f830acce4b\20School\obj\Debug\20School.csproj.CoreCompileInputs.cache
C:\Users\okkes\Downloads\20schoolt3-7e98de1d4ec9bda0c475de4749d2e7f830acce4b\20School\obj\Debug\20School.exe
C:\Users\okkes\Downloads\20schoolt3-7e98de1d4ec9bda0c475de4749d2e7f830acce4b\20School\obj\Debug\20School.pdb
C:\Users\okkes\Desktop\cmder\20schoolT3\20School\obj\Debug\_20School.fmGameChargingcs.resources
C:\Users\okkes\Desktop\cmder\20schoolT3\20School\obj\Debug\_20School.fmCoursParticulier.resources
C:\Users\Hugo\git\20schoolt3\20School\obj\Debug\_20School.fmGameChargingcs.resources
C:\Users\Hugo\git\20schoolt3\20School\obj\Debug\_20School.fmGraphFinal.resources
......
Supports Markdown
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