Settings.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. // Helpers/Settings.cs This file was automatically added when you installed the Settings Plugin. If you are not using a PCL then comment this file back in to use it.
  3. using Plugin.Settings;
  4. using Plugin.Settings.Abstractions;
  5. namespace MyWeather.Droid.Helpers
  6. {
  7. /// <summary>
  8. /// This is the Settings static class that can be used in your Core solution or in any
  9. /// of your client applications. All settings are laid out the same exact way with getters
  10. /// and setters.
  11. /// </summary>
  12. public static class Settings
  13. {
  14. private static ISettings AppSettings
  15. {
  16. get
  17. {
  18. return CrossSettings.Current;
  19. }
  20. }
  21. #region Setting Constants
  22. private const string SettingsKey = "settings_key";
  23. private static readonly string SettingsDefault = string.Empty;
  24. #endregion
  25. public static string GeneralSettings
  26. {
  27. get
  28. {
  29. return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
  30. }
  31. set
  32. {
  33. AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
  34. }
  35. }
  36. }
  37. }*/