Beispiel #1
0
        private void SetCurrentSettings()
        {
            FileSystemResult <PGMSetting> result = _fileSystemRepository.ReadOnFileData <PGMSetting>();

            if (result.HasSucceeded)
            {
                CurrentSettings = result.Type;
            }
        }
Beispiel #2
0
        private static PGMSetting InitPgmSetting()
        {
            PGMSetting pgmSetting = new PGMSetting
            {
                Email        = string.Empty,
                FullName     = string.Empty,
                GitLabApiKey = string.Empty,
                Credential   = new Credential
                {
                    Username = string.Empty,
                    Password = string.Empty
                }
            };

            return(pgmSetting);
        }
Beispiel #3
0
        public PGMSetting InitializePgm()
        {
            FileSystemResult <PGMSetting> result = _fileSystemRepository.ReadOnFileData <PGMSetting>();

            if (!result.HasSucceeded)
            {
                PGMSetting pgmSetting = InitPgmSetting();
                _fileSystemRepository.WriteOnFileData(pgmSetting);
                result = _fileSystemRepository.ReadOnFileData <PGMSetting>();
            }

            if (!string.IsNullOrEmpty(result.Type.GitLabApiKey))
            {
                result.Type.PgmHasSetup = true;
            }

            return(result.Type);
        }
        private async Task LaunchPgm()
        {
            if (PgmSettingVo == null && SelectedProject == null)
            {
                PGMSetting setting = _pgmService.InitializePgm();

                PgmSettingVo    = Mapper.Mapper.Map <PGMSettingVO>(setting);
                SelectedProject = new ProjectVO();

                if (!setting.PgmHasSetup && _setupSettingsDialog == null)
                {
                    _setupSettingsDialog = await _dialogCoordinatorService.ShowConfigSettings("SetupSettingsDialog");
                }
                else
                {
                    IEnumerable <GitlabProject> projects = await _mainOrchestrator.GetGitlabProjectsFromCurrentUser();

                    CallMapper <List <ProjectVO> >(projects, projectsVo =>
                                                   projectsVo.ForEach(projectVo => ProjectsVo.Add(projectVo)));
                }
            }
        }
Beispiel #5
0
 public void WriteOnPgmSettings(PGMSetting pgmSetting)
 {
     _fileSystemRepository.WriteOnFileData(pgmSetting);
 }