Example #1
0
        public bool WriteXML(XmlWriter xmlWriter, int addhours)
        {
            xmlWriter.WriteStartElement("programme");
            xmlWriter.WriteAttributeString("start", GetTimeString(Start.AddHours(addhours), TimePlusHours));
            xmlWriter.WriteAttributeString("stop", GetTimeString(End.AddHours(addhours), TimePlusHours));
            xmlWriter.WriteAttributeString("channel", Channel.Name);

            xmlWriter.WriteStartElement("title");
            xmlWriter.WriteString(Title);
            xmlWriter.WriteEndElement();

            /*
             * xmlWriter.WriteStartElement("sub-title");
             * if (SubTitleLang != "")
             *  xmlWriter.WriteAttributeString("lang", SubTitleLang);
             * xmlWriter.WriteString(SubTitle);
             * xmlWriter.WriteEndElement();
             */

            if (!string.IsNullOrEmpty(Description))
            {
                xmlWriter.WriteStartElement("desc");
                xmlWriter.WriteString(Description);
                xmlWriter.WriteEndElement();
            }

            xmlWriter.WriteEndElement();
            return(true);
        }
Example #2
0
        public override string ToString()
        {
            string s = "";

            s += Name.ToUpper() + "\n";
            s += " by " + Teacher.Name + "\n";
            s += " on " + Day + " --> " + Start + "-" + Start.AddHours(Hours);
            return(s);
        }
        public override string ToString()
        {
            string s = Name + "\n";

            s += " --> " + Docent.Name + "\n";
            Time End = Start.AddHours(this.Hours);

            s += " --> " + Day + " (" + Start + "-" + End + ")";
            return(s);
        }