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; }
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); }
public static string getString(this BaseBundle bundle, string key) { return(bundle.GetString(key)); }