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
|
||||
{
|
||||
get
|
||||
{
|
||||
return _category;
|
||||
return _competition;
|
||||
}
|
||||
set
|
||||
{
|
||||
_category = value;
|
||||
_competition = value;
|
||||
OnPropertyChanged(nameof(Competition));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Apollon.WPF.ViewModels
|
||||
public bool HasSelectedTournament => SelectedTournament != null;
|
||||
public string Organisation => SelectedTournament?.Organisation ?? "keine Organisation";
|
||||
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 EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
|
||||
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
||||
@@ -41,7 +41,7 @@ namespace Apollon.WPF.ViewModels
|
||||
OnPropertyChanged(nameof(HasSelectedTournament));
|
||||
OnPropertyChanged(nameof(Organisation));
|
||||
OnPropertyChanged(nameof(TournamentName));
|
||||
OnPropertyChanged(nameof(Category));
|
||||
OnPropertyChanged(nameof(Competition));
|
||||
OnPropertyChanged(nameof(StartDate));
|
||||
OnPropertyChanged(nameof(EndDate));
|
||||
OnPropertyChanged(nameof(Location));
|
||||
|
||||
@@ -57,11 +57,14 @@
|
||||
Height="30"
|
||||
VerticalContentAlignment="Center"
|
||||
Background="LightGray"/>
|
||||
<ComboBox Grid.Row="2"
|
||||
<ComboBox Grid.Row="2"
|
||||
Text="{Binding Competition}"
|
||||
IsEditable="True"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Width="150"
|
||||
FontSize="16"
|
||||
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalAlignment="Left"/>
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<WrapPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="{Binding Category}"
|
||||
<TextBlock Text="{Binding Competition}"
|
||||
TextAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="Arial"
|
||||
|
||||
Reference in New Issue
Block a user