Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LevelTwo = ((MiniGame.Level2)(target));
                return;

            case 2:
                this.gMain = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.AskLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.AnswerBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.ErrorLabel = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            rndNumber = rnd.Next(10, 99);
            string sym = rndNumber.ToString();

            if (sym[0] == sym[1])
            {
                timer.Stop();
                Level2 lvl2 = new Level2();
                lvl2.Show();
                Level1.Close();
            }
        }