Skip to content

Commit 29ae5a8

Browse files
author
SlavaRa
committed
Refactoring
1 parent 89fecfe commit 29ae5a8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

External/Plugins/ProjectManager/Controls/NewProjectDialog.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -550,16 +550,18 @@ private void browseButton_Click(object sender, System.EventArgs e)
550550

551551
private void UpdateStatusBar()
552552
{
553+
string status = string.Empty;
553554
string ext = ProjectExt;
554555
if (ext != null)
555556
{
556-
statusBar.Text = " " + TextHelper.GetString("Info.WillCreate") + " ";
557-
statusBar.Text += Path.Combine(locationTextBox.Text.TrimEnd('\\', '/'), nameTextBox.Text);
558-
if (createDirectoryBox.Checked) statusBar.Text = Path.Combine(statusBar.Text, nameTextBox.Text);
559-
statusBar.Text += ext;
560-
statusBar.Text = statusBar.Text.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
557+
string name = nameTextBox.Text;
558+
status = " " + TextHelper.GetString("Info.WillCreate") + " ";
559+
status += Path.Combine(locationTextBox.Text.TrimEnd('\\', '/'), name);
560+
if (createDirectoryBox.Checked) status = Path.Combine(status, name);
561+
status += ext;
562+
status = status.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
561563
}
562-
else statusBar.Text = "";
564+
statusBar.Text = status;
563565
}
564566

565567
private void locationTextBox_TextChanged(object sender, System.EventArgs e) { UpdateStatusBar(); }

0 commit comments

Comments
 (0)