Esempio n. 1
0
        private void BoxContainer2_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Player 2 info
            char2 = logik.CreateDragonballChar(boxContainer2.SelectedValue.ToString());
            labelName2.Content       = "Name: " + char2.CharName;
            labelPowerLevel2.Content = "Power Level: " + char2.PowerLevel;
            labelHealth2.Content     = "Health: " + char2.Health;
            labelEnergy2.Content     = "Energy: " + char2.Energy;

            labelmg2.Source = logik.ConvertByteArrayToBitmap(char2.Img);
            selected2       = true;
        }
Esempio n. 2
0
        private void BoxContainer_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Player 1 info
            char1                   = logik.CreateDragonballChar(boxContainer.SelectedValue.ToString());
            labelName.Content       = "Name: " + char1.CharName;
            labelPowerLevel.Content = "Power Level: " + char1.PowerLevel;
            labelHealth.Content     = "Health: " + char1.Health;
            labelEnergy.Content     = "Energy: " + char1.Energy;

            // Set the Image with the Bitmap
            labelmg.Source = logik.ConvertByteArrayToBitmap(char1.Img);
            selected1      = true;
        }
Esempio n. 3
0
        public void PlayerSelection(string charName1, string charName2)
        {
            DragonballCharacter player1 = CreateDragonballChar(charName1);
            DragonballCharacter player2 = CreateDragonballChar(charName2);

            string       file_name = "C:\\Users\\rene2756\\Desktop\\ArenaBallText\\PlayerChoice.txt";
            StreamWriter objWriter;

            objWriter = new StreamWriter(file_name);

            objWriter.WriteLine(player1.CharName);
            objWriter.WriteLine(player2.CharName);
            objWriter.Close();
        }