open WarningDelete Modal
This commit is contained in:
26
Apollon.WPF/Commands/OpenWarningDeleteCommand.cs
Normal file
26
Apollon.WPF/Commands/OpenWarningDeleteCommand.cs
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,9 @@
|
||||
<DataTemplate DataType="{x:Type vms:EditTournamentViewModel}">
|
||||
<views:EditTournamentView/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vms:WarningDeleteViewModel}">
|
||||
<views:WarningDeleteView/>
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -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)
|
||||
|
||||
16
Apollon.WPF/ViewModels/WarningDeleteViewModel.cs
Normal file
16
Apollon.WPF/ViewModels/WarningDeleteViewModel.cs
Normal file
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@
|
||||
BorderThickness="0"
|
||||
Cursor="Hand"
|
||||
ToolTip="Löschen"
|
||||
Command="{Binding DeleteCommand}">
|
||||
Command="{Binding WarningDeleteCommand}">
|
||||
<iconPacks:PackIconMaterial Kind="TrashCan"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
|
||||
49
Apollon.WPF/Views/WarningDeleteView.xaml
Normal file
49
Apollon.WPF/Views/WarningDeleteView.xaml
Normal file
@@ -0,0 +1,49 @@
|
||||
<UserControl x:Class="Apollon.WPF.Views.WarningDeleteView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Apollon.WPF.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<StackPanel Grid.ColumnSpan="2"
|
||||
MaxWidth="300">
|
||||
<TextBlock Text="Turnier Löschen !!"
|
||||
TextAlignment="Center"
|
||||
FontSize="25"
|
||||
Foreground="#0000a0"/>
|
||||
|
||||
<TextBlock Text="soll das Turnier wirklich gelöscht werden?"
|
||||
TextAlignment="Center"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="Red"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Margin="0 10 0 20"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0"
|
||||
Content="Löschen"
|
||||
Command="{Binding DeleteCommand}"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Width="100"
|
||||
Height="30"
|
||||
FontSize="14"
|
||||
/>
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Content="Abbrechen"
|
||||
Command="{Binding CancelCommand}"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Width="100"
|
||||
Height="30"
|
||||
FontSize="14"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
Apollon.WPF/Views/WarningDeleteView.xaml.cs
Normal file
28
Apollon.WPF/Views/WarningDeleteView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Apollon.WPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for WarningDeleteView.xaml
|
||||
/// </summary>
|
||||
public partial class WarningDeleteView : UserControl
|
||||
{
|
||||
public WarningDeleteView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user