mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-04-17 18:16:28 +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)
|
||||
{
|
||||
ShowMessage($"Создание нового хранилища: {path}");
|
||||
(DataContext as MainWindowViewModel)!.CreateVault(path);
|
||||
OpenRepositoryWindow();
|
||||
}
|
||||
@@ -70,25 +69,12 @@ namespace KeyKeeper.Views
|
||||
var file = files[0];
|
||||
if (file.TryGetLocalPath() is string path)
|
||||
{
|
||||
ShowMessage($"Открытие хранилища: {path}");
|
||||
(DataContext as MainWindowViewModel)!.OpenVault(path);
|
||||
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()
|
||||
{
|
||||
var repositoryWindow = new RepositoryWindow()
|
||||
|
||||
Reference in New Issue
Block a user