Ejemplo n.º 1
0
        /// <summary>
        /// Create new repository for project
        /// </summary>
        /// <param name="project">VBProject</param>
        public void CreateNewRepo(VBProject project)
        {
            try
            {
                EnableFileSystemWatcher = false;

                using (var gitCommand = new CommandInit(project))
                {
                    gitCommand.Execute();

                    if (gitCommand.Status == CommandStatus.Success)
                    {
                        RepositorySettings repo = new RepositorySettings();
                        repo.Name      = project.GetRepoName();
                        repo.LocalPath = gitCommand.Repository.Info.WorkingDirectory;

                        if (!_config.Repositories.Exists(r => (r.Name == repo.Name &&
                                                               r.LocalPath == repo.LocalPath &&
                                                               r.RemotePath == repo.RemotePath)))
                        {
                            _config.Repositories.Add(repo);
                            _configService.SaveConfiguration(_config);
                        }

                        AddVBProject(project);
                    }
                }
            }
            finally
            {
                EnableFileSystemWatcher = true;
            }
        }
Ejemplo n.º 2
0
 private void Login()
 {
     Security.Account acc;
     do
     {
         acc = Security.Account.DoLogin();
     } while(!acc.OK);
     GlobalEnvironment.Init(acc);
     CommandInit.Init();
     Shell.StartShell();
 }