コード例 #1
0
        /// <summary>
        /// Change the color of the winning positions and display line.
        /// </summary>
        /// <param name="color">Winning position colors</param>
        /// <param name="other_color">Other color.</param>
        void SetThreeSymbol(UIColor color, UIColor other_color)
        {
            SetAllSymbol(other_color);

            for (int i = 0; i < 8; i++)
            {
                if (DetectWinner(TicBoard, i))
                {
                    getButtonFrom(Direction[i, 0]).TintColor = color;
                    getButtonFrom(Direction[i, 1]).TintColor = color;
                    getButtonFrom(Direction[i, 2]).TintColor = color;
                    Bcover.SetImage(UIImage.FromFile(lineImage [i]), UIControlState.Normal);
                    break;
                }
            }
        }
コード例 #2
0
 void ReleaseDesignerOutlets()
 {
     if (Bcover != null)
     {
         Bcover.Dispose();
         Bcover = null;
     }
     if (Beight != null)
     {
         Beight.Dispose();
         Beight = null;
     }
     if (Bfive != null)
     {
         Bfive.Dispose();
         Bfive = null;
     }
     if (Bfour != null)
     {
         Bfour.Dispose();
         Bfour = null;
     }
     if (Bnine != null)
     {
         Bnine.Dispose();
         Bnine = null;
     }
     if (Bone != null)
     {
         Bone.Dispose();
         Bone = null;
     }
     if (BQuitGame != null)
     {
         BQuitGame.Dispose();
         BQuitGame = null;
     }
     if (Bseven != null)
     {
         Bseven.Dispose();
         Bseven = null;
     }
     if (Bsix != null)
     {
         Bsix.Dispose();
         Bsix = null;
     }
     if (Bthree != null)
     {
         Bthree.Dispose();
         Bthree = null;
     }
     if (Btwo != null)
     {
         Btwo.Dispose();
         Btwo = null;
     }
     if (FirstLabel != null)
     {
         FirstLabel.Dispose();
         FirstLabel = null;
     }
     if (FirstLabel2 != null)
     {
         FirstLabel2.Dispose();
         FirstLabel2 = null;
     }
     if (FirstPiece != null)
     {
         FirstPiece.Dispose();
         FirstPiece = null;
     }
     if (OutputLabel != null)
     {
         OutputLabel.Dispose();
         OutputLabel = null;
     }
     if (PlayView != null)
     {
         PlayView.Dispose();
         PlayView = null;
     }
     if (SecondLabel != null)
     {
         SecondLabel.Dispose();
         SecondLabel = null;
     }
     if (SecondLabel2 != null)
     {
         SecondLabel2.Dispose();
         SecondLabel2 = null;
     }
     if (SecondPiece != null)
     {
         SecondPiece.Dispose();
         SecondPiece = null;
     }
     if (StatusLabel != null)
     {
         StatusLabel.Dispose();
         StatusLabel = null;
     }
 }