Accueil quit V1
This commit is contained in:
		@@ -49,10 +49,9 @@ namespace COURS01
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        private void btnEntrez_Click(object sender, EventArgs e)
 | 
					        private void btnEntrez_Click(object sender, EventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            EcranPrincipal f = new EcranPrincipal();
 | 
					            EcranPrincipal f = new EcranPrincipal(this);
 | 
				
			||||||
            this.Hide();
 | 
					            this.Hide();
 | 
				
			||||||
            f.ShowDialog();//Bloque la fenetre parrent alors que show ne bloque pas le parent
 | 
					            f.ShowDialog();//Bloque la fenetre parrent alors que show ne bloque pas le parent
 | 
				
			||||||
            this.Show();
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										37
									
								
								COURS01/FPrincipal.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										37
									
								
								COURS01/FPrincipal.Designer.cs
									
									
									
										generated
									
									
									
								
							@@ -30,11 +30,11 @@
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
 | 
					            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
 | 
				
			||||||
            this.mFenetre = new System.Windows.Forms.ToolStripMenuItem();
 | 
					            this.mFenetre = new System.Windows.Forms.ToolStripMenuItem();
 | 
				
			||||||
            this.mAide = new System.Windows.Forms.ToolStripMenuItem();
 | 
					 | 
				
			||||||
            this.mQuitter = new System.Windows.Forms.ToolStripMenuItem();
 | 
					 | 
				
			||||||
            this.mfProgression = new System.Windows.Forms.ToolStripMenuItem();
 | 
					            this.mfProgression = new System.Windows.Forms.ToolStripMenuItem();
 | 
				
			||||||
            this.mfListe = new System.Windows.Forms.ToolStripMenuItem();
 | 
					            this.mfListe = new System.Windows.Forms.ToolStripMenuItem();
 | 
				
			||||||
            this.mfEditeur = new System.Windows.Forms.ToolStripMenuItem();
 | 
					            this.mfEditeur = new System.Windows.Forms.ToolStripMenuItem();
 | 
				
			||||||
 | 
					            this.mAide = new System.Windows.Forms.ToolStripMenuItem();
 | 
				
			||||||
 | 
					            this.mQuitter = new System.Windows.Forms.ToolStripMenuItem();
 | 
				
			||||||
            this.menuStrip1.SuspendLayout();
 | 
					            this.menuStrip1.SuspendLayout();
 | 
				
			||||||
            this.SuspendLayout();
 | 
					            this.SuspendLayout();
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@@ -60,22 +60,6 @@
 | 
				
			|||||||
            this.mFenetre.Size = new System.Drawing.Size(58, 20);
 | 
					            this.mFenetre.Size = new System.Drawing.Size(58, 20);
 | 
				
			||||||
            this.mFenetre.Text = "Fenêtre";
 | 
					            this.mFenetre.Text = "Fenêtre";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // mAide
 | 
					 | 
				
			||||||
            // 
 | 
					 | 
				
			||||||
            this.mAide.Name = "mAide";
 | 
					 | 
				
			||||||
            this.mAide.ShortcutKeys = System.Windows.Forms.Keys.F1;
 | 
					 | 
				
			||||||
            this.mAide.Size = new System.Drawing.Size(43, 20);
 | 
					 | 
				
			||||||
            this.mAide.Text = "Aide";
 | 
					 | 
				
			||||||
            this.mAide.Click += new System.EventHandler(this.mNDef_Click);
 | 
					 | 
				
			||||||
            // 
 | 
					 | 
				
			||||||
            // mQuitter
 | 
					 | 
				
			||||||
            // 
 | 
					 | 
				
			||||||
            this.mQuitter.Name = "mQuitter";
 | 
					 | 
				
			||||||
            this.mQuitter.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
 | 
					 | 
				
			||||||
            this.mQuitter.Size = new System.Drawing.Size(56, 20);
 | 
					 | 
				
			||||||
            this.mQuitter.Text = "Quitter";
 | 
					 | 
				
			||||||
            this.mQuitter.Click += new System.EventHandler(this.mQuitter_Click);
 | 
					 | 
				
			||||||
            // 
 | 
					 | 
				
			||||||
            // mfProgression
 | 
					            // mfProgression
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.mfProgression.Name = "mfProgression";
 | 
					            this.mfProgression.Name = "mfProgression";
 | 
				
			||||||
@@ -97,6 +81,22 @@
 | 
				
			|||||||
            this.mfEditeur.Text = "Editeur";
 | 
					            this.mfEditeur.Text = "Editeur";
 | 
				
			||||||
            this.mfEditeur.Click += new System.EventHandler(this.mNDef_Click);
 | 
					            this.mfEditeur.Click += new System.EventHandler(this.mNDef_Click);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
 | 
					            // mAide
 | 
				
			||||||
 | 
					            // 
 | 
				
			||||||
 | 
					            this.mAide.Name = "mAide";
 | 
				
			||||||
 | 
					            this.mAide.ShortcutKeys = System.Windows.Forms.Keys.F1;
 | 
				
			||||||
 | 
					            this.mAide.Size = new System.Drawing.Size(43, 20);
 | 
				
			||||||
 | 
					            this.mAide.Text = "Aide";
 | 
				
			||||||
 | 
					            this.mAide.Click += new System.EventHandler(this.mNDef_Click);
 | 
				
			||||||
 | 
					            // 
 | 
				
			||||||
 | 
					            // mQuitter
 | 
				
			||||||
 | 
					            // 
 | 
				
			||||||
 | 
					            this.mQuitter.Name = "mQuitter";
 | 
				
			||||||
 | 
					            this.mQuitter.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
 | 
				
			||||||
 | 
					            this.mQuitter.Size = new System.Drawing.Size(56, 20);
 | 
				
			||||||
 | 
					            this.mQuitter.Text = "Quitter";
 | 
				
			||||||
 | 
					            this.mQuitter.Click += new System.EventHandler(this.mQuitter_Click);
 | 
				
			||||||
 | 
					            // 
 | 
				
			||||||
            // EcranPrincipal
 | 
					            // EcranPrincipal
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
 | 
					            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
 | 
				
			||||||
@@ -109,6 +109,7 @@
 | 
				
			|||||||
            this.MinimizeBox = false;
 | 
					            this.MinimizeBox = false;
 | 
				
			||||||
            this.Name = "EcranPrincipal";
 | 
					            this.Name = "EcranPrincipal";
 | 
				
			||||||
            this.Text = "Ecran Principal";
 | 
					            this.Text = "Ecran Principal";
 | 
				
			||||||
 | 
					            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.mQuitter_Click);
 | 
				
			||||||
            this.menuStrip1.ResumeLayout(false);
 | 
					            this.menuStrip1.ResumeLayout(false);
 | 
				
			||||||
            this.menuStrip1.PerformLayout();
 | 
					            this.menuStrip1.PerformLayout();
 | 
				
			||||||
            this.ResumeLayout(false);
 | 
					            this.ResumeLayout(false);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,15 +12,47 @@ namespace COURS01
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    public partial class EcranPrincipal : Form
 | 
					    public partial class EcranPrincipal : Form
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        Form parentToClose;
 | 
				
			||||||
 | 
					        bool parentToCloseF;
 | 
				
			||||||
        public EcranPrincipal()
 | 
					        public EcranPrincipal()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            parentToCloseF = false;
 | 
				
			||||||
            InitializeComponent();
 | 
					            InitializeComponent();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        public EcranPrincipal(Form parentToClose)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            parentToCloseF = true;
 | 
				
			||||||
 | 
					            InitializeComponent();
 | 
				
			||||||
 | 
					            this.parentToClose = parentToClose;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        private void mQuitter_Click(object sender, EventArgs e)
 | 
					        private void mQuitter_Click(object sender, EventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Close();
 | 
					            if(parentToCloseF)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                parentToClose.Close();
 | 
				
			||||||
 | 
					                if (parentToClose.IsDisposed)
 | 
				
			||||||
 | 
					                    Close();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					                Close();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void mQuitter_Click(object sender, FormClosingEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (parentToCloseF)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                parentToClose.Close();
 | 
				
			||||||
 | 
					                if (parentToClose.IsDisposed)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    e.Cancel = false;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                    e.Cancel = true;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					                e.Cancel = false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private void mNDef_Click(object sender, EventArgs e)
 | 
					        private void mNDef_Click(object sender, EventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            MessageBox.Show("Fonctionnalité non implémentée");
 | 
					            MessageBox.Show("Fonctionnalité non implémentée");
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user