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("추가되었습니다!"); }
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); }
public ClassInfo(string name, int division, ClassTime time, string professor, int credit) : this(name, division, time) { Professor = professor; Credit = credit; }
public ClassInfo(string name, int division, ClassTime time) : this() { Name = name; Division = division; Time = time; }
public ClassInfo() { _id = instanceCount++; Time = new ClassTime(); }