This commit is contained in:
Natlinux
2022-11-13 19:54:03 +01:00
parent ee8c687f5c
commit 4a47b178f4
30 changed files with 827 additions and 25 deletions

View File

@@ -44,7 +44,8 @@ namespace Apollon.WPF.Commands
detailsViewModel.StartDate,
detailsViewModel.EndDate,
detailsViewModel.Location,
detailsViewModel.Rounds);
detailsViewModel.Rounds,
detailsViewModel.Targets);
try
{

View File

@@ -39,7 +39,8 @@ namespace Apollon.WPF.Commands
detailsViewModel.StartDate,
detailsViewModel.EndDate,
detailsViewModel.Location,
detailsViewModel.Rounds);
detailsViewModel.Rounds,
detailsViewModel.Targets);
try
{

View File

@@ -162,6 +162,20 @@ namespace Apollon.WPF.ViewModels
}
}
private int _targets;
public int Targets
{
get
{
return _targets;
}
set
{
_targets = value;
OnPropertyChanged(nameof(Targets));
}
}
private bool _isSubmitting;
public bool IsSubmitting
{

View File

@@ -33,6 +33,7 @@ namespace Apollon.WPF.ViewModels
EndDate = tournament.EndDate,
Location = tournament.Location,
Rounds = tournament.Rounds,
Targets = tournament.Targets,
};
}

View File

@@ -105,5 +105,19 @@ namespace Apollon.WPF.ViewModels
OnPropertyChanged(nameof(Country));
}
}
private int _qualification;
public int Qualification
{
get
{
return _qualification;
}
set
{
_qualification = value;
OnPropertyChanged(nameof(Qualification));
}
}
}
}

View File

@@ -7,7 +7,7 @@ using System.Windows.Input;
namespace Apollon.WPF.ViewModels
{
public class NavigationBarViewModel : ViewModelBase
public class NavBarTournamentDetailsViewModel : ViewModelBase
{
public ICommand NavigateNameListCommand { get;}
public ICommand GroupsCommand { get;}

View File

@@ -25,8 +25,9 @@ namespace Apollon.WPF.ViewModels
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
public string Location => SelectedTournament?.Location ?? "kein Ort";
public int Rounds => SelectedTournament?.Rounds ?? 0;
public int Targets => SelectedTournament?.Targets ?? 0;
public ICommand NavigateNavBarCommand { get; }
public ICommand NavigateTournamentDetailsCommand { get; }
public OverviewDetailsViewModel(SelectedTournamentsStore selectedTournamentStore, NavigationStore navigationStore, ModalNavigationStore modalNavigationStore,TournamentsStore tournamentsStore)
{
@@ -34,7 +35,7 @@ namespace Apollon.WPF.ViewModels
_selectedTournamentStore.SelectedTournamentChanged += SelectedTournamentStore_SelectedTournamentChanged;
NavigateNavBarCommand = new NavigateCommand<TournamentDetailsViewModel>(navigationStore, () => new TournamentDetailsViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
NavigateTournamentDetailsCommand = new NavigateCommand<TournamentDetailsViewModel>(navigationStore, () => new TournamentDetailsViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
}
protected override void Dispose()
@@ -57,6 +58,7 @@ namespace Apollon.WPF.ViewModels
OnPropertyChanged(nameof(EndDate));
OnPropertyChanged(nameof(Location));
OnPropertyChanged(nameof(Rounds));
OnPropertyChanged(nameof(Targets));
}
}
}

View File

@@ -27,6 +27,7 @@ namespace Apollon.WPF.ViewModels
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
public string Location => SelectedTournament?.Location ?? "kein Ort";
public int Rounds => SelectedTournament?.Rounds ?? 0;
public int Targets => SelectedTournament?.Targets ?? 0;
public ICommand NavigateOverviewCommand { get; }
public TournamentDetailsViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)

View File

@@ -144,8 +144,10 @@
HorizontalAlignment="Left"
VerticalContentAlignment="Center"
Background="LightGray"/>
<TextBox Grid.Row="6"
<WrapPanel Grid.Row="6"
Grid.Column="1"
VerticalAlignment="Center">
<TextBox
Text="{Binding Rounds}"
FontFamily="Arial"
FontSize="16"
@@ -154,6 +156,21 @@
VerticalContentAlignment="Center"
HorizontalAlignment="Left"
Background="LightGray"/>
<TextBlock
Margin="50 0 0 0"
Text="Anzahl der Scheiben: "
Style="{StaticResource ModalTextBlock}"/>
<TextBox
Text="{Binding Targets}"
FontFamily="Arial"
FontSize="16"
Height="30"
Width="50"
VerticalContentAlignment="Center"
HorizontalAlignment="Left"
Background="LightGray"/>
</WrapPanel>
<TextBlock Text="{Binding ErrorMessage}"
Grid.Row="7"

View File

@@ -137,7 +137,7 @@
</Image>
</WrapPanel>
<WrapPanel Margin="10" HorizontalAlignment="Center">
<WrapPanel Margin="5" HorizontalAlignment="Center">
<TextBlock Text="{Binding StartDate}"
TextAlignment="Center"
FontFamily="Arial"
@@ -198,7 +198,7 @@
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="10">
Margin="5">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Hidden"/>
@@ -216,7 +216,7 @@
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="10">
Margin="5">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Hidden"/>
@@ -233,7 +233,43 @@
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="10">
Margin="5">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Hidden"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</WrapPanel>
<WrapPanel HorizontalAlignment="Center">
<TextBlock Text="Anzahl der Scheiben:"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="5">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Hidden"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Text="{Binding Targets}"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="5">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Hidden"/>
@@ -247,13 +283,13 @@
</TextBlock>
</WrapPanel>
<Button
Content="Turnier öffnen"
FontSize="16"
Height="40"
Content="Turnier vorbereiten"
FontSize="14"
Height="35"
Width="150"
Margin="20"
Margin="10"
Cursor="Hand"
Command="{Binding NavigateNavBarCommand}">
Command="{Binding NavigateTournamentDetailsCommand}">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource ModernButton}">
<Setter Property="Visibility" Value="Hidden"/>
@@ -265,6 +301,44 @@
</Style>
</Button.Style>
</Button>
<Button
Content="Turnier durchführen"
FontSize="14"
Height="35"
Width="150"
Margin="10"
Cursor="Hand"
Command="{Binding NavigateNavBarCommand}">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource ModernButton}">
<Setter Property="Visibility" Value="Hidden"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button
Content="Turnier abschließen"
FontSize="14"
Height="35"
Width="150"
Margin="10"
Cursor="Hand"
Command="{Binding NavigateNavBarCommand}">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource ModernButton}">
<Setter Property="Visibility" Value="Hidden"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</StackPanel>
</Grid>
</UserControl>

View File

@@ -17,7 +17,8 @@
<DataGridTextColumn Width="150" Header="Verein" Binding="{Binding Society}" />
<DataGridTextColumn Width="120" Header="Vereinsnummer" Binding="{Binding SocietyNumber}"/>
<DataGridTextColumn Width="100" Header="Geburtsdatum" Binding="{Binding Birthday}" />
<DataGridTextColumn Header="Bundesland" Binding="{Binding Country}"/>
<DataGridTextColumn Header="Bundesland" Binding="{Binding Country}"/>
<DataGridTextColumn Header="Qualifikation" Binding="{Binding Qualification}"/>
</DataGrid.Columns>
</DataGrid>