Esempio n. 1
0
        public TimeSpan GetTimeSpan()
        {
            var date      = DateTime.Parse(Date);
            var startDate = TimeBegin.AsTimeOfDay().ToDateTime(date);
            var endDate   = TimeEnd.AsTimeOfDay().ToDateTime(date);

            return(endDate - startDate);
        }
        public virtual XmlElement GenerateXmlElement(XmlDocument doc)
        {
            var node = doc.CreateElement("Transition");

            node.SetAttribute("Kind", Kind.ToString());
            node.SetAttribute("TimeBegin", TimeBegin.ToString());
            node.SetAttribute("TimeLength", TimeLength.ToString());
            return(node);
        }