Ejemplo n.º 1
0
 private void Redimentionner_Vaisseau(int x, int y)
 {
     if (_VaisseauConteneur.InvokeRequired)
     {
         MAJIntIntdel a = new MAJIntIntdel(Redimentionner_Vaisseau);
         _VaisseauConteneur.Invoke(a, new object[] { x, y });
     }
     else
     {
         _VaisseauConteneur.Size = new Size(x, y);
     }
 }
Ejemplo n.º 2
0
        /****************************************
        *
        *              Delegate
        *
        ****************************************/

        private void ChangerTailleBalle(int x, int y)
        {
            if (_balleConteneur.InvokeRequired)
            {
                MAJIntIntdel a = new MAJIntIntdel(ChangerTailleBalle);
                _balleConteneur.Invoke(a, new object[] { x, y });
            }
            else
            {
                _balleConteneur.Size = new Size(x, y);
            }
        }
Ejemplo n.º 3
0
 private void DeplacerBalle(int x, int y)
 {
     try
     {
         if (_balleConteneur.InvokeRequired)
         {
             MAJIntIntdel a = new MAJIntIntdel(DeplacerBalle);
             _balleConteneur.Invoke(a, new object[] { x, y });
         }
         else
         {
             _balleConteneur.Location = new Point(x, y);
         }
     }
     catch (Exception err) { Console.WriteLine(err.ToString()); }
 }
Ejemplo n.º 4
0
        private void Deplacer_Vaisseau(int x, int y)
        {
            if (_VaisseauConteneur.InvokeRequired)
            {
                MAJIntIntdel a = new MAJIntIntdel(Deplacer_Vaisseau);
                _VaisseauConteneur.Invoke(a, new object[] { x, y });
            }
            else
            {
                _VaisseauConteneur.Location = new Point(x, y);

                if (ReseauActif)
                {
                    _com.Envoyer_DEPLACER(Convert.ToInt32(_x), Convert.ToInt32(_y));
                }
            }
        }