Exemplo n.º 1
0
        partial void ButtonRestart_TouchUpInside(UIButton sender)
        {
            LabelWinner.Text = "";
            //ButtonOne.TitleLabel.Text = "";
            ButtonOne.Enabled = true;
            ButtonOne.SetTitle("", UIControlState.Normal);
            string btnOne = ButtonOne.Title(UIControlState.Normal);

            //  ButtonTwo.TitleLabel.Text = "";
            ButtonTwo.Enabled = true;
            ButtonTwo.SetTitle("", UIControlState.Normal);
            string btnTwo = ButtonTwo.Title(UIControlState.Normal);

            // ButtonTwo.SetTitle("", UIControlState.Normal);
            // ButtonThree.TitleLabel.Text = "";
            ButtonThree.Enabled = true;
            ButtonThree.SetTitle("", UIControlState.Normal);
            string btnThree = ButtonThree.Title(UIControlState.Normal);

            //  ButtonThree.SetTitle("", UIControlState.Normal);

            // ButtonFour.TitleLabel.Text = "";
            ButtonFour.Enabled = true;
            ButtonFour.SetTitle("", UIControlState.Normal);
            string btnFour = ButtonFour.Title(UIControlState.Normal);

            // ButtonFour.SetTitle("", UIControlState.Normal);

            // ButtonFive.TitleLabel.Text = "";

            ButtonFive.SetTitle("", UIControlState.Normal);
            ButtonFive.Enabled = true;
            string btnFive = ButtonFive.Title(UIControlState.Normal);

            // ButtonSix.TitleLabel.Text = "";
            ButtonSix.Enabled = true;
            ButtonSix.SetTitle("", UIControlState.Normal);
            string btnSix = ButtonSix.Title(UIControlState.Normal);


            // ButtonSeven.TitleLabel.Text = "";
            ButtonSeven.Enabled = true;
            ButtonSeven.SetTitle("", UIControlState.Normal);
            string btnSeven = ButtonSeven.Title(UIControlState.Normal);

            //  ButtonEight.TitleLabel.Text = "";
            ButtonEight.Enabled = true;
            ButtonEight.SetTitle("", UIControlState.Normal);
            string btnEight = ButtonEight.Title(UIControlState.Normal);

            //  ButtonNine.TitleLabel.Text = "";
            ButtonNine.Enabled = true;
            ButtonNine.SetTitle("", UIControlState.Normal);
            string btnNine = ButtonNine.Title(UIControlState.Normal);

            counter = 0;
        }
Exemplo n.º 2
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     ButtonOne.SetTitle("", UIControlState.Normal);
     ButtonTwo.SetTitle("", UIControlState.Normal);
     ButtonThree.SetTitle("", UIControlState.Normal);
     ButtonFour.SetTitle("", UIControlState.Normal);
     ButtonFive.SetTitle("", UIControlState.Normal);
     ButtonSix.SetTitle("", UIControlState.Normal);
     ButtonSeven.SetTitle("", UIControlState.Normal);
     ButtonEight.SetTitle("", UIControlState.Normal);
     ButtonNine.SetTitle("", UIControlState.Normal);
     LabelWinner.Text = "";
     // Perform any additional setup after loading the view, typically from a nib.
 }
Exemplo n.º 3
0
        partial void ButtonFour_TouchUpInside(UIButton sender)
        {
            if (counter == 0)
            {
                ButtonFour.SetTitle("X", UIControlState.Normal);
                ButtonFour.SetTitleColor(UIColor.Black, UIControlState.Normal);
                LabelTurn.Text = "Turn X";
                counter++;
            }
            else if (counter == 1)
            {
                ButtonFour.SetTitle("O", UIControlState.Normal);
                ButtonFour.SetTitleColor(UIColor.Black, UIControlState.Normal);
                LabelTurn.Text = "Turn O";
                counter--;
            }

            ButtonFour.Enabled = false;


            checkit();
        }