StartView finished
This commit is contained in:
@@ -12,15 +12,15 @@ namespace Apollon.WPF.ViewModels
|
|||||||
{
|
{
|
||||||
private readonly SelectedTournamentStore _selectedTournamentStore;
|
private readonly SelectedTournamentStore _selectedTournamentStore;
|
||||||
|
|
||||||
private Tournament _selectedTournament => _selectedTournamentStore.SelectedTournament;
|
private Tournament SelectedTournament => _selectedTournamentStore.SelectedTournament;
|
||||||
|
|
||||||
public bool hasSelectedTournament => _selectedTournament != null;
|
public bool HasSelectedTournament => SelectedTournament != null;
|
||||||
public string Organisation => _selectedTournament?.Organisation ?? "keine Organisation";
|
public string Organisation => SelectedTournament?.Organisation ?? "keine Organisation";
|
||||||
public string Tournamentname => _selectedTournament?.Tournamentname ?? "kein Name";
|
public string Tournamentname => SelectedTournament?.Tournamentname ?? "kein Name";
|
||||||
public string Category => _selectedTournament?.Category ?? "keine Kategorie";
|
public string Category => SelectedTournament?.Category ?? "keine Kategorie";
|
||||||
public string Startdate => _selectedTournament?.Startdate ?? "kein Datum";
|
public string Startdate => SelectedTournament?.Startdate ?? "kein Datum";
|
||||||
public string Enddate => _selectedTournament?.Enddate ?? "kein Datum";
|
public string Enddate => SelectedTournament?.Enddate ?? "kein Datum";
|
||||||
public string Location => _selectedTournament?.Location ?? "kein Ort";
|
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
||||||
|
|
||||||
public ApollonOverviewDetailsViewModel(SelectedTournamentStore selectedTournamentStore)
|
public ApollonOverviewDetailsViewModel(SelectedTournamentStore selectedTournamentStore)
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ namespace Apollon.WPF.ViewModels
|
|||||||
|
|
||||||
private void SelectedTournamentStore_SelectedTournamentChanged()
|
private void SelectedTournamentStore_SelectedTournamentChanged()
|
||||||
{
|
{
|
||||||
OnPropertyChanged(nameof(hasSelectedTournament));
|
OnPropertyChanged(nameof(HasSelectedTournament));
|
||||||
OnPropertyChanged(nameof(Organisation));
|
OnPropertyChanged(nameof(Organisation));
|
||||||
OnPropertyChanged(nameof(Tournamentname));
|
OnPropertyChanged(nameof(Tournamentname));
|
||||||
OnPropertyChanged(nameof(Category));
|
OnPropertyChanged(nameof(Category));
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<ColumnDefinition></ColumnDefinition>
|
<ColumnDefinition></ColumnDefinition>
|
||||||
<ColumnDefinition></ColumnDefinition>
|
<ColumnDefinition></ColumnDefinition>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border CornerRadius="20" Grid.RowSpan="2" Grid.ColumnSpan="3">
|
<Border CornerRadius="10" Grid.RowSpan="2" Grid.ColumnSpan="3">
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
||||||
<GradientStop Color="#d7e8fd" Offset="0.2"/>
|
<GradientStop Color="#d7e8fd" Offset="0.2"/>
|
||||||
|
|||||||
@@ -11,63 +11,175 @@
|
|||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="10">
|
CornerRadius="10">
|
||||||
</Border>
|
</Border>
|
||||||
<StackPanel>
|
|
||||||
<TextBlock Text="{Binding Tournamentname}"
|
<TextBlock Text="erstelle eine neues Tournier oder wähle ein vorhandenes Tournier um es zu bearbeiten!"
|
||||||
|
TextAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="Arial"
|
||||||
|
FontWeight="Bold"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="#0000a0"
|
||||||
|
Padding="25"
|
||||||
|
TextWrapping="WrapWithOverflow">
|
||||||
|
<TextBlock.Style>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="Visibility" Value="Hidden"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="false">
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</TextBlock.Style>
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="{Binding Tournamentname}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"
|
Foreground="#0000a0"
|
||||||
Margin="10"/>
|
Margin="10">
|
||||||
<TextBlock Text="{Binding Organisation}"
|
<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 Organisation}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"
|
Foreground="#0000a0"
|
||||||
Margin="10"/>
|
Margin="10">
|
||||||
<TextBlock Text="{Binding Category}"
|
<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 Category}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"
|
Foreground="#0000a0"
|
||||||
Margin="10"/>
|
Margin="10">
|
||||||
<WrapPanel Margin="10" HorizontalAlignment="Center">
|
<TextBlock.Style>
|
||||||
<TextBlock Text="vom "
|
<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 Margin="10" HorizontalAlignment="Center">
|
||||||
|
<TextBlock Text="vom "
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"/>
|
Foreground="#0000a0">
|
||||||
<TextBlock Text="{Binding Startdate}"
|
<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 Startdate}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"
|
Foreground="#0000a0"
|
||||||
Margin="0 0 5 0"/>
|
Margin="0 0 5 0">
|
||||||
<TextBlock Text="bis "
|
<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="bis "
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"/>
|
Foreground="#0000a0">
|
||||||
<TextBlock Text="{Binding Enddate}"
|
<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 Enddate}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"/>
|
Foreground="#0000a0">
|
||||||
</WrapPanel>
|
<TextBlock.Style>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
<TextBlock Text="{Binding Location}"
|
<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>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Location}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#0000a0"
|
Foreground="#0000a0"
|
||||||
Margin="10"/>
|
Margin="10">
|
||||||
</StackPanel>
|
<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>
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user