//----------------------------------------------------------------------- // // Company copyright tag. // // stubbfel // 13.06.2013 //---------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System.Collections.ObjectModel; using System.Xml.Serialization; using CampusAppWPortalLib8.Resources; using CampusAppWPortalLib8.Utility; /// /// Model for a Activity /// public class LectureActivity { #region Members /// The activity icon name lecture. public const string ActivityTypeLecture = "Vorlesung"; /// The activity icon name seminar. public const string ActivityTypeSeminar = "Seminar"; /// The activity icon name practice. public const string ActivityTypePract = "Übung"; /// The activity icon name lab. public const string ActivityTypeLab = "Labor"; /// The activity icon name exam. public const string ActivityTypeExam = "Prüfung"; /// /// List of lecturer /// private ObservableCollection lecturer; /// /// a formatted string for the names of the lecturers /// private string lecturerString; /// /// a formatted string for the names of the courses /// private string courseString; /// /// a formatted string for the topic of the lecture /// private string topic; #endregion #region Constructor /// /// Initializes a new instance of the class. /// public LectureActivity() { } #endregion #region Proberty /// /// Gets or sets the type of the activity /// [XmlElement("art")] public string Type { get; set; } /// /// Gets or sets the id of the activity /// [XmlAttribute("id")] public int Id { get; set; } /// /// Gets or sets semester of the activity /// [XmlElement("semester")] public int Semester { get; set; } /// /// Gets or sets the contact hour /// [XmlElement("sws")] public string SWS { get; set; } /// /// Gets or sets LectureModule /// [XmlElement("modul")] public LectureModule Modul { get; set; } /// /// Gets or sets LectureTitle /// [XmlElement("titel")] public string Title { get; set; } /// /// Gets or sets the lecturers /// [XmlElement("lehrperson")] public ObservableCollection Lecturer { get { return this.lecturer; } set { if (value != this.lecturer) { this.lecturer = value; } } } /// /// Gets or sets the formatted string of the lecturers /// public string LecturerString { get { return this.lecturerString; } set { if (value != this.lecturerString) { this.lecturerString = value; } } } /// /// Gets or sets formatted string of the courses /// public string CourseString { get { return this.courseString; } set { if (value != this.courseString) { this.courseString = value; } } } /// /// Gets or sets the courses /// [XmlElement("studiengang")] public ObservableCollection Course { get; set; } /// /// Gets or sets the dates of the activity /// [XmlElement("termin")] public ObservableCollection Dates { get; set; } /// /// Gets or sets the Department /// [XmlElement("zugeordnete_einrichtung")] public string Department { get; set; } /// /// Gets or sets the topic of the Lecture /// [XmlElement("lehrinhalt")] public string Topic { get { return this.topic; } set { if (value != this.topic) { this.topic = value; } } } #endregion #region Methods #region public /// /// Method create a formatted string of the LecturerList /// public void CreateLectureString() { string result = string.Empty; foreach (LectureLecturer tmpLecturer in this.Lecturer) { result += DefaultStringManager.AddNewLine(tmpLecturer.ToString()); } this.LecturerString = DefaultStringManager.RemoveNewLine(result); } /// /// Method create a formatted string of the CourseList /// public void CreateCourseString() { string result = string.Empty; foreach (LectureCourse course in this.Course) { result += DefaultStringManager.AddNewLine(course.Title); } this.CourseString = DefaultStringManager.RemoveNewLine(result); } #endregion #endregion } }