clean up a bit

This commit is contained in:
Natlinux81
2022-08-17 01:36:42 +02:00
parent 4531f31658
commit b10a792aad
15 changed files with 80 additions and 56 deletions

View File

@@ -32,7 +32,7 @@ namespace Apollon.WPF.Commands
public override async Task ExecuteAsync(object parameter)
{
AddEditDetailsViewModel formViewModel = _addTournamentViewModel.AddEditDetailsViewModel;
Tournament tournament = new Tournament(formViewModel.Organisation,formViewModel.Tournamentname, formViewModel.Category, formViewModel.Startdate, formViewModel.Enddate,
Tournament tournament = new Tournament(formViewModel.Organisation,formViewModel.Tournamentname, formViewModel.Competition, formViewModel.Startdate, formViewModel.Enddate,
formViewModel.Location, formViewModel.Rounds);
try

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -10,12 +10,12 @@
mc:Ignorable="d"
Title="Apollon Auswertung Bogen"
Height="680"
Width="1080"
Width="1100"
WindowStartupLocation="CenterScreen"
Background="Transparent"
AllowsTransparency="True"
WindowStyle="None"
ResizeMode="CanResizeWithGrip">
ResizeMode="NoResize">
<Window.Resources>
<DataTemplate DataType="{x:Type vms:AddTournamentViewModel}">
<views:AddTournamentView/>
@@ -24,8 +24,6 @@
<views:EditTournamentView/>
</DataTemplate>
</Window.Resources>
<ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
@@ -74,5 +72,4 @@
Click="Button_Exit"/>
</WrapPanel>
</Grid>
</ScrollViewer>
</Window>

View File

@@ -8,11 +8,11 @@ namespace Apollon.WPF.Models
{
public class Tournament
{
public Tournament(string organisation, string tournamentname, string category, string startdate, string enddate, string location, int rounds = 0)
public Tournament(string organisation, string tournamentname, string competition, string startdate, string enddate, string location, int rounds = 0)
{
Organisation = organisation;
Tournamentname = tournamentname;
Category = category;
Competition = competition;
Startdate = startdate;
Enddate = enddate;
Location = location;
@@ -21,7 +21,7 @@ namespace Apollon.WPF.Models
public string Organisation { get; }
public string Tournamentname { get; }
public string Category { get; }
public string Competition { get; }
public string Startdate { get; }
public string Enddate { get; }
public string Location { get; }

View File

@@ -39,7 +39,7 @@ namespace Apollon.WPF.ViewModels
}
private string _category;
public string Category
public string Competition
{
get
{
@@ -48,7 +48,7 @@ namespace Apollon.WPF.ViewModels
set
{
_category = value;
OnPropertyChanged(nameof(Category));
OnPropertyChanged(nameof(Competition));
}
}

View File

@@ -22,7 +22,7 @@ namespace Apollon.WPF.ViewModels
{
Organisation = tournament.Organisation,
Tournamentname = tournament.Tournamentname,
Category = tournament.Category,
Competition = tournament.Competition,
Startdate = tournament.Startdate,
Enddate = tournament.Enddate,
Location = tournament.Location,

View File

@@ -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?.Category ?? "keine Kategorie";
public string Category => SelectedTournament?.Competition ?? "keine Kategorie";
public string Startdate => SelectedTournament?.Startdate ?? "kein Datum";
public string Enddate => SelectedTournament?.Enddate ?? "kein Datum";
public string Location => SelectedTournament?.Location ?? "kein Ort";

View File

@@ -13,6 +13,7 @@ namespace Apollon.WPF.ViewModels
public Tournament Tournament { get;}
public string Tournamentname => Tournament.Tournamentname;
public string Location => Tournament.Location;
public ICommand DeleteCommand { get; }
public OverviewListingItemViewModel(Tournament tournament)

View File

@@ -27,7 +27,7 @@
Text="Turniername: "
Style="{StaticResource ModalTextBlock}"/>
<TextBlock Grid.Row="2"
Text="Kategorie: "
Text="Wettkampfart: "
Style="{StaticResource ModalTextBlock}"/>
<TextBlock Grid.Row="3"
Text="Startdatum: "
@@ -59,11 +59,11 @@
Background="LightGray"/>
<ComboBox Grid.Row="2"
Grid.Column="1"
ItemsSource="{Binding Category}"
Height="30"
Width="150"
FontSize="16"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"/>
VerticalContentAlignment="Center"
HorizontalAlignment="Left"/>
<DatePicker Grid.Row="3"
Grid.Column="1"

View File

@@ -17,7 +17,7 @@
FontWeight="Bold"
Background="Transparent"
BorderBrush="Transparent"
Padding="20"
Padding="5"
ItemsSource="{Binding OverviewListingItemViewModels}"
SelectedItem="{Binding SelectedOverviewListingItemViewModel}">
<ListView.ItemContainerStyle>
@@ -32,7 +32,12 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Tournamentname}"/>
<WrapPanel Grid.Column="0">
<TextBlock Text="{Binding Tournamentname}"
Margin="0 0 4 0"/>
<TextBlock Text="{Binding Location}"/>
</WrapPanel>
<Button Grid.Column="1"
Background="Transparent"
BorderThickness="0"

View File

@@ -71,8 +71,10 @@
</Style>
</TextBlock.Style>
</TextBlock>
<WrapPanel HorizontalAlignment="Center">
<TextBlock Text="{Binding Category}"
TextAlignment="Center"
VerticalAlignment="Center"
FontFamily="Arial"
FontWeight="Bold"
FontSize="14"
@@ -89,6 +91,24 @@
</Style>
</TextBlock.Style>
</TextBlock>
<Image Grid.Column="2"
Grid.Row="2"
Source="D:\Projekte\Apollon\Apollon\Apollon.WPF\Images\TargetField.png"
Width="50"
Height="50">
<Image.Style>
<Style TargetType="Image">
<Setter Property="Visibility" Value="Hidden"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</WrapPanel>
<WrapPanel Margin="10" HorizontalAlignment="Center">
<TextBlock Text="vom "
TextAlignment="Center"

View File

@@ -15,8 +15,8 @@
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
@@ -61,7 +61,7 @@
<Image Grid.Column="2"
Grid.Row="2"
Source="D:\Projekte\Apollon\Apollon\Apollon.WPF\Images\Scheibe.png"
Source="D:\Projekte\Apollon\Apollon\Apollon.WPF\Images\Archery.png"
Width="250"
Height="250">
</Image>
@@ -89,6 +89,7 @@
Foreground="#0000a0"/>
<components:OverViewListing Height="400"
Width="400"
DataContext="{Binding OverviewListingViewModel}"/>
</StackPanel>