/// <summary> /// 두 시간이 겹치는지 검사한다 /// </summary> /// <param name="target">검사할 대상</param> /// <returns></returns> public bool IsOverlapping(ClassTimeItem target) { if (this.End <= target.Start || target.End <= this.Start) { return(true); } return(false); }
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); }