private void UpdateTrainerImage()
        {
            BitmapSource trainerImage = PokeManager.TrainerImage;

            if (gameSave.GameType == GameTypes.Ruby || gameSave.GameType == GameTypes.Sapphire)
            {
                trainerImage = ResourceDatabase.GetImageFromName("RubySapphire" + trainerGender.ToString());
            }
            else if (gameSave.GameType == GameTypes.Emerald)
            {
                trainerImage = ResourceDatabase.GetImageFromName("Emerald" + trainerGender.ToString());
            }
            else if (gameSave.GameType == GameTypes.FireRed || gameSave.GameType == GameTypes.LeafGreen)
            {
                trainerImage = ResourceDatabase.GetImageFromName("FireRedLeafGreen" + trainerGender.ToString());
            }
            else if (gameSave.GameType == GameTypes.Colosseum)
            {
                trainerImage = ResourceDatabase.GetImageFromName("ColosseumMale");
            }
            else if (gameSave.GameType == GameTypes.XD)
            {
                trainerImage = ResourceDatabase.GetImageFromName("XDMale");
            }
            imageTrainer.Width  = Math.Min(90, trainerImage.PixelWidth);
            imageTrainer.Height = Math.Min(138, trainerImage.PixelHeight);
            imageTrainer.Source = trainerImage;
        }
Example #2
0
 public string GenderTranslation()
 {
     if (genderTranslation.ContainsKey(LangSys.activeLang))
     {
         return(genderTranslation[LangSys.activeLang][(int)gender]);
     }
     return(gender.ToString());
 }
Example #3
0
        /// <summary>
        /// Returns a string with character's Name, gender, race, and description
        /// </summary>
        /// <returns></returns>
        virtual public string FullDescription()
        {
            string output = "";

            output = string.Format("{0} is a {1} {2}. {3}", _name, _gender.ToString().ToLower(), _race.ToString().ToLower(), _description);

            return(output);
        }
Example #4
0
        private void RefreshTrainer()
        {
            string[] maleTrainers   = { "Youngster", "Bug Catcher", "Rich Boy", "Camper", "Cooltrainer" };
            string[] femaleTrainers = { "Lass", "School Kid", "Lady", "Picnicker", "Cooltrainer" };

            for (int i = 0; i < 5; i++)
            {
                ((ComboBoxItem)comboBoxTrainer.Items[i]).Content = (newGender == Genders.Male ? maleTrainers[i] : femaleTrainers[i]);
            }

            imageTrainer.Source = ResourceDatabase.GetImageFromName(newGender.ToString() + "SecretBaseLarge" + (((int)newTrainerID % 256) % 5).ToString());
        }
Example #5
0
 public Person(String personName, DateTime? dateOfBorn, DateTime? dateOfDeath,
   Genders gender,  String notes,int id=-1,string pathToPhoto = null,int genLayer=0)
 {
     NameOfPerson = personName;
       DateOfBorn = dateOfBorn;
       DateOfDeath = dateOfDeath;
       Gender = gender;
       GenLayer = genLayer;
       Note = notes;
       PathToPhoto = pathToPhoto;
       if (id == -1)
       ID = (NameOfPerson + dateOfBorn.ToString() + gender.ToString() + Note.ToString()).GetHashCode();
       else
       ID = id;
 }
Example #6
0
 public Person(String personName, DateTime?dateOfBorn, DateTime?dateOfDeath,
               Genders gender, String notes, int id = -1, string pathToPhoto = null, int genLayer = 0)
 {
     NameOfPerson = personName;
     DateOfBorn   = dateOfBorn;
     DateOfDeath  = dateOfDeath;
     Gender       = gender;
     GenLayer     = genLayer;
     Note         = notes;
     PathToPhoto  = pathToPhoto;
     if (id == -1)
     {
         ID = (NameOfPerson + dateOfBorn.ToString() + gender.ToString() + Note.ToString()).GetHashCode();
     }
     else
     {
         ID = id;
     }
 }
 public void Write()
 {
     Console.WriteLine("Name: {0}, Age: {1}, Gender: {2}", Name, Age, Gender.ToString());
 }
Example #8
0
        public override string ToString()
        {
            string data = $"Name:{name} , BirthDay: {birthDate.ToString()}, Gender: {gender.ToString()}";

            return(data);
        }
Example #9
0
 public override string ToString()
 {
     return($"Name: {Name}, Date of Birth: {BirthDate.ToShortDateString()}, Gender: { gender.ToString()}");
 }
 private void OnFemaleGenderClicked(object sender, RoutedEventArgs e)
 {
     radioButtonMale.IsChecked   = false;
     radioButtonFemale.IsChecked = true;
     trainerGender = Genders.Female;
     if (PokeManager.CustomTrainerImage == null)
     {
         BitmapSource trainerImage = ResourceDatabase.GetImageFromName("Manager" + trainerGender.ToString());
         imageTrainer.Width  = Math.Min(90, trainerImage.PixelWidth);
         imageTrainer.Height = Math.Min(138, trainerImage.PixelHeight);
         imageTrainer.Source = trainerImage;
     }
 }
Example #11
0
        public override string ToString()
        {
            string returnVal = _firstName + _lastName + _age.ToString() + _gender.ToString();

            return(returnVal);
        }
Example #12
0
 public static string ToFriendlyString(this Genders g)
 {
     return(g.ToString().Hyphenate());
 }
Example #13
0
 public override string ToString()
 {
     return("\n Firstname: " + _firstName + "\n Lastname: " + _lastName + "\n Age: " + _age + "\n Gender: " + _gender.ToString());
 }