Added functionality to switch database

This commit is contained in:
Andre Beging
2017-09-11 11:52:20 +02:00
parent 3d2d4851cc
commit 68cd02e99b
4 changed files with 40 additions and 15 deletions

View File

@@ -16,6 +16,7 @@ namespace DebtMgr.ViewModel.Dialogs
public class DatabaseSelectorDialogViewModel : ViewModelBase
{
public event EventHandler RequestClose;
public bool ProgramRequestedClose = false;
#region SelectDatabasePathText (string) Property
@@ -71,6 +72,7 @@ namespace DebtMgr.ViewModel.Dialogs
Properties.Settings.Default["Database"] = openFileDialog.FileName;
Properties.Settings.Default.Save();
ProgramRequestedClose = true;
RequestClose?.Invoke(null, null);
}
catch (Exception)
@@ -113,6 +115,7 @@ namespace DebtMgr.ViewModel.Dialogs
Properties.Settings.Default["Database"] = saveFileDialog.FileName;
Properties.Settings.Default.Save();
ProgramRequestedClose = true;
RequestClose?.Invoke(null, null);
}
}