155 lines
4.8 KiB
C#
155 lines
4.8 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="AppSettings.cs" company="BTU/IIT">
|
|
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
|
// </copyright>
|
|
// <author>Stubbfel</author>
|
|
// <date>15.10.2013</date>
|
|
// <summary>Implements the application settings class</summary>
|
|
//-----------------------------------------------------------------------
|
|
namespace CampusAppWP8.Model.Setting
|
|
{
|
|
using CampusAppWP8.Resources;
|
|
|
|
/// <summary> Model for settings of the app. </summary>
|
|
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
|
public class AppSettings
|
|
{
|
|
#region Enum
|
|
|
|
/// <summary> Values that represent BTUTagDefaultHandler. </summary>
|
|
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
|
public enum BTUTagDefaultHandler
|
|
{
|
|
/// <summary> An enum constant representing the information page option. </summary>
|
|
InfoPage = 0,
|
|
|
|
/// <summary> An enum constant representing the campus map option. </summary>
|
|
CampusMap = 1
|
|
}
|
|
|
|
#endregion
|
|
#region Property
|
|
|
|
/// <summary> Gets or sets a value indicating whether the GeoWatch-Flag. </summary>
|
|
/// <value> true if geo watch enable, false if not. </value>
|
|
public bool GeoWatchEnable
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<bool>(Constants.AppSetting_GeoWatchEnable);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<bool>(Constants.AppSetting_GeoWatchEnable, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets a value indicating whether the InitializationApp-Flag. </summary>
|
|
/// <value> true if initialise application, false if not. </value>
|
|
public bool InitApp
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<bool>(Constants.AppSetting_InitApp);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<bool>(Constants.AppSetting_InitApp, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets a value indicating whether the development mode. </summary>
|
|
/// <value> true if development mode, false if not. </value>
|
|
public bool DevMode
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<bool>(Constants.AppSetting_DevMode);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<bool>(Constants.AppSetting_DevMode, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets a value indicating whether the uni network. </summary>
|
|
/// <value> true if uni network, false if not. </value>
|
|
public bool UniNetwork
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<bool>(Constants.AppSetting_UniNet);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<bool>(Constants.AppSetting_UniNet, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets a value indicating whether this object is WiFi enable. </summary>
|
|
/// <value> true if WiFi enable, false if not. </value>
|
|
public bool WifiEnable
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<bool>(Constants.AppSetting_WifiEnable);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<bool>(Constants.AppSetting_WifiEnable, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets a value indicating whether the only WiFi. </summary>
|
|
/// <value> true if only wifi, false if not. </value>
|
|
public bool OnlyWifi
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<bool>(Constants.AppSetting_OnlyWifi);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<bool>(Constants.AppSetting_OnlyWifi, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets the DeploymentNumber of the app. </summary>
|
|
/// <value> The deployment number. </value>
|
|
public int DeploymentNumber
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<int>(Constants.AppSetting_DeploymentNumber);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<int>(Constants.AppSetting_DeploymentNumber, value);
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets the tag default handler. </summary>
|
|
/// <value> The tag default handler. </value>
|
|
public BTUTagDefaultHandler TagDefaultHandler
|
|
{
|
|
get
|
|
{
|
|
return App.LoadFromAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler);
|
|
}
|
|
|
|
set
|
|
{
|
|
App.SaveToAppState<BTUTagDefaultHandler>(Constants.AppSetting_BTUTagDefaultHandler, value);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |