174 lines
3.9 KiB
C#
174 lines
3.9 KiB
C#
//-----------------------------------------------------------------------------
|
|
// <copyright file="LinkModel.cs" company="BTU/IIT">
|
|
// Company copyright tag.
|
|
// </copyright>
|
|
// <author>stubbfel</author>
|
|
// <sience>02.07.2013</sience>
|
|
//-----------------------------------------------------------------------------
|
|
|
|
namespace CampusAppWPortalLib8.Model.Link
|
|
{
|
|
using System.Globalization;
|
|
using System.Xml.Serialization;
|
|
|
|
/// <summary>
|
|
/// Model for menu
|
|
/// </summary>
|
|
public class LinkModel
|
|
{
|
|
#region Member
|
|
|
|
/// <summary>
|
|
/// German version of the link title.
|
|
/// </summary>
|
|
private string titleDE;
|
|
|
|
/// <summary>
|
|
/// English version of the link title.
|
|
/// </summary>
|
|
private string titleEN;
|
|
|
|
/// <summary>
|
|
/// German version of the link.
|
|
/// </summary>
|
|
private string linkDE;
|
|
|
|
/// <summary>
|
|
/// English version of the link.
|
|
/// </summary>
|
|
private string linkEN;
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="LinkModel" /> class.
|
|
/// </summary>
|
|
public LinkModel()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property
|
|
|
|
/// <summary>
|
|
/// Gets or sets the german title of the link.
|
|
/// </summary>
|
|
[XmlAttribute("title_de")]
|
|
public string Title_DE
|
|
{
|
|
get
|
|
{
|
|
return this.titleDE;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (value != this.titleDE)
|
|
{
|
|
this.titleDE = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the english title of the link.
|
|
/// </summary>
|
|
[XmlAttribute("title_en")]
|
|
public string Title_EN
|
|
{
|
|
get
|
|
{
|
|
return this.titleEN;
|
|
}
|
|
|
|
set
|
|
{
|
|
this.titleEN = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the german link.
|
|
/// </summary>
|
|
[XmlAttribute("link_de")]
|
|
public string Link_DE
|
|
{
|
|
get
|
|
{
|
|
return this.linkDE;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (value != this.linkDE)
|
|
{
|
|
this.linkDE = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the english link.
|
|
/// </summary>
|
|
[XmlAttribute("link_en")]
|
|
public string Link_EN
|
|
{
|
|
get
|
|
{
|
|
return this.linkEN;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (value != this.linkEN)
|
|
{
|
|
this.linkEN = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the localized title. If the phone is set to german language,
|
|
/// the german title will be returned otherwise the english title.
|
|
/// </summary>
|
|
public string Title
|
|
{
|
|
get
|
|
{
|
|
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
|
{
|
|
return this.titleDE;
|
|
}
|
|
else
|
|
{
|
|
return this.titleEN;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the localized link. if the phone is set to german language,
|
|
/// the german comment will be returned otherwise the english link.
|
|
/// </summary>
|
|
public string Link
|
|
{
|
|
get
|
|
{
|
|
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
|
{
|
|
return this.Link_DE;
|
|
}
|
|
else
|
|
{
|
|
return this.Link_EN;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|