We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ea856e1 + 75838bd commit 326b216Copy full SHA for 326b216
1 file changed
MainWindow.cs
@@ -1,5 +1,6 @@
1
using System;
2
using System.Collections.Generic;
3
+using System.Linq;
4
using System.ComponentModel;
5
using System.Windows.Forms;
6
using postgres_database_restore_tool.Helper;
@@ -60,8 +61,16 @@ private void OnFileOpenClick(object sender, EventArgs e)
60
61
var selected = TargetLocation.ShowDialog();
62
if (selected == DialogResult.OK)
63
{
- MessageBox.Show(TargetLocation.FileName);
64
+ MessageBox.Show(TargetLocation.FileName,"File Selected");
65
SelectedFilelbl.Text = TargetLocation.FileName;
66
+ if(string.IsNullOrWhiteSpace(DatabaseElem.Text))
67
+ {
68
+ var fileName = TargetLocation.FileName.Split(new char[] { '/', '\\' }).LastOrDefault();
69
+ if(fileName.Contains("_"))
70
71
+ DatabaseElem.Text = fileName.Split('_').FirstOrDefault();
72
+ }
73
74
}
75
76
0 commit comments