99 lines
2.2 KiB
C#
99 lines
2.2 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="LectureModule.cs" company="BTU/IIT">
|
|
// Company copyright tag.
|
|
// </copyright>
|
|
// <author>stubbfel</author>
|
|
// <sience>10.06.2013</sience>
|
|
//----------------------------------------------------------------------
|
|
namespace CampusAppWPortalLib8.Model.Lecture
|
|
{
|
|
using System;
|
|
using System.Xml.Serialization;
|
|
using CampusAppWPortalLib8.Resources;
|
|
|
|
/// <summary>
|
|
/// Model for the module of an lecture
|
|
/// </summary>
|
|
public class LectureModule
|
|
{
|
|
#region Members
|
|
|
|
/// <summary>
|
|
/// Number of the module (like an id)
|
|
/// </summary>
|
|
private int number;
|
|
|
|
/// <summary>
|
|
/// Url to the website of the module
|
|
/// </summary>
|
|
private Uri url;
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="LectureModule" /> class.
|
|
/// </summary>
|
|
public LectureModule()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property
|
|
|
|
/// <summary>
|
|
/// Gets or sets the title of the module
|
|
/// </summary>
|
|
[XmlElement("titel")]
|
|
public string Title { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the number of the module and create the URL
|
|
/// </summary>
|
|
[XmlElement("nummer")]
|
|
public int Number
|
|
{
|
|
get
|
|
{
|
|
return this.number;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (value != this.number)
|
|
{
|
|
this.number = value;
|
|
this.CreateUrl();
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the URL of the module
|
|
/// </summary>
|
|
public Uri Url
|
|
{
|
|
get
|
|
{
|
|
return this.url;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Methods
|
|
|
|
/// <summary>
|
|
/// Method create the url of the module
|
|
/// </summary>
|
|
private void CreateUrl()
|
|
{
|
|
this.url = new Uri(Constants.UrlLecture_ModulBaseAddr + this.number.ToString());
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|