Esempio n. 1
0
        public static SessionContext GetSessionContext()
        {
            UserSettings userSettings = UserSettings.GetStoredUserSettings();
            DataSettings dataSettings = DataSettings.GetStoredDataSettings();

            UserContext userContext = new UserContext
            {
                Username = userSettings.Username,
                Password = userSettings.Password,
                WebIDs   = userSettings.WebIDs
            };

            DataContext dataContext = new DataContext
            {
                PhoneAccelerometerEnabled = dataSettings.PhoneSettings.AccelerometerEnabled,
                PhoneGeopositionEnabled   = dataSettings.PhoneSettings.GeopositionEnabled
            };

            SessionContext sessionContext = new SessionContext {
                UserContext = userContext, DataContext = dataContext
            };

            return(sessionContext);
        }