Пример #1
0
        public static DataSettings GetStoredDataSettings()
        {
            AppSettings bandSettingsContainer = AppSettingsManager.Instance.LocalSettings.Containers["BandSettings"];
            AppSettings phoneSettingsContainer = AppSettingsManager.Instance.LocalSettings.Containers["PhoneSettings"];

            BandSettings bandSettings = new BandSettings
            {
                IsLinked = bandSettingsContainer.GetValueOrDefault("IsLinked", false)
            };

            PhoneSettings phoneSettings = new PhoneSettings
            {
                AccelerometerEnabled = phoneSettingsContainer.GetValueOrDefault("Accelerometer", true),
                GeopositionEnabled = phoneSettingsContainer.GetValueOrDefault("Geoposition", true)
            };

            return new DataSettings
            {
                BandSettings = bandSettings,
                PhoneSettings = phoneSettings
            };
        }
Пример #2
0
        public static DataSettings GetStoredDataSettings()
        {
            AppSettings bandSettingsContainer  = AppSettingsManager.Instance.LocalSettings.Containers["BandSettings"];
            AppSettings phoneSettingsContainer = AppSettingsManager.Instance.LocalSettings.Containers["PhoneSettings"];

            BandSettings bandSettings = new BandSettings
            {
                IsLinked = bandSettingsContainer.GetValueOrDefault("IsLinked", false)
            };

            PhoneSettings phoneSettings = new PhoneSettings
            {
                AccelerometerEnabled = phoneSettingsContainer.GetValueOrDefault("Accelerometer", true),
                GeopositionEnabled   = phoneSettingsContainer.GetValueOrDefault("Geoposition", true)
            };

            return(new DataSettings
            {
                BandSettings = bandSettings,
                PhoneSettings = phoneSettings
            });
        }