Exemplo n.º 1
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.LevelSix = ((GameLabNumber2.Level6)(target));
         return;
     }
     this._contentLoaded = true;
 }
Exemplo n.º 2
0
        private void answerButton_Click(object sender, RoutedEventArgs e)
        {
            if (tbAnswer.Text == "")
            {
                tbAnswer.Clear();
            }
            string[] str  = tbAnswer.Text.Split(' ');
            string   str0 = str[0];
            string   str1 = str[1];

            switch (str0)
            {
            case "1":
                if (str[1] == "4")
                {
                    count++;
                    logLabel.Content = logLabel.Content + "1 = Правильно";
                }
                break;

            case "2":
                if (str[1] == "7")
                {
                    count++;
                    logLabel.Content = logLabel.Content + "2 = Правильно";
                }
                break;
            }
            if (count == 2)
            {
                Level6 lvl6 = new Level6();
                lvl6.Show();
                LevelFive.Close();
            }
            tbAnswer.Clear();
        }