Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit bd8edf0

Browse files
Changed UI from Panel-Nonesense to a DataGrid;
1 parent 68bf288 commit bd8edf0

File tree

8 files changed

+143
-155
lines changed

8 files changed

+143
-155
lines changed

App1/BootsSuche.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<ColumnDefinition Width="*" />
9191
<ColumnDefinition Width="Auto" />
9292
</Grid.ColumnDefinitions>
93-
<TextBlock Grid.Column="0" Text="Bearbeitung: Athletendaten" VerticalAlignment="Center" Style="{ThemeResource SubtitleTextBlockStyle}" FocusVisualPrimaryBrush="White" Foreground="White" HorizontalAlignment="Left"></TextBlock>
93+
<TextBlock Grid.Column="0" Text="Suche: Bootsaufschlüsselung" VerticalAlignment="Center" Style="{ThemeResource SubtitleTextBlockStyle}" FocusVisualPrimaryBrush="White" Foreground="White" HorizontalAlignment="Left"></TextBlock>
9494
<TextBox Grid.Column="1" Background="#E5FFFFFF" x:Name="searchbox" PlaceholderText="Suche nach Startnummer, Verein, Steuermann/frau, oder Athlet/in" Margin="20,0"
9595
Visibility="Visible" Foreground="White" FocusVisualPrimaryBrush="White" FontFamily="Segoe UI" FocusVisualSecondaryBrush="#99FFFFFF" Height="40" VerticalAlignment="Center" AcceptsReturn="False" TextChanged="Searchbox_TextChanged" Width="Auto" FontSize="18"/>
9696
<AppBarButton Grid.Column="2" Icon="Filter" Label="Filter" Width="Auto" HorizontalAlignment="Right" Foreground="White">

App1/BootsdatenBearbeiten.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Windows.UI.Xaml;
55
using Windows.UI.Xaml.Controls;
66

7-
// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert.
7+
88

99
namespace App1
1010
{

App1/Konflikte.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Windows.UI.Xaml.Controls;
22

3-
// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert.
3+
44

55
namespace App1
66
{

App1/SettingsPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Windows.UI.Xaml.Controls;
22

3-
// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert.
3+
44

55
namespace App1
66
{

App1/VereinssSuche.xaml

Lines changed: 75 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -3,142 +3,85 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:local="using:App1"
6-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8-
xmlns:local1="using:DataAccessLibrary"
9-
mc:Ignorable="d"
10-
11-
Background="{ThemeResource SystemControlBackgroundAltMediumBrush}">
12-
6+
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
xmlns:dataaccesslibrary="using:DataAccessLibrary"
10+
mc:Ignorable="d">
1311
<Grid>
1412
<StackPanel VerticalAlignment="Top">
15-
<Rectangle HorizontalAlignment="Stretch" Fill="#FF003666" Height="100" VerticalAlignment="Top" Margin="-12,0,-12,0"/>
13+
<Rectangle HorizontalAlignment="Stretch" Fill="#FF003666" Height="118" VerticalAlignment="Top" Margin="-12,0,-12,0"/>
1614
</StackPanel>
17-
<Button x:Name="goButton" Background="#E5FFFFFF" Content="&#xE721;" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,35,150,0" VerticalContentAlignment="Stretch" Height="53" Width="59" FontWeight="Bold" FontSize="36" HorizontalContentAlignment="Stretch" FontFamily="Segoe MDL2 Assets"/>
18-
<TextBox Background="#E5FFFFFF" x:Name="searchbox" PlaceholderText="Suche nach Startnummer, Verein, Steuermann/frau, oder Athlet/in" Margin="149,35,250,0"
19-
Visibility="Visible" RenderTransformOrigin="0.505,-2.686" Foreground="White" FocusVisualPrimaryBrush="White" FontFamily="Segoe UI" FocusVisualSecondaryBrush="#99FFFFFF" Height="50" VerticalAlignment="Top" TextChanged="Searchbox_TextChanged"/>
20-
21-
<!--
22-
<Grid VerticalAlignment="Bottom" Height="400">
23-
<Rectangle HorizontalAlignment="Stretch" Fill="#FF003666" VerticalAlignment="Bottom" Margin="-12,0,-12,0" Height="400"/>
24-
<RelativePanel Margin="0,0,0,175">
25-
<ListView Name="Vereinsbootslisting"
26-
SelectionMode="None"
27-
ScrollViewer.VerticalScrollBarVisibility="Auto"
28-
ScrollViewer.IsVerticalRailEnabled="True"
29-
ScrollViewer.VerticalScrollMode="Disabled"
30-
ScrollViewer.HorizontalScrollMode="Disabled"
31-
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
32-
ScrollViewer.IsHorizontalRailEnabled="False"
33-
Margin="20">
34-
<ListView.HeaderTemplate>
35-
<DataTemplate>
36-
<StackPanel Orientation="Horizontal" >
37-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Abteilung"/>
38-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Startnummer"/>
39-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Rennbezeichnung"/>
40-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Verein"/>
41-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Steuermann/frau"/>
42-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 8"/>
43-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 7"/>
44-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 6"/>
45-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 5"/>
46-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 4"/>
47-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 3"/>
48-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 2"/>
49-
<TextBlock Margin="8,0" Width="80" Foreground="White" Text="Athlet 1"/>
50-
</StackPanel>
51-
</DataTemplate>
52-
</ListView.HeaderTemplate>
53-
<ListView.ItemTemplate>
54-
<DataTemplate x:DataType="local1:Boot">
55-
<StackPanel Orientation="Horizontal" >
56-
<TextBlock
57-
Text="{x:Bind abteilung}"
58-
Margin="8,0" Width="80" Foreground="White"/>
59-
<TextBlock
60-
Text="{x:Bind startnummer}"
61-
Margin="8,0" Width="80" Foreground="White"/>
62-
<TextBlock Text="{x:Bind Rennbezeichnung}"
63-
Margin="8,0" Width="80" Foreground="White"/>
64-
<TextBlock Text="{x:Bind verein}"
65-
Width="100" />
66-
<TextBlock Text="{x:Bind steuerling}"
67-
Margin="8,0" Width="80" Foreground="White"/>
68-
<TextBlock Text="{x:Bind Athlet8}"
69-
Margin="8,0" Width="80" Foreground="White"/>
70-
<TextBlock Text="{x:Bind Athlet7}"
71-
Margin="8,0" Width="80" Foreground="White"/>
72-
<TextBlock Text="{x:Bind Athlet6}"
73-
Margin="8,0" Width="80" Foreground="White"/>
74-
<TextBlock Text="{x:Bind Athlet5}"
75-
Width="80" />
76-
<TextBlock Text="{x:Bind Athlet4}"
77-
Margin="8,0" Width="80" Foreground="White"/>
78-
<TextBlock Text="{x:Bind Athlet3}"
79-
Margin="8,0" Width="80" Foreground="White"/>
80-
<TextBlock Text="{x:Bind Athlet2}"
81-
Margin="8,0" Width="80" Foreground="White"/>
82-
<TextBlock Text="{x:Bind Athlet1}"
83-
Margin="8,0" Width="80" Foreground="White"/>
84-
</StackPanel>
85-
</DataTemplate>
86-
</ListView.ItemTemplate>
87-
</ListView>
88-
</RelativePanel>
89-
<ToggleButton x:Name="Bezahlt_Button" Content="Bezahlt" Margin="25,20,20,20" Height="150" FontWeight="Bold" FontFamily="Segoe UI Black" FontSize="36" Foreground="White" FocusVisualSecondaryBrush="#FFD10000" RequestedTheme="Light" Background="#FF2AF63B" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
90-
<ToggleButton.FocusVisualPrimaryBrush>
91-
<SolidColorBrush Color="#FFD10000"/>
92-
</ToggleButton.FocusVisualPrimaryBrush>
93-
</ToggleButton>
15+
<Grid>
16+
<Grid.Resources>
17+
<DataTemplate x:Key="RowDetailsTemplate" x:DataType="dataaccesslibrary:Verein">
18+
<StackPanel>
19+
<TextBlock Margin="20" Text="Hier sind die Boote für den ausgewählten Verein:" />
20+
<ToggleButton x:Name="Bezahlt_Button" Content="Bezahlt" Margin="25,20,20,20" Height="150" FontWeight="Bold" FontFamily="Segoe UI Black" FontSize="36" Foreground="White" FocusVisualSecondaryBrush="#FFD10000" RequestedTheme="Light" Background="#FF2AF63B" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
21+
<ToggleButton.FocusVisualPrimaryBrush>
22+
<SolidColorBrush Color="#FFD10000"/>
23+
</ToggleButton.FocusVisualPrimaryBrush>
24+
</ToggleButton>
25+
</StackPanel>
26+
</DataTemplate>
27+
</Grid.Resources>
28+
<Grid.RowDefinitions>
29+
<RowDefinition Height="Auto" MinHeight="80" />
30+
<RowDefinition />
31+
</Grid.RowDefinitions>
32+
<Grid Margin="12">
33+
<Grid.ColumnDefinitions>
34+
<ColumnDefinition Width="300"/>
35+
<ColumnDefinition Width="*" />
36+
<ColumnDefinition Width="Auto" />
37+
</Grid.ColumnDefinitions>
38+
<TextBlock Grid.Column="0" Text="Suche: Vereinsaufschlüsselung" VerticalAlignment="Center" Style="{ThemeResource SubtitleTextBlockStyle}" FocusVisualPrimaryBrush="White" Foreground="White" HorizontalAlignment="Left"></TextBlock>
39+
<TextBox Grid.Column="1" Background="#E5FFFFFF" x:Name="searchbox" PlaceholderText="Suche nach Startnummer, Verein, Steuermann/frau, oder Athlet/in" Margin="20,0"
40+
Visibility="Visible" Foreground="White" FocusVisualPrimaryBrush="White" FontFamily="Segoe UI" FocusVisualSecondaryBrush="#99FFFFFF" Height="40" VerticalAlignment="Center" AcceptsReturn="False" TextChanged="Searchbox_TextChanged" Width="Auto" FontSize="18"/>
41+
<AppBarButton Grid.Column="2" Icon="Filter" Label="Filter" Width="Auto" HorizontalAlignment="Right" Foreground="White">
42+
<AppBarButton.Flyout>
43+
<MenuFlyout>
44+
<MenuFlyoutItem x:Name="FilterBezahlt" Text="Hat schon Bezahlt" Click="FilterBezahlt_Click" />
45+
<MenuFlyoutItem x:Name="FilternichtBezahlt" Text="Muss noch Zahlen" Click="FilternichtBezahlt_Click" />
46+
<MenuFlyoutSeparator />
47+
<MenuFlyoutItem x:Name="clearFilterAbteilung" Text="Nicht Filtern oder Suchen" Click="ClearFilter_Click" />
48+
</MenuFlyout>
49+
</AppBarButton.Flyout>
50+
</AppBarButton>
51+
</Grid>
52+
<controls:DataGrid
53+
Grid.Row="1"
54+
x:Name="dataGrid"
55+
Margin="-11,5,-11,0"
56+
HorizontalScrollBarVisibility="Auto"
57+
VerticalScrollBarVisibility="Auto"
58+
AlternatingRowForeground="Black"
59+
AreRowDetailsFrozen="True"
60+
AreRowGroupHeadersFrozen="True"
61+
AutoGenerateColumns="False"
62+
CanUserSortColumns="True"
63+
CanUserReorderColumns="True"
64+
CanUserResizeColumns="True"
65+
ColumnHeaderHeight="32"
66+
GridLinesVisibility="Horizontal"
67+
HeadersVisibility="Column"
68+
IsReadOnly="True"
69+
RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
70+
RowDetailsVisibilityMode="VisibleWhenSelected"
71+
SelectionMode="Extended"
72+
RowGroupHeaderPropertyNameAlternative="Athletensbearbeitung" HorizontalGridLinesBrush="#7F000000" VerticalGridLinesBrush="{x:Null}">
73+
<controls:DataGrid.Columns>
74+
<controls:DataGridTextColumn Header="Verein" Binding="{Binding Vereinsname}" Tag="Verein" />
75+
<controls:DataGridTextColumn Header="Anzahl Boote" Binding="{Binding AnzahlBoote}" Tag="Startnummer" />
76+
<controls:DataGridTextColumn Header="Bisher gesammt Bezahlt [€]" Binding="{Binding BisherGesammtBezahlt}" Tag="Rennbezeichnung" />
77+
<controls:DataGridTextColumn Header="Gesammt zu Zahlen [€]" Binding="{Binding GesammtZuZahlen}" Tag="Verein" />
78+
<controls:DataGridTextColumn Header="Summe [€]" Binding="{Binding Total}" Tag="Verein" />
79+
</controls:DataGrid.Columns>
80+
</controls:DataGrid>
81+
<Viewbox/>
9482
</Grid>
95-
-->
96-
<StackPanel Margin="0,100,0,400" HorizontalAlignment="Center">
97-
<RelativePanel>
98-
<ListView Name="Vereeinssearchlisting"
99-
SelectionMode="Extended"
100-
ScrollViewer.VerticalScrollBarVisibility="Auto"
101-
ScrollViewer.IsVerticalRailEnabled="True"
102-
ScrollViewer.VerticalScrollMode="Enabled"
103-
ScrollViewer.HorizontalScrollMode="Enabled"
104-
ScrollViewer.HorizontalScrollBarVisibility="Auto"
105-
ScrollViewer.IsHorizontalRailEnabled="True"
106-
Margin="20" SelectionChanged="Vereeinssearchlisting_SelectionChanged">
107-
<ListView.HeaderTemplate>
108-
<DataTemplate>
109-
<StackPanel Orientation="Horizontal" >
110-
<TextBlock Margin="8,0" Width="300" Foreground="Black" Text="Verein"/>
111-
<TextBlock Margin="8,0" Width="150" Foreground="Black" Text="Anzahl Boote"/>
112-
<TextBlock Margin="8,0" Width="150" Foreground="Black" Text="Bisher gesammt Bezahlt [€]"/>
113-
<TextBlock Margin="8,0" Width="150" Foreground="Black" Text="Gesammt zu Zahlen [€]"/>
114-
<TextBlock Margin="8,0" Width="150" Foreground="Black" Text="Total Gezahlt [€]"/>
115-
</StackPanel>
116-
</DataTemplate>
117-
</ListView.HeaderTemplate>
118-
<ListView.ItemTemplate>
119-
<DataTemplate x:DataType="local1:Verein">
120-
<StackPanel Orientation="Horizontal" >
121-
<TextBlock
122-
Text="{x:Bind Vereinsname}"
123-
Margin="8,0" Width="300" Foreground="Black"/>
124-
<TextBlock
125-
Text="{x:Bind AnzahlBoote}"
126-
Margin="8,0" Width="150" Foreground="Black"/>
127-
<TextBlock Text="{x:Bind BisherGesammtBezahlt}"
128-
Margin="8,0" Width="150" Foreground="Black"/>
129-
<TextBlock Text="{x:Bind GesammtZuZahlen}"
130-
Margin="8,0" Width="150" Foreground="Black"/>
131-
<TextBlock Text="{x:Bind Total}"
132-
Margin="8,0" Width="150" Foreground="Black"/>
133-
</StackPanel>
134-
</DataTemplate>
135-
</ListView.ItemTemplate>
136-
</ListView>
137-
</RelativePanel>
138-
</StackPanel>
139-
140-
141-
14283

14384
</Grid>
14485
</Page>
86+
87+

App1/VereinssSuche.xaml.cs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
using DataAccessLibrary;
22
using System;
33
using System.Collections.ObjectModel;
4+
using Windows.UI.Xaml;
45
using Windows.UI.Xaml.Controls;
56

6-
// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert.
7+
78

89
namespace App1
910
{
@@ -12,21 +13,34 @@ namespace App1
1213
/// </summary>
1314
public sealed partial class VereinssSuche : Page
1415
{
15-
private ObservableCollection<Verein> vereinsanzeige = new ObservableCollection<Verein>();
16-
1716
public VereinssSuche()
1817
{
1918
this.InitializeComponent();
20-
vereinsanzeige = DataAccess.GetVereineVereinssuche();
21-
Vereeinssearchlisting.ItemsSource = vereinsanzeige;
19+
dataGrid.ItemsSource = DataAccessLibrary.DataAccess.GetVereineVereinssuche();
20+
}
21+
22+
private void FilterBezahlt_Click(object _, RoutedEventArgs _1)
23+
{
24+
dataGrid.ItemsSource = DataAccessLibrary.DataAccess.GetVereineVereinssuche(true);
25+
}
26+
27+
private void FilternichtBezahlt_Click(object sender, RoutedEventArgs e)
28+
{
29+
dataGrid.ItemsSource = DataAccessLibrary.DataAccess.GetVereineVereinssuche(false);
30+
}
31+
32+
private void ClearFilter_Click(object _, RoutedEventArgs _1)
33+
{
34+
dataGrid.ItemsSource = DataAccessLibrary.DataAccess.GetVereineVereinssuche();
2235
}
2336

37+
2438
private void Searchbox_TextChanged(object _, TextChangedEventArgs _1)
2539
{
2640
String searchstring = searchbox.Text.ToLower();
2741
if (searchstring == "")
2842
{
29-
vereinsanzeige = DataAccess.GetVereineVereinssuche();
43+
dataGrid.ItemsSource = DataAccess.GetVereineVereinssuche();
3044
}
3145
else
3246
{
@@ -38,18 +52,9 @@ private void Searchbox_TextChanged(object _, TextChangedEventArgs _1)
3852
vereinsanzeige_neu.Add(verein_under_search_Review);
3953
}
4054
}
41-
vereinsanzeige = vereinsanzeige_neu;
55+
dataGrid.ItemsSource = vereinsanzeige_neu;
4256
}
43-
Vereeinssearchlisting.ItemsSource = vereinsanzeige;
4457
}
4558

46-
private void Vereeinssearchlisting_SelectionChanged(object _, SelectionChangedEventArgs _1)
47-
{
48-
//object vereintmp = Vereeinssearchlisting.SelectedItems.GetType();
49-
//Vereinsbootslisting.ItemsSource = DataAccess.GetBooteByVereinVereinssuche(vereintmp.verein);
50-
//searchbox.Text = vereintmp.ToString();
51-
//Verein tp = (Verein)Vereeinssearchlisting.SelectedItems;
52-
//Vereinsbootslisting.ItemsSource = tp.vereinsBoote;
53-
}
5459
}
55-
}
60+
}

App1/atletenBearbeiten.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Windows.UI.Xaml;
55
using Windows.UI.Xaml.Controls;
66

7-
// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert.
7+
88

99
namespace App1
1010
{

0 commit comments

Comments
 (0)