예제 #1
0
    private void LoadProfile(string name)
    {
        ProfileData loadedData = currentProfile.LoadProfile(name);

        if (loadedData != null)
        {
            currentProfile.profileData = loadedData;
            currentProfile.ChangeFileName(name);
            volumeSlider.value = float.Parse(currentProfile.profileData.Volume, CultureInfo.InvariantCulture.NumberFormat);
            UpdateProfileNameLabel(name);
            AddDefaultPomodoroFallback();
            timeKeeper.LoadCurrentPomodoro();
            themeManager.LoadProfileColors();

            GenerateProfilesDisplay(currentProfile.FileName);
            GeneratePomodorosDisplay();
            InitializeSoundsList();
            GenerateSoundsListFromPomodoros();
            ChangeBackgroundImage(currentProfile.profileData.BackgroundImagePath);
        }
    }