diff --git a/CommonControls/FileIoHandler.cs b/CommonControls/FileIoHandler.cs
index 9fc84df2..45215180 100644
--- a/CommonControls/FileIoHandler.cs
+++ b/CommonControls/FileIoHandler.cs
@@ -38,6 +38,19 @@ public static string ShowFolder(string folder)
return browser.Root;
}
+ ///
+ /// Shows the login screen.
+ ///
+ /// Connection String
+ public static string ShowLoginScreen()
+ {
+ var login = new SqlLogin();
+ _ = login.ShowDialog();
+
+ return login.View.ConnectionString;
+ }
+
+
///
/// Looks up a file
/// Returns the PathObject
diff --git a/CommonControls/SqlLogin.xaml b/CommonControls/SqlLogin.xaml
index 2c030bd2..b3ba12ff 100644
--- a/CommonControls/SqlLogin.xaml
+++ b/CommonControls/SqlLogin.xaml
@@ -8,7 +8,7 @@
mc:Ignorable="d"
Title="Connect to Server" Height="450" Width="450">
-
+
@@ -38,7 +38,7 @@
-
+
diff --git a/CommonControls/SqlLogin.xaml.cs b/CommonControls/SqlLogin.xaml.cs
index c4211398..8d416db8 100644
--- a/CommonControls/SqlLogin.xaml.cs
+++ b/CommonControls/SqlLogin.xaml.cs
@@ -29,15 +29,5 @@ public SqlLogin()
{
InitializeComponent();
}
-
- ///
- /// Handles the Click event of the Button control.
- ///
- /// The source of the event.
- /// The instance containing the event data.
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- Close();
- }
}
}
diff --git a/CommonControls/SqlView.cs b/CommonControls/SqlView.cs
index 255fc885..951b887a 100644
--- a/CommonControls/SqlView.cs
+++ b/CommonControls/SqlView.cs
@@ -11,6 +11,7 @@
// ReSharper disable MemberCanBePrivate.Global
using System.ComponentModel;
+using System.Windows;
using System.Windows.Input;
using ViewModel;
@@ -28,6 +29,11 @@ public sealed class SqlView : INotifyPropertyChanged
///
private ICommand _connectCommand;
+ ///
+ /// The close command
+ ///
+ private ICommand _closeCommand;
+
///
/// The data base
///
@@ -136,6 +142,15 @@ public string Log
public ICommand ConnectCommand =>
_connectCommand ??= new DelegateCommand