Skip to content

Commit 11fe5bf

Browse files
committed
Improve 'Finish Feature' UI
1 parent d9464d6 commit 11fe5bf

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

TGIT.sln

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6D6C80BD-B63E-4F6D-A9D3-89AE15DA2D7C}"
77
ProjectSection(SolutionItems) = preProject
88
azure-pipelines.yml = azure-pipelines.yml
9+
publish-manifest.json = publish-manifest.json
910
README.md = README.md
1011
EndProjectSection
1112
EndProject

TGit/Helpers/ProcessHelper.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ public static Process StartProcessGui(DTE dte, EnvHelper envHelper, string appli
189189
process.BeginOutputReadLine();
190190
process.BeginErrorReadLine();
191191

192-
_outputBox.Text = title;
192+
if (!string.IsNullOrEmpty(title))
193+
{
194+
_outputBox.Text = title;
195+
}
196+
193197
_outputBox.Show();
194198

195199
return process;

TGit/OutputBox.cs

+7-6
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ private void okButton_Click(object sender, EventArgs e)
4949
{
5050
if (localBranchCheckBox.Checked || remoteBranchCheckBox.Checked || pushCheckBox.Checked)
5151
{
52+
okButton.Enabled = false;
53+
5254
var process = ProcessHelper.StartProcessGui(_dte, _envHelper,
5355
"cmd.exe",
5456
$"/c cd \"{_envHelper.GetSolutionDir()}\" && " +
@@ -57,16 +59,15 @@ private void okButton_Click(object sender, EventArgs e)
5759
(pushCheckBox.Checked ? _pushCommand : "echo.") +
5860
FormatCliCommand($"branch -d {_branchName}") +
5961
(remoteBranchCheckBox.Checked ? FormatCliCommand($"push origin --delete {_branchName}", false) : "echo."),
60-
"Finishing...", string.Empty, this
61-
);
62-
process.WaitForExit();
62+
string.Empty, string.Empty, this
63+
);
64+
65+
okButton.Click -= okButton_Click;
6366
okButton.Click += OkButton_Click_Close;
6467
}
6568
else
6669
{
67-
Close();
68-
richTextBox.Clear();
69-
okButton.Enabled = false;
70+
OkButton_Click_Close(null, null);
7071
}
7172
}
7273

0 commit comments

Comments
 (0)