private void LoadLastUsedProfile() { // if there is no save data, set default values for app data ProfileData loadedLastUsedProfile = currentProfile.LoadLastUsedProfile(); if (loadedLastUsedProfile != null) { currentProfile.profileData = loadedLastUsedProfile; AddDefaultPomodoroFallback(); GenerateProfilesDisplay(currentProfile.DefaultFileName); } else { ProfileData loadedDefaultProfile = currentProfile.LoadDefaultProfile(); if (loadedDefaultProfile != null) { currentProfile.profileData = loadedDefaultProfile; AddDefaultPomodoroFallback(); GenerateProfilesDisplay(currentProfile.DefaultFileName); } else { currentProfile.profileData.ButtonNormalColor = "#16A085"; currentProfile.profileData.ButtonHighlightedColor = "#1ABC9C"; currentProfile.profileData.Volume = "1"; AddDefaultPomodoroFallback(); SaveProfileWithName(currentProfile.DefaultFileName); } } volumeSlider.value = float.Parse(currentProfile.profileData.Volume, CultureInfo.InvariantCulture.NumberFormat); UpdateProfileNameLabel(currentProfile.FileName); timeKeeper.LoadCurrentPomodoro(); themeManager.LoadProfileColors(); GeneratePomodorosDisplay(); InitializeSoundsList(); GenerateSoundsListFromPomodoros(); ChangeBackgroundImage(currentProfile.profileData.BackgroundImagePath); }