private LastMatchData ParseLastMatchDataNode(XmlNode lastMatchDataNode)
        {
            try {
                LastMatchData lastMatchData = new LastMatchData();

                foreach (XmlNode xmlNode in lastMatchDataNode.ChildNodes) {
                    switch (xmlNode.Name) {
                        case Tags.Date:
                            lastMatchData.dateField = Convert.ToDateTime(xmlNode.InnerText);
                            break;
                        case Tags.MatchId:
                            lastMatchData.matchIdField = Convert.ToInt32(xmlNode.InnerText);
                            break;
                        case Tags.PositionCode:
                            lastMatchData.roleField = (Role)Convert.ToInt32(xmlNode.InnerText);
                            break;
                        case Tags.Rating:
                            lastMatchData.ratingField = Convert.ToDouble(xmlNode.InnerText);
                            break;
                        case Tags.RatingEndOfGame:
                            lastMatchData.ratingEndOfGameField = Convert.ToDouble(xmlNode.InnerText);
                            break;
                        case Tags.PlayedMatches:
                            lastMatchData.minutesPlayedField = Convert.ToInt32(xmlNode.InnerText);
                            break;
                    }
                }

                return lastMatchData;
            } catch (Exception ex) {
                throw ex;
            }
        }
Esempio n. 2
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();
 }
Esempio n. 3
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();
 }