Beispiel #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 public Player()
 {
     playerIdField         = 0;
     firstNameField        = string.Empty;
     nickNameField         = string.Empty;
     lastNameField         = string.Empty;
     playerNumberField     = 0;
     ageField              = 0;
     ageDaysField          = 0;
     tsiField              = 0;
     playerFormField       = PlayerForm.Unavailable;
     statementField        = string.Empty;
     experienceField       = PlayerSkill.Unavailable;
     leadershipField       = Leadership.Unavailable;
     salaryField           = 0;
     isAbroadField         = false;
     agreeabilityField     = Agreeability.Unavailable;
     aggressivenessField   = Aggressiveness.Unavailable;
     honestyField          = Honesty.Unavailable;
     leagueGoalsField      = 0;
     cupGoalsField         = 0;
     friendliesGoalsField  = 0;
     careerGoalsField      = 0;
     careerHattricksField  = 0;
     specialtyField        = PlayerSpecialty.NoSpecialty;
     transferlistedField   = false;
     nationalTeamIdField   = 0;
     countryIdField        = 0;
     leagueIdField         = 0;
     capsField             = 0;
     capsU20Field          = 0;
     cardsField            = 0;
     injuryLevelField      = 0;
     motherClubField       = false;
     loyaltyField          = PlayerSkill.Unavailable;
     staminaSkillField     = PlayerSkill.Unavailable;
     keeperSkillField      = PlayerSkill.Unavailable;
     playmakerSkillField   = PlayerSkill.Unavailable;
     scorerSkillField      = PlayerSkill.Unavailable;
     passingSkillField     = PlayerSkill.Unavailable;
     wingerSkillField      = PlayerSkill.Unavailable;
     defenderSkillField    = PlayerSkill.Unavailable;
     setPiecesSkillField   = PlayerSkill.Unavailable;
     trainerDataField      = new TrainerData();
     lastMatchField        = new LastMatchData();
     playerCategoryIdField = PlayerCategory.NoCategorySet;
     internalDataField     = new Internal.PlayersInternal();
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public Player()
 {
     playerIdField = 0;
     firstNameField = string.Empty;
     nickNameField = string.Empty;
     lastNameField = string.Empty;
     playerNumberField = 0;
     ageField = 0;
     ageDaysField = 0;
     tsiField = 0;
     playerFormField = PlayerForm.Unavailable;
     statementField = string.Empty;
     experienceField = PlayerSkill.Unavailable;
     leadershipField = Leadership.Unavailable;
     salaryField = 0;
     isAbroadField = false;
     agreeabilityField = Agreeability.Unavailable;
     aggressivenessField = Aggressiveness.Unavailable;
     honestyField = Honesty.Unavailable;
     leagueGoalsField = 0;
     cupGoalsField = 0;
     friendliesGoalsField = 0;
     careerGoalsField = 0;
     careerHattricksField = 0;
     specialtyField = PlayerSpecialty.NoSpecialty;
     transferlistedField = false;
     nationalTeamIdField = 0;
     countryIdField = 0;
     leagueIdField = 0;
     capsField = 0;
     capsU20Field = 0;
     cardsField = 0;
     injuryLevelField = 0;
     motherClubField = false;
     loyaltyField = PlayerSkill.Unavailable;
     staminaSkillField = PlayerSkill.Unavailable;
     keeperSkillField = PlayerSkill.Unavailable;
     playmakerSkillField = PlayerSkill.Unavailable;
     scorerSkillField = PlayerSkill.Unavailable;
     passingSkillField = PlayerSkill.Unavailable;
     wingerSkillField = PlayerSkill.Unavailable;
     defenderSkillField = PlayerSkill.Unavailable;
     setPiecesSkillField = PlayerSkill.Unavailable;
     trainerDataField = new TrainerData();
     lastMatchField = new LastMatchData();
     playerCategoryIdField = PlayerCategory.NoCategorySet;
     internalDataField = new Internal.PlayersInternal();
 }
        private TrainerData ParseTrainerDataNode(XmlNode trainerDataNode)
        {
            try {
                TrainerData trainerData = new TrainerData();

                foreach (XmlNode xmlNode in trainerDataNode.ChildNodes) {
                    switch (xmlNode.Name) {
                        case Tags.TrainerType: {
                                trainerData.trainerTypeField = (TrainerType)Convert.ToInt32(xmlNode.InnerText);
                                break;
                            }
                        case Tags.TrainerSkill: {
                                trainerData.trainerSkillField = GenericFunctions.ConvertStringToByte(xmlNode.InnerText);
                                break;
                            }
                    }
                }

                return trainerData;
            } catch (Exception ex) {
                throw ex;
            }
        }