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