diff --git a/Apollon.WPF/Commands/OpenWarningDeleteCommand.cs b/Apollon.WPF/Commands/OpenWarningDeleteCommand.cs new file mode 100644 index 0000000..3dfda05 --- /dev/null +++ b/Apollon.WPF/Commands/OpenWarningDeleteCommand.cs @@ -0,0 +1,26 @@ +using Apollon.WPF.Stores; +using Apollon.WPF.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Apollon.WPF.Commands +{ + public class OpenWarningDeleteCommand : CommandBase + { + private readonly ModalNavigationStore _modalNavigationStore; + + public OpenWarningDeleteCommand(ModalNavigationStore modalNavigationStore) + { + _modalNavigationStore = modalNavigationStore; + } + + public override void Execute(object parameter) + { + WarningDeleteViewModel warningDeleteViewModel = new WarningDeleteViewModel(_modalNavigationStore); + _modalNavigationStore.CurrentViewModel = warningDeleteViewModel; + } + } +} diff --git a/Apollon.WPF/MainWindow.xaml b/Apollon.WPF/MainWindow.xaml index 3eb2f42..e0fdb7e 100644 --- a/Apollon.WPF/MainWindow.xaml +++ b/Apollon.WPF/MainWindow.xaml @@ -23,6 +23,9 @@ + + + diff --git a/Apollon.WPF/ViewModels/OverviewListingItemViewModel.cs b/Apollon.WPF/ViewModels/OverviewListingItemViewModel.cs index d96f6e0..9780ad4 100644 --- a/Apollon.WPF/ViewModels/OverviewListingItemViewModel.cs +++ b/Apollon.WPF/ViewModels/OverviewListingItemViewModel.cs @@ -18,14 +18,16 @@ namespace Apollon.WPF.ViewModels public string Location => Tournament.Location; public ICommand EditCommand { get; } - public ICommand DeleteCommand { get; } + //public ICommand DeleteCommand { get; } + public ICommand WarningDeleteCommand { get; } public OverviewListingItemViewModel(Tournament tournament, TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore) { Tournament = tournament; EditCommand = new OpenEditTournamentCommand(this, tournamentStore, modalNavigationStore); - DeleteCommand = new DeleteTournamentCommand(this, tournamentStore); + //DeleteCommand = new DeleteTournamentCommand(this, tournamentStore); + WarningDeleteCommand = new OpenWarningDeleteCommand(modalNavigationStore); } public void Update(Tournament tournament) diff --git a/Apollon.WPF/ViewModels/WarningDeleteViewModel.cs b/Apollon.WPF/ViewModels/WarningDeleteViewModel.cs new file mode 100644 index 0000000..76c6715 --- /dev/null +++ b/Apollon.WPF/ViewModels/WarningDeleteViewModel.cs @@ -0,0 +1,16 @@ +using Apollon.WPF.Stores; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Apollon.WPF.ViewModels +{ + public class WarningDeleteViewModel : ViewModelBase + { + public WarningDeleteViewModel(ModalNavigationStore modalNavigationStore) + { + } + } +} diff --git a/Apollon.WPF/Views/Components/OverViewListing.xaml b/Apollon.WPF/Views/Components/OverViewListing.xaml index c83eb4f..f75aea2 100644 --- a/Apollon.WPF/Views/Components/OverViewListing.xaml +++ b/Apollon.WPF/Views/Components/OverViewListing.xaml @@ -58,7 +58,7 @@ BorderThickness="0" Cursor="Hand" ToolTip="Löschen" - Command="{Binding DeleteCommand}"> + Command="{Binding WarningDeleteCommand}"> + + + + + + + + + + + +