Пример #1
0
        public DeleteUnusedBranchesForm(DeleteUnusedBranchesFormSettings settings, IGitModule gitCommands, IGitUICommands gitUiCommands, IGitPlugin gitPlugin)
        {
            _settings      = settings;
            _gitCommands   = gitCommands;
            _gitUiCommands = gitUiCommands;
            _gitPlugin     = gitPlugin;

            InitializeComponent();

            _NO_TRANSLATE_deleteDataGridViewCheckBoxColumn.Width = DpiUtil.Scale(50);
            dateDataGridViewTextBoxColumn.Width = DpiUtil.Scale(175);
            Author.Width = DpiUtil.Scale(91);

            imgLoading.Image = Resources.loadingpanel;

            _NO_TRANSLATE_deleteDataGridViewCheckBoxColumn.DataPropertyName = nameof(Branch.Delete);
            nameDataGridViewTextBoxColumn.DataPropertyName = nameof(Branch.Name);
            dateDataGridViewTextBoxColumn.DataPropertyName = nameof(Branch.Date);
            Author.DataPropertyName  = nameof(Branch.Author);
            Message.DataPropertyName = nameof(Branch.Message);

            InitializeComplete();

            ThreadHelper.JoinableTaskFactory.RunAsync(() => RefreshObsoleteBranchesAsync());
        }
 public DeleteUnusedBranchesForm(DeleteUnusedBranchesFormSettings settings, IGitModule gitCommands, IGitUICommands gitUiCommands, IGitPlugin gitPlugin)
     : this()
 {
     _settings        = settings;
     _gitCommands     = gitCommands;
     _gitUiCommands   = gitUiCommands;
     _gitPlugin       = gitPlugin;
     imgLoading.Image = Resources.loadingpanel;
     ThreadHelper.JoinableTaskFactory.RunAsync(() => RefreshObsoleteBranchesAsync());
 }
Пример #3
0
 public DeleteUnusedBranchesForm(DeleteUnusedBranchesFormSettings settings, IGitModule gitCommands, IGitUICommands gitUiCommands, IGitPlugin gitPlugin)
     : this()
 {
     _settings        = settings;
     _gitCommands     = gitCommands;
     _gitUiCommands   = gitUiCommands;
     _gitPlugin       = gitPlugin;
     imgLoading.Image = Resources.loadingpanel;
     RefreshObsoleteBranches();
 }
Пример #4
0
        public override bool Execute(GitUIEventArgs args)
        {
            var settings = new DeleteUnusedBranchesFormSettings(
                _daysOlderThan.ValueOrDefault(Settings),
                _mergedInBranch.ValueOrDefault(Settings),
                _deleteRemoteBranchesFromFlag.ValueOrDefault(Settings),
                _remoteName.ValueOrDefault(Settings),
                _useRegexToFilterBranchesFlag.ValueOrDefault(Settings),
                _regexFilter.ValueOrDefault(Settings),
                _regexCaseInsensitiveFlag.ValueOrDefault(Settings),
                _regexInvertedFlag.ValueOrDefault(Settings),
                _includeUnmergedBranchesFlag.ValueOrDefault(Settings));

            using var frm = new DeleteUnusedBranchesForm(settings, args.GitModule, args.GitUICommands, this);
            frm.ShowDialog(args.OwnerForm);

            return(true);
        }
        public override bool Execute(GitUIBaseEventArgs gitUiArgs)
        {
            var settings = new DeleteUnusedBranchesFormSettings(
                DaysOlderThan.ValueOrDefault(Settings),
                MergedInBranch.ValueOrDefault(Settings),
                DeleteRemoteBranchesFromFlag.ValueOrDefault(Settings),
                RemoteName.ValueOrDefault(Settings),
                UseRegexToFilterBranchesFlag.ValueOrDefault(Settings),
                RegexFilter.ValueOrDefault(Settings),
                RegexCaseInsensitiveFlag.ValueOrDefault(Settings),
                RegexInvertedFlag.ValueOrDefault(Settings),
                IncludeUnmergedBranchesFlag.ValueOrDefault(Settings));

            using (var frm = new DeleteUnusedBranchesForm(settings, gitUiArgs.GitModule, gitUiArgs.GitUICommands, this))
            {
                frm.ShowDialog(gitUiArgs.OwnerForm);
            }

            return(true);
        }