edited SelectedTournamenStore

This commit is contained in:
Natlinux81
2022-08-11 22:28:51 +02:00
parent 960cf715ef
commit 914631eaed
3 changed files with 33 additions and 8 deletions

View File

@@ -8,19 +8,21 @@ namespace Apollon.WPF.Models
{
public class Tournament
{
public Tournament(string organisation, string tournamentname, string category, DateTime datetime, string location)
public Tournament(string organisation, string tournamentname, string category, DateTime startdate, DateTime enddate, string location)
{
Organisation = organisation;
Tournamentname = tournamentname;
Category = category;
Datetime = datetime;
Startdate = startdate;
Enddate = enddate;
Location = location;
}
public string Organisation { get; }
public string Tournamentname { get; }
public string Category { get; }
public DateTime Datetime { get; }
public DateTime Startdate { get; }
public DateTime Enddate { get; }
public string Location { get; }
}
}

View File

@@ -18,7 +18,8 @@ namespace Apollon.WPF.ViewModels
public string Organisation => _selectedTournament?.Organisation ?? "keine Organisation";
public string Tournamentname => _selectedTournament?.Tournamentname ?? "kein Name";
public string Category => _selectedTournament?.Category ?? "keine Kategorie";
//public DateTime Datetime => _selectedTournament
public DateTime Startdate => _selectedTournament?.Startdate ?? DateTime.MinValue;
public DateTime Enddate => _selectedTournament?.Enddate ?? DateTime.MinValue;
public string Location => _selectedTournament?.Location ?? "kein Ort";
public ApollonOverviewDetailsViewModel(SelectedTournamentStore selectedTournamentStore)

View File

@@ -18,21 +18,43 @@
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="40"/>
<TextBlock Text="{Binding Datetime}"
Margin="10"/>
<TextBlock Text="{Binding Organisation}"
TextAlignment="Center"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="0,0,0,40"/>
Margin="10"/>
<TextBlock Text="{Binding Category}"
TextAlignment="Center"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="10"/>
<WrapPanel Margin="10">
<TextBlock Text="{Binding Startdate}"
TextAlignment="Center"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"/>
<TextBlock Text="{Binding Enddate}"
TextAlignment="Center"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"/>
</WrapPanel>
<TextBlock Text="{Binding Location}"
TextAlignment="Center"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
Foreground="#0000a0"
Margin="0,0,0,40"/>
Margin="10"/>
</StackPanel>
</Grid>
</UserControl>