Exemple #1
0
        private async void OpenFavoriteWithReferencesContextMenuItem_Click(object?sender, EventArgs e)
        {
            if (sender is not ToolStripMenuItem contextMenuItem ||
                contextMenuItem.Owner.Tag is not Favorite favorite)
            {
                return;
            }

            String repo;

            if (favorite is FavoriteRepo r)
            {
                repo = r.Repo;
            }
            else if (favorite is FavoriteReposDirectoryRepo subrepo)
            {
                repo = subrepo.Repo;
            }
            else
            {
                return;
            }

            using ReferencesDialog dialog = new ReferencesDialog(repo);
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                await OpenLog(repo, dialog.SelectedReferences);
            }
        }
 private void SelectReferencesButton_Click(object?sender, EventArgs e)
 {
     using ReferencesDialog d = new ReferencesDialog(this.FavoriteRepo);
     if (d.ShowDialog() == DialogResult.OK)
     {
         ReferencesListBox.Items.AddRange(d.SelectedReferences);
     }
 }
Exemple #3
0
        private async void OpenWithReferencesRepoTabMenuItem_Click(object?sender, EventArgs e)
        {
            TabControllerTag tag  = LogTabs.SelectedTab !.Controller();
            String           repo = Git.GetBaseRepoDirectoryOrError(tag.RepoItem);

            using ReferencesDialog dialog = new ReferencesDialog(repo);
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                await OpenLog(tag.RepoItem, dialog.SelectedReferences);
            }
        }