mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-05-02 04:46:31 +03:00
fix app not closing: delete extra window
This commit is contained in:
@@ -38,7 +38,6 @@ namespace KeyKeeper.Views
|
|||||||
{
|
{
|
||||||
if (file.TryGetLocalPath() is string path)
|
if (file.TryGetLocalPath() is string path)
|
||||||
{
|
{
|
||||||
ShowMessage($"Создание нового хранилища: {path}");
|
|
||||||
(DataContext as MainWindowViewModel)!.CreateVault(path);
|
(DataContext as MainWindowViewModel)!.CreateVault(path);
|
||||||
OpenRepositoryWindow();
|
OpenRepositoryWindow();
|
||||||
}
|
}
|
||||||
@@ -70,25 +69,12 @@ namespace KeyKeeper.Views
|
|||||||
var file = files[0];
|
var file = files[0];
|
||||||
if (file.TryGetLocalPath() is string path)
|
if (file.TryGetLocalPath() is string path)
|
||||||
{
|
{
|
||||||
ShowMessage($"Открытие хранилища: {path}");
|
|
||||||
(DataContext as MainWindowViewModel)!.OpenVault(path);
|
(DataContext as MainWindowViewModel)!.OpenVault(path);
|
||||||
OpenRepositoryWindow();
|
OpenRepositoryWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowMessage(string message)
|
|
||||||
{
|
|
||||||
// Временное решение для показа сообщений
|
|
||||||
var messageBox = new Window
|
|
||||||
{
|
|
||||||
Title = "KeyKeeper",
|
|
||||||
Content = new TextBlock { Text = message, Margin = new Thickness(20) },
|
|
||||||
SizeToContent = SizeToContent.WidthAndHeight,
|
|
||||||
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
|
||||||
};
|
|
||||||
messageBox.ShowDialog(this);
|
|
||||||
}
|
|
||||||
private void OpenRepositoryWindow()
|
private void OpenRepositoryWindow()
|
||||||
{
|
{
|
||||||
var repositoryWindow = new RepositoryWindow()
|
var repositoryWindow = new RepositoryWindow()
|
||||||
|
|||||||
Reference in New Issue
Block a user