2016-09-27 02:35:45 +02:00
|
|
|
// Helpers/Settings.cs
|
2016-10-04 02:46:24 +02:00
|
|
|
#if USELESS_but_makes_the_component_removable // this file must exist ^^
|
2016-09-27 02:35:45 +02:00
|
|
|
|
2017-01-26 13:00:31 +01:00
|
|
|
namespace ZicMoove.Helpers
|
2016-09-27 02:35:45 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is the Settings static class that can be used in your Core solution or in any
|
|
|
|
|
/// of your client applications. All settings are laid out the same exact way with getters
|
|
|
|
|
/// and setters.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static class Settings
|
|
|
|
|
{
|
2016-10-03 18:39:58 +02:00
|
|
|
public static ISettings AppSettings
|
2016-09-27 02:35:45 +02:00
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return CrossSettings.Current;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region Setting Constants
|
|
|
|
|
|
|
|
|
|
private const string SettingsKey = "settings_key";
|
2016-10-03 18:39:58 +02:00
|
|
|
public static readonly string SettingsDefault = string.Empty;
|
2016-09-27 02:35:45 +02:00
|
|
|
|
2016-10-03 18:39:58 +02:00
|
|
|
#endregion
|
2016-09-27 02:35:45 +02:00
|
|
|
|
|
|
|
|
|
2016-10-03 18:39:58 +02:00
|
|
|
public static string GeneralSettings
|
2016-09-27 02:35:45 +02:00
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-10-04 02:46:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|