Beispiel #1
0
        private void CreateExerciseService(BaseBundle savedInstance)
        {
            var exerciseState = savedInstance?.GetString(SavedExerciseStateKey, string.Empty);

            // Create the exercise service
            mExerciseService = ExerciseService.ExerciseServiceFromString(exerciseState, new ExerciseConfiguration(), new TimerService(), mExerciseTrackerService);

            mExerciseService.ExerciseChanged          += ExerciseServiceOnExerciseChanged;
            mExerciseService.ActiveSubExerciseChanged += ExerciseServiceOnActiveSubExerciseChanged;
            mExerciseService.StateChanged             += ExerciseServiceOnStateChanged;
        }
Beispiel #2
0
        public static IDictionary <string, string> GetNavigationParameters(this BaseBundle sourceBundle)
        {
            if (sourceBundle == null)
            {
                return(new Dictionary <string, string>());
            }

            var extraData = sourceBundle.GetString(LaunchDataKey);

            if (extraData == null)
            {
                return(new Dictionary <string, string>());
            }

            var converter        = Mvx.Resolve <IMvxNavigationSerializer>();
            var viewModelRequest = converter.Serializer.DeserializeObject <MvxViewModelRequest>(extraData);

            return(viewModelRequest.ParameterValues);
        }
Beispiel #3
0
 public static string getString(this BaseBundle bundle, string key)
 {
     return(bundle.GetString(key));
 }