private void addButton_Click(object sender, EventArgs e) { var editRepo = new EditRepository(); if (editRepo.ShowDialog() == DialogResult.OK) { Repository.Repositories.Add(editRepo.SelectedRepository); RefreshAvailableRepositories(); } }
private void changeButton_Click(object sender, EventArgs e) { var selectedRepository = Repository.Repositories[listView1.SelectedIndices[0]]; var editRepo = new EditRepository(selectedRepository); if (editRepo.ShowDialog() == DialogResult.OK) { selectedRepository.Url = editRepo.SelectedRepository.Url; selectedRepository.Branch = editRepo.SelectedRepository.Branch; RefreshAvailableRepositories(); } }