Пример #1
0
        private void PartieCampagne_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
        {
            //TODO:: problems HERE too!!!!!!
            FonctionsNatives.releaseVisiteurs();
            FonctionsNatives.libererOpenGL();
            //FonctionsNatives.reinitialiser();

            Program.menuPrincipal.Show();
            this.Dispose();
        }
Пример #2
0
 ////////////////////////////////////////////////////////////////////////
 ///
 /// @fn private void PartieRapide_FormClosing(object sender, EventArgs e)
 /// @brief Evenement lorsqu'on ferme la form PartieRapide.
 /// @param[in] sender : Objet duquel provient un evenement.
 /// @param[in] e : evenement qui lance la fonction.
 /// @return Aucune.
 ///
 ////////////////////////////////////////////////////////////////////////
 private void PartieRapide_FormClosing(object sender, FormClosingEventArgs e)
 {
     FonctionsNatives.arreterToutSons();
     lock (Program.unLock)
     {
         FonctionsNatives.libererOpenGL();
         Program.peutAfficher = false;
         Program.tempBool     = false;
     }
     Program.myCustomConsole.Hide();
 }
Пример #3
0
        public void MettreAJour(double tempsInterAffichage)
        {
            try
            {
                if (isActive)
                {
                    FonctionsNatives.redimensionnerFenetre(panel2.Width, panel2.Height);
                }
                this.Invoke((MethodInvoker) delegate
                {
                    //si la zone est réussi
                    if (FonctionsNatives.victoire() == 1)
                    {
                        this.DialogResult = DialogResult.OK;
                        FonctionsNatives.desactiverSon();
                        FonctionsNatives.libererOpenGL();
                        isActive = false;
                        this.Close();
                    }
                    //si la zone est échoué
                    else if (FonctionsNatives.gameOver() == 1)
                    {
                        this.DialogResult = DialogResult.No;
                        FonctionsNatives.desactiverSon();
                        FonctionsNatives.libererOpenGL();
                        isActive = false;
                        this.Close();
                    }


                    if (!pause)
                    {
                        FonctionsNatives.animer(tempsInterAffichage);
                    }
                    FonctionsNatives.dessinerOpenGL();
                });
            }
            catch (Exception)
            {
            }
        }
Пример #4
0
 /// <summary>
 /// Cette méthode libre la zone présentement  utilisée
 ///
 /// </summary>
 private void libererZoneActuel()
 {
     FonctionsNatives.libererOpenGL();
     // FonctionsNatives.reinitialiser();
     InitialiserAnimation();
 }