Exemplo n.º 1
0
        private void AddSubjects()
        {
            int start = (int )Type;
            int count = 0;

            if (Type == Profile.ProfileType.MBA_Student)
            {
                count = MBASubject.COUNT;
            }
            else if (Type == Profile.ProfileType.School_Student)
            {
                count = SkSubject.COUNT;
            }

            for (int i = 0; i < count; i++)
            {
                int indSub = start + i;
                Subject s = new Subject((eSubject)indSub);
                s.PropertyChanged += subject_PropertyChanged;
                Subjects.Add(s);
            }
        }
Exemplo n.º 2
0
        public static Subject ReadSubject(XElement ele)
        {
            Subject sub = new Subject((eSubject)int.Parse(ele.Element("ID").Value));
            sub.dPerformance=int.Parse(ele.Element("Performance").Value);
            sub.Duration = int.Parse(ele.Element("Duration").Value);
            //sub.SetId(int.Parse(ele.Element("ID").Value));
            sub.MaxScore = int.Parse(ele.Element("MaxScore").Value);
            sub.Score = int.Parse(ele.Element("Score").Value);
            sub.SetName( ele.Element("Name").Value);

            return sub;
        }