stand 06.11.2022
This commit is contained in:
@@ -50,7 +50,7 @@ namespace Apollon.WPF.Commands
|
||||
await _tournamentStore.Add(tournament);
|
||||
|
||||
_modalNavigationStore.Close();
|
||||
_navigationStore.CurrentViewModel = new NavBarViewModel(_navigationStore, _selectedTournamentsStore, _modalNavigationStore, _tournamentStore);
|
||||
_navigationStore.CurrentViewModel = new TournamentDetailsViewModel(_navigationStore, _selectedTournamentsStore, _modalNavigationStore, _tournamentStore);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -49,8 +49,11 @@
|
||||
<DataTemplate DataType="{x:Type vms:OverviewViewModel}">
|
||||
<views:OverviewView/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vms:NavBarViewModel}">
|
||||
<views:NavBarView/>
|
||||
<DataTemplate DataType="{x:Type vms:TournamentDetailsViewModel}">
|
||||
<views:TournamentDetailsView/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vms:RootdatesViewModel}">
|
||||
<views:RootdatesView/>
|
||||
</DataTemplate>
|
||||
</ContentControl.Resources>
|
||||
</ContentControl>
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
_selectedTournamentStore.SelectedTournamentChanged += SelectedTournamentStore_SelectedTournamentChanged;
|
||||
|
||||
NavigateNavBarCommand = new NavigateCommand<NavBarViewModel>(navigationStore, () => new NavBarViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
|
||||
NavigateNavBarCommand = new NavigateCommand<TournamentDetailsViewModel>(navigationStore, () => new TournamentDetailsViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
|
||||
}
|
||||
|
||||
protected override void Dispose()
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace Apollon.WPF.ViewModels
|
||||
public bool HasErrorMessage => !string.IsNullOrEmpty(ErrorMessage);
|
||||
|
||||
public ICommand AddTournamentCommand { get; }
|
||||
public ICommand LoadTournamentsCommand { get; }
|
||||
public ICommand LoadTournamentsCommand { get; }
|
||||
public ICommand NavigateNameListCommand { get; }
|
||||
|
||||
public OverviewViewModel(TournamentsStore tournamentStore, SelectedTournamentsStore selectedTournamentStore,
|
||||
ModalNavigationStore modalNavigationStore, NavigationStore navigationStore)
|
||||
@@ -57,6 +58,8 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
LoadTournamentsCommand = new LoadTournamentsCommand(this, tournamentStore);
|
||||
AddTournamentCommand = new OpenAddTournamentCommand(tournamentStore, modalNavigationStore, navigationStore, selectedTournamentStore);
|
||||
NavigateNameListCommand = new NavigateCommand<RootdatesViewModel>(navigationStore, () => new RootdatesViewModel());
|
||||
|
||||
}
|
||||
|
||||
public static OverviewViewModel LoadViewModel(SelectedTournamentsStore selectedTournamentStore,
|
||||
|
||||
12
Apollon.WPF/ViewModels/RootdatesViewModel.cs
Normal file
12
Apollon.WPF/ViewModels/RootdatesViewModel.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class RootdatesViewModel : ViewModelBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ using System.Windows.Input;
|
||||
|
||||
namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class NavBarViewModel : ViewModelBase
|
||||
public class TournamentDetailsViewModel : ViewModelBase
|
||||
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Apollon.WPF.ViewModels
|
||||
public int Rounds => SelectedTournament?.Rounds ?? 0;
|
||||
|
||||
public ICommand NavigateOverviewCommand { get; }
|
||||
public NavBarViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
|
||||
public TournamentDetailsViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
|
||||
{
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(navigationStore, () => OverviewViewModel.LoadViewModel( selectedTournamentsStore, modalNavigationStore, tournamentsStore, navigationStore));
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
|
||||
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
|
||||
@@ -62,6 +62,15 @@
|
||||
Margin="40"
|
||||
Cursor="Hand"
|
||||
Command="{Binding AddTournamentCommand}"/>
|
||||
|
||||
<Button Style="{StaticResource ModernButton}"
|
||||
Content="Namenliste pflegen"
|
||||
FontSize="16"
|
||||
Height="40"
|
||||
Width="210"
|
||||
Margin="40"
|
||||
Cursor="Hand"
|
||||
Command="{Binding NavigateNameListCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Column="1"
|
||||
|
||||
15
Apollon.WPF/Views/RootdatesView.xaml
Normal file
15
Apollon.WPF/Views/RootdatesView.xaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="Apollon.WPF.Views.RootdatesView"
|
||||
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>
|
||||
<TextBlock Text="Stammdaten"
|
||||
FontSize="30"
|
||||
TextAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -16,11 +16,11 @@ using System.Windows.Shapes;
|
||||
namespace Apollon.WPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for NavBarView.xaml
|
||||
/// Interaction logic for NameListView.xaml
|
||||
/// </summary>
|
||||
public partial class NavBarView : UserControl
|
||||
public partial class RootdatesView : UserControl
|
||||
{
|
||||
public NavBarView()
|
||||
public RootdatesView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
<UserControl x:Class="Apollon.WPF.Views.NavBarView"
|
||||
<UserControl x:Class="Apollon.WPF.Views.TournamentDetailsView"
|
||||
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"
|
||||
xmlns:components="clr-namespace:Apollon.WPF.Views.Components"
|
||||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||
xmlns:local="clr-namespace:Apollon.WPF.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid Margin="45">
|
||||
<Grid Margin="50">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition/>
|
||||
@@ -31,17 +31,6 @@
|
||||
Foreground="#0000a0"/>
|
||||
</Button>
|
||||
|
||||
<components:TournamentDetails Grid.Column="1"/>
|
||||
<StackPanel Grid.Row="1">
|
||||
<Button Height="45"
|
||||
Background="Transparent"/>
|
||||
<Button Height="45"
|
||||
Background="Transparent"/>
|
||||
<Button Height="45"
|
||||
Background="Transparent"/>
|
||||
<Button Height="45"
|
||||
Background="Transparent"/>
|
||||
</StackPanel>
|
||||
|
||||
<components:TournamentDetails Grid.Column="1"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
Apollon.WPF/Views/TournamentDetailsView.xaml.cs
Normal file
28
Apollon.WPF/Views/TournamentDetailsView.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 TournamentDetailsView.xaml
|
||||
/// </summary>
|
||||
public partial class TournamentDetailsView : UserControl
|
||||
{
|
||||
public TournamentDetailsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user