Exemplo n.º 1
0
        public void UpdateAppSetting(AppSetting appSetting)
        {
            AppSetting.Value.AverageScoreTextFormat.Value    = appSetting.AverageScoreTextFormat.Value;
            AppSetting.Value.IsAutoImageSave.Value           = appSetting.IsAutoImageSave.Value;
            AppSetting.Value.IsLatestScoreOutputAsText.Value = appSetting.IsLatestScoreOutputAsText.Value;
            AppSetting.Value.LatestScoreTextFormat.Value     = appSetting.LatestScoreTextFormat.Value;
            AppSetting.Value.ScoreTextFormat.Value           = appSetting.ScoreTextFormat.Value;
            AppSetting.Value.IsAccumulatingAtLastTime.Value  = appSetting.IsAccumulatingAtLastTime.Value;
            AppSetting.Value.IsFirstBoot.Value = appSetting.IsFirstBoot.Value;

            if (AppSetting.Value.IsAutoImageSave.Value)
            {
                _scoreScreenShotRepository.CreateDirectoryIfNotExists();
            }

            if (AppSetting.Value.IsLatestScoreOutputAsText.Value)
            {
                _scoreFileRepository.CreateDummyLatestScoreIfNotExists();
            }
        }