Exemple #1
0
 public void BuildTabs(TabControl reposCatalogs, SelectRepo onSelectRepoEvent)
 {
     foreach (var config in appConfiguration)
     {
         BuildTab(reposCatalogs, onSelectRepoEvent, config);
     }
 }
Exemple #2
0
        public void BuildTab(TabControl reposCatalogs, SelectRepo onSelectRepoEvent, RepoConfig repo)
        {
            var newTab = serviceProvider.GetService <TabReposControl>();

            newTab.RepoConfiguration = repo;
            newTab.BackColor         = Color.White;
            reposCatalogs.Controls.Add(newTab);
            CheckForGitRepo(newTab, onSelectRepoEvent);
        }
Exemple #3
0
 private void CheckForGitRepo(TabReposControl repoControl, SelectRepo onSelectRepoEvent)
 {
     if (Directory.Exists(repoControl.RepoConfiguration.GitLookerPath))
     {
         foreach (var repo in gitFileRepo.Get(repoControl.RepoConfiguration.GitLookerPath))
         {
             BuildRepo(onSelectRepoEvent, repoControl, repo);
         }
     }
 }
Exemple #4
0
        public void BuildTab(TabControl reposCatalogs, SelectRepo onSelectRepoEvent, string repoPath)
        {
            if (!Directory.Exists(repoPath))
            {
                MessageBox.Show($"Path {repoPath} is not valid.", "Invalid repo path", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            var config = new RepoConfig {
                GitLookerPath = repoPath
            };

            appConfiguration.Add(config);
            BuildTab(reposCatalogs, onSelectRepoEvent, config);
        }
Exemple #5
0
        public void BuildRepo(SelectRepo onSelectRepoEvent,
                              TabReposControl repoControls,
                              string repoDdir,
                              string newRepo = default)
        {
            var repo = serviceProvider.GetService <RepoControl>();

            repo.RepoPath      = repoDdir;
            repo.NewRepo       = newRepo;
            repo.MainBranch    = repoControls.RepoConfiguration.MainBranch;
            repo.EndControl    = repoControls.RepoEndControl;
            repo.OnSelectRepo += onSelectRepoEvent;
            repo.Dock          = DockStyle.Top;
            repoControls.RepoAdd(repo);
            Application.DoEvents();
        }
Exemple #6
0
 public void ReBuildRepos(TabReposControl repoControl, SelectRepo onSelectRepoEvent) => CheckForGitRepo(repoControl, onSelectRepoEvent);