Creation finished, project considered finished

This commit is contained in:
2024-05-06 19:13:17 +02:00
parent fc3afaae2c
commit fbcee50f96
16 changed files with 485 additions and 71 deletions

View File

@@ -1,4 +1,5 @@
using System.Windows;
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
{
@@ -14,7 +15,19 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
private void CreateNewService(object sender, RoutedEventArgs e)
{
Window window = new CreateNewService();
CreateNewServiceViewModel viewModel = new CreateNewServiceViewModel();
viewModel.NewServiceCreated += (newService) =>
{
var getAllServicesViewModel = (GetAllServicesViewModel)DataContext;
if (getAllServicesViewModel != null)
{
Application.Current.Dispatcher.Invoke(() =>
{
getAllServicesViewModel.Services.Add(newService);
});
}
};
Window window = new CreateNewService(viewModel);
window.Show();
}
}