Esempio n. 1
0
        /// <summary>
        /// Nome da medalha de qualificação de reporter
        /// </summary>
        public string GetReporterQualification(RacMsg msgs)
        {
            Medal m = reporterQualification;

            if (m != null)
            {
                return(msgs.Get(m.nameMsg));
            }

            return("");
        }
Esempio n. 2
0
        /// <summary>
        /// Nome da medalha de qualificação total
        /// </summary>
        public string GetTotalQualification(RacMsg msgs)
        {
            Medal m = totalQualification;

            if (m != null)
            {
                return(msgs.Get(m.nameMsg));
            }

            return("");
        }
Esempio n. 3
0
        /// <summary>
        /// Todas as medalhas para pontos
        /// </summary>
        /// <param name="d"></param>
        /// <param name="pts"></param>
        /// <returns></returns>
        public static Medal MajorMedalForPoints(Dimension d, decimal pts)
        {
            Medal m = null;

            for (int i = 0; i < medals.Count - 1; i++)
            {
                if (medals[i].dimension == d && medals[i].requiredPoints <= pts)
                {
                    m = medals[i];
                }
            }

            return(m);
        }
Esempio n. 4
0
        /// <summary>
        /// Verifica se as medalhas estão ok
        /// </summary>
        public void CheckMedals(Medal.Dimension d)
        {
            List <Medal> lst = Medal.AllMedalsForPoints(d, GetPointNumberForDimensions(d));

            for (int i = 0; i < lst.Count; i++)
            {
                ProfileMedals pm = GetProfileMedal(lst[i].id);
                if (pm == null)
                {
                    pm          = new ProfileMedals(this);
                    pm.medalsId = lst[i].id;
                    pm.awarded  = DateTime.Now;
                    pm.Save();

                    medals.Add(pm);
                }
            }
        }
Esempio n. 5
0
 public MedalsModel(RacLib.RacMsg msgs, LibVisLib.Medal m)
 {
     Id          = m.id;
     Name        = msgs.Get(m.nameMsg);
     Description = msgs.Get(m.descriptionMsg);
 }