void ReleaseDesignerOutlets()
        {
            if (Player1 != null)
            {
                Player1.Dispose();
                Player1 = null;
            }

            if (Player2 != null)
            {
                Player2.Dispose();
                Player2 = null;
            }

            if (Player3 != null)
            {
                Player3.Dispose();
                Player3 = null;
            }

            if (Player4 != null)
            {
                Player4.Dispose();
                Player4 = null;
            }

            if (PlayerCount != null)
            {
                PlayerCount.Dispose();
                PlayerCount = null;
            }
        }
Ejemplo n.º 2
0
 void OnDispose(object sender, EventArgs e)
 {
     Release();
     try
     {
         Player1.Dispose();
         Player2.Dispose();
         Player3.Dispose();
         Player4.Dispose();
     }
     catch
     {
     }
     base.Dispose();
 }