Exemple #1
0
        public ModuniSettings()
        {
            this.developerSettings = new DeveloperSettings();
            Configuration gitConfiguration = LibGit2Sharp.Configuration.BuildFrom(null);

            if (gitConfiguration.HasConfig(ConfigurationLevel.Global) || gitConfiguration.HasConfig(ConfigurationLevel.System))
            {
                this.developerSettings.fullName     = gitConfiguration.Get <string>("user.name").Value;
                this.developerSettings.emailAddress = gitConfiguration.Get <string>("user.email").Value;
            }

            this.repositoryManagerSettings = new List <ARepositoryManagerSettings>();
        }
Exemple #2
0
 public void UpdateSettings(DeveloperSettings developerSettings, IEnumerable <ARepositoryManagerSettings> repositoriesManagersSettings, bool isProjectOnlySettings)
 {
     this.settingsManager.ModuniSettings.DeveloperSettings         = developerSettings;
     this.settingsManager.ModuniSettings.RepositoryManagerSettings = new List <ARepositoryManagerSettings>(repositoriesManagersSettings);
     if (isProjectOnlySettings)
     {
         this.settingsManager.SaveForProject();
     }
     else
     {
         this.settingsManager.SaveForProjectAndEditor();
     }
     if (OnRepositoriesManagersSettingsUpdated != null)
     {
         OnRepositoriesManagersSettingsUpdated(this.settingsManager.ModuniSettings.RepositoryManagerSettings);
     }
     this.CreateRepositoriesManagers();
 }