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; }
public string GenderTranslation() { if (genderTranslation.ContainsKey(LangSys.activeLang)) { return(genderTranslation[LangSys.activeLang][(int)gender]); } return(gender.ToString()); }
/// <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); }
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()); }
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 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()); }
public override string ToString() { string data = $"Name:{name} , BirthDay: {birthDate.ToString()}, Gender: {gender.ToString()}"; return(data); }
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; } }
public override string ToString() { string returnVal = _firstName + _lastName + _age.ToString() + _gender.ToString(); return(returnVal); }
public static string ToFriendlyString(this Genders g) { return(g.ToString().Hyphenate()); }
public override string ToString() { return("\n Firstname: " + _firstName + "\n Lastname: " + _lastName + "\n Age: " + _age + "\n Gender: " + _gender.ToString()); }