Initial commit

This commit is contained in:
2024-08-20 01:37:51 +02:00
commit 68ccf23f01
62 changed files with 2121 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:models="clr-namespace:Jugenddienst_Stunden.ViewModels"
xmlns:scanner="clr-namespace:BarcodeScanning;assembly=BarcodeScanning.Native.Maui"
x:Class="Jugenddienst_Stunden.Views.AboutPage">
<ContentPage.BindingContext>
<models:AboutViewModel />
</ContentPage.BindingContext>
<VerticalStackLayout Spacing="10" Margin="10">
<HorizontalStackLayout Spacing="10">
<Image Source="dotnet_bot.png"
SemanticProperties.Description="The dot net bot waving hello!"
HeightRequest="64" />
<Label FontSize="22" FontAttributes="Bold" Text="{Binding Title}" VerticalOptions="End" />
<Label FontSize="22" Text="{Binding Version}" VerticalOptions="End" />
</HorizontalStackLayout>
<Label Text="{Binding Message}" />
<Button Text="Learn more..." Command="{Binding ShowMoreInfoCommand}" />
<!--<scanner:CameraView x:Name="barcodeScannerView"
OnDetectionFinished="BarcodesDetected"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand" />-->
</VerticalStackLayout>
</ContentPage>

View File

@@ -0,0 +1,10 @@
namespace Jugenddienst_Stunden.Views;
public partial class AboutPage : ContentPage
{
public AboutPage()
{
InitializeComponent();
}
}

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:Jugenddienst_Stunden.ViewModels"
x:Class="Jugenddienst_Stunden.Views.AllNotesPage"
Title="Your Notes"
NavigatedTo="ContentPage_NavigatedTo">
<ContentPage.BindingContext>
<viewModels:NotesViewModel />
</ContentPage.BindingContext>
<!-- Add an item to the toolbar -->
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
</ContentPage.ToolbarItems>
<!-- Display notes in a list -->
<CollectionView x:Name="notesCollection"
ItemsSource="{Binding AllNotes}"
Margin="20"
SelectionMode="Single"
SelectionChangedCommand="{Binding SelectNoteCommand}"
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
<!-- Designate how the collection of items are laid out -->
<CollectionView.ItemsLayout>
<LinearItemsLayout Orientation="Vertical" ItemSpacing="10" />
</CollectionView.ItemsLayout>
<!-- Define the appearance of each item in the list -->
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout>
<Label Text="{Binding Text}" FontSize="22"/>
<Label Text="{Binding Date}" FontSize="14" TextColor="Silver"/>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentPage>

View File

@@ -0,0 +1,14 @@
namespace Jugenddienst_Stunden.Views;
public partial class AllNotesPage : ContentPage
{
public AllNotesPage()
{
InitializeComponent();
}
private void ContentPage_NavigatedTo(object sender, NavigatedToEventArgs e) {
notesCollection.SelectedItem = null;
}
}

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:Jugenddienst_Stunden.ViewModels"
x:Class="Jugenddienst_Stunden.Views.NotePage"
Title="Note">
<ContentPage.BindingContext>
<viewModels:NoteViewModel />
</ContentPage.BindingContext>
<VerticalStackLayout Spacing="10" Margin="5">
<Editor x:Name="TextEditor"
Placeholder="Enter your note"
Text="{Binding Text}"
HeightRequest="100" />
<Grid ColumnDefinitions="*,*" ColumnSpacing="4">
<Button Text="Save"
Command="{Binding SaveCommand}" />
<Button Grid.Column="1"
Text="Delete"
Command="{Binding DeleteCommand}" />
</Grid>
</VerticalStackLayout>
</ContentPage>

View File

@@ -0,0 +1,10 @@
namespace Jugenddienst_Stunden.Views;
public partial class NotePage : ContentPage {
public NotePage() {
InitializeComponent();
}
}

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:models="clr-namespace:Jugenddienst_Stunden.ViewModels"
x:Class="Jugenddienst_Stunden.Views.StundenPage"
Title="StundenPage">
<ContentPage.BindingContext>
<models:StundenViewModel />
</ContentPage.BindingContext>
<VerticalStackLayout Spacing="10" Margin="15">
<Label Text="{Binding Message}" />
<Button Text="Load data" Command="{Binding LoadDataCommand}" />
<Grid RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="Auto,*" Margin="10">
<Label Text="Nominal:" Grid.Row="0" />
<Label Text="Overtime:" Grid.Row="1" />
<Label Text="OvertimeMonth:" Grid.Row="2" Margin="0,0,5,0" />
<Label BackgroundColor="AliceBlue" Grid.Row="0" Grid.Column="1" Text="{Binding Nominal}" />
<Label BackgroundColor="AliceBlue" Grid.Row="1" Grid.Column="1" Text="{Binding Overtime}" />
<Label BackgroundColor="LightSlateGray" Grid.Row="2" Grid.Column="1" Text="{Binding OvertimeMonth}" />
</Grid>
</VerticalStackLayout>
</ContentPage>

View File

@@ -0,0 +1,9 @@
namespace Jugenddienst_Stunden.Views;
public partial class StundenPage : ContentPage
{
public StundenPage()
{
InitializeComponent();
}
}