Пример #1
0
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            ClassTime time = hello.GetClassTime();

            string name      = classinfoinput.name.Text;
            string credit    = classinfoinput.credit.Text;
            string professor = classinfoinput.professor.Text;
            string division  = classinfoinput.division.Text;

            new ClassInfo(name, Int32.Parse(division), time, professor, Int32.Parse(credit));
            MessageBox.Show("추가되었습니다!");
        }
Пример #2
0
        private ClassTime ParseTime(XmlNode node)
        {
            ClassTime result = new ClassTime();

            foreach (XmlNode timepart in node.ChildNodes)
            {
                var attr = timepart.Attributes;

                ClassTimeItem timeitem = new ClassTimeItem(
                    ClassTimeItem.ConvertDayBack(attr.GetNamedItem("day").Value),
                    ConvertTime(attr.GetNamedItem("fr").Value),
                    ConvertTime(attr.GetNamedItem("to").Value)
                    );

                result.Items.Add(timeitem);
            }


            return(result);
        }
Пример #3
0
 public ClassInfo(string name, int division, ClassTime time, string professor, int credit) : this(name, division, time)
 {
     Professor = professor;
     Credit    = credit;
 }
Пример #4
0
 public ClassInfo(string name, int division, ClassTime time) : this()
 {
     Name     = name;
     Division = division;
     Time     = time;
 }
Пример #5
0
 public ClassInfo()
 {
     _id  = instanceCount++;
     Time = new ClassTime();
 }