Ejemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            //this will be called whenever whenever the generate button is pressed
            //It will trigger the testing of the user input
            this.btnGenerate.TouchUpInside += delegate {
                string user_input = this.txtfieldLetters.Text;
                int blank_tiles = 0;
                if(this.txtviewTiles.HasText == true){
                    blank_tiles = Convert.ToInt32(this.txtviewTiles.Text);
                }
                Dictionary dictonary = new Dictionary (user_input, blank_tiles);
                dictonary.Test_Input();
                this.txtviewResults.Text = dictonary.Output_Words();
                dictonary.Reset();
                this.txtviewResults.EndEditing(true);
                this.txtfieldLetters.ResignFirstResponder();
                this.txtviewTiles.ResignFirstResponder();
            };
        }