Exemple #1
0
 void ReleaseDesignerOutlets()
 {
     if (AttackButton != null)
     {
         AttackButton.Dispose();
         AttackButton = null;
     }
     if (EnemyDamageLabel != null)
     {
         EnemyDamageLabel.Dispose();
         EnemyDamageLabel = null;
     }
     if (EnemyHealthLabel != null)
     {
         EnemyHealthLabel.Dispose();
         EnemyHealthLabel = null;
     }
     if (RemainingRoundsLabel != null)
     {
         RemainingRoundsLabel.Dispose();
         RemainingRoundsLabel = null;
     }
     if (RemainingRunsLabel != null)
     {
         RemainingRunsLabel.Dispose();
         RemainingRunsLabel = null;
     }
     if (RunButton != null)
     {
         RunButton.Dispose();
         RunButton = null;
     }
     if (UserDamageLabel != null)
     {
         UserDamageLabel.Dispose();
         UserDamageLabel = null;
     }
     if (UserHealthLabel != null)
     {
         UserHealthLabel.Dispose();
         UserHealthLabel = null;
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (MainLabel != null)
            {
                MainLabel.Dispose();
                MainLabel = null;
            }

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

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

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

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

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