combobox not ready
This commit is contained in:
21
Apollon.WPF/Models/Competition.cs
Normal file
21
Apollon.WPF/Models/Competition.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Apollon.WPF.Models
|
||||||
|
{
|
||||||
|
public class Competition
|
||||||
|
{
|
||||||
|
public Competition(string competitionName, byte competitionImage)
|
||||||
|
{
|
||||||
|
CompetitionName = competitionName;
|
||||||
|
CompetitionImage = competitionImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string CompetitionName { get; set; }
|
||||||
|
|
||||||
|
public byte CompetitionImage { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,16 +39,16 @@ namespace Apollon.WPF.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _category;
|
private string _competition;
|
||||||
public string Competition
|
public string Competition
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return _category;
|
return _competition;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_category = value;
|
_competition = value;
|
||||||
OnPropertyChanged(nameof(Competition));
|
OnPropertyChanged(nameof(Competition));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Apollon.WPF.ViewModels
|
|||||||
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?.Competition ?? "keine Kategorie";
|
public string Competition => SelectedTournament?.Competition ?? "keine Kategorie";
|
||||||
public string StartDate => SelectedTournament?.StartDate.ToString("d") ?? "kein Datum";
|
public string StartDate => SelectedTournament?.StartDate.ToString("d") ?? "kein Datum";
|
||||||
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
|
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
|
||||||
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
||||||
@@ -41,7 +41,7 @@ namespace Apollon.WPF.ViewModels
|
|||||||
OnPropertyChanged(nameof(HasSelectedTournament));
|
OnPropertyChanged(nameof(HasSelectedTournament));
|
||||||
OnPropertyChanged(nameof(Organisation));
|
OnPropertyChanged(nameof(Organisation));
|
||||||
OnPropertyChanged(nameof(TournamentName));
|
OnPropertyChanged(nameof(TournamentName));
|
||||||
OnPropertyChanged(nameof(Category));
|
OnPropertyChanged(nameof(Competition));
|
||||||
OnPropertyChanged(nameof(StartDate));
|
OnPropertyChanged(nameof(StartDate));
|
||||||
OnPropertyChanged(nameof(EndDate));
|
OnPropertyChanged(nameof(EndDate));
|
||||||
OnPropertyChanged(nameof(Location));
|
OnPropertyChanged(nameof(Location));
|
||||||
|
|||||||
@@ -57,11 +57,14 @@
|
|||||||
Height="30"
|
Height="30"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Background="LightGray"/>
|
Background="LightGray"/>
|
||||||
<ComboBox Grid.Row="2"
|
<ComboBox Grid.Row="2"
|
||||||
|
Text="{Binding Competition}"
|
||||||
|
IsEditable="True"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Height="30"
|
Height="30"
|
||||||
Width="150"
|
Width="150"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
|
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalAlignment="Left"/>
|
HorizontalAlignment="Left"/>
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
</TextBlock.Style>
|
</TextBlock.Style>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<WrapPanel HorizontalAlignment="Center">
|
<WrapPanel HorizontalAlignment="Center">
|
||||||
<TextBlock Text="{Binding Category}"
|
<TextBlock Text="{Binding Competition}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
|
|||||||
Reference in New Issue
Block a user