65 lines
2.0 KiB
C#
65 lines
2.0 KiB
C#
using CampusAppWP8.Resources;
|
|
//-----------------------------------------------------------------------
|
|
// <copyright file="DisplaySetting.cs" company="BTU/IIT">
|
|
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
|
// </copyright>
|
|
// <author>Stubbfel</author>
|
|
// <date>26.11.2013</date>
|
|
// <summary>Implements the display setting class</summary>
|
|
//-----------------------------------------------------------------------
|
|
using System.Windows.Media;
|
|
|
|
namespace CampusAppWP8.Model.Setting
|
|
{
|
|
/// <summary> A display setting. </summary>
|
|
/// <remarks> Stubbfel, 26.11.2013. </remarks>
|
|
/// <seealso cref="T:CampusAppWP8.Model.Setting.ISetting"/>
|
|
public class DisplaySetting : ISetting
|
|
{
|
|
#region property
|
|
|
|
/// <summary> Gets or sets the color of the application accent. </summary>
|
|
/// <value> The color of the application accent. </value>
|
|
public Color AppAccentColor
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<Color>(Constants.Setting_AppAccentColor);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<Color>(Constants.Setting_AppAccentColor, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets the color of the phone accent. </summary>
|
|
/// <value> The color of the phone accent. </value>
|
|
public Color PhoneAccentColor
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<Color>(Constants.Setting_PhoneAccentColor);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<Color>(Constants.Setting_PhoneAccentColor, value);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region method
|
|
|
|
/// <summary> Sets setting to default. </summary>
|
|
/// <remarks> Stubbfel, 25.11.2013. </remarks>
|
|
/// <seealso cref="M:CampusAppWP8.Model.Setting.ISetting.SetSettingToDefault()"/>
|
|
public void SetSettingToDefault()
|
|
{
|
|
this.AppAccentColor = this.PhoneAccentColor;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|