Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 83118103d9 | |||
| 5ecf6c7537 | |||
| 7540b6e6ad | |||
| 8937332942 | |||
| a0345cad94 | |||
| 6b4bffe5ec | |||
| 093679c9bb |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -396,3 +396,5 @@ FodyWeavers.xsd
|
|||||||
|
|
||||||
# JetBrains Rider
|
# JetBrains Rider
|
||||||
*.sln.iml
|
*.sln.iml
|
||||||
|
/.idea
|
||||||
|
/var
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
@@ -2,13 +2,20 @@
|
|||||||
|
|
||||||
namespace Jugenddienst_Stunden.Converter;
|
namespace Jugenddienst_Stunden.Converter;
|
||||||
internal class SecondsTimeConverter : IValueConverter {
|
internal class SecondsTimeConverter : IValueConverter {
|
||||||
|
|
||||||
private int seconds;
|
private int seconds;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Konvertiert eine Sekundenangabe nach Stunden:Minuten, auch bei mehr als 24 Stunden
|
||||||
|
/// </summary>
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
||||||
if (value is null)
|
if (value is null)
|
||||||
return "0:0";
|
return "0:0";
|
||||||
if (value is int) {
|
if (value is int) {
|
||||||
seconds = (int)value;
|
seconds = (int)value;
|
||||||
|
}
|
||||||
|
if (value is double) {
|
||||||
|
seconds = (int)Math.Round((double)value);
|
||||||
} else {
|
} else {
|
||||||
int.TryParse((string?)value, out seconds);
|
int.TryParse((string?)value, out seconds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
|
|
||||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
|
||||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||||
<PackageIcon>paket_icon.png</PackageIcon>
|
<PackageIcon>paket_icon.png</PackageIcon>
|
||||||
<NeutralLanguage>de</NeutralLanguage>
|
<NeutralLanguage>de</NeutralLanguage>
|
||||||
<PackageVersion>1.0.8</PackageVersion>
|
<PackageVersion>1.0.9</PackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-maccatalyst|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-maccatalyst|AnyCPU'">
|
||||||
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<Optimize>False</Optimize>
|
<Optimize>False</Optimize>
|
||||||
<Deterministic>True</Deterministic>
|
<Deterministic>True</Deterministic>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-maccatalyst|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-maccatalyst|AnyCPU'">
|
||||||
<Optimize>True</Optimize>
|
<Optimize>True</Optimize>
|
||||||
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<Deterministic>True</Deterministic>
|
<Deterministic>True</Deterministic>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -65,8 +65,8 @@
|
|||||||
<DebugSymbols>True</DebugSymbols>
|
<DebugSymbols>True</DebugSymbols>
|
||||||
<Optimize>False</Optimize>
|
<Optimize>False</Optimize>
|
||||||
<Deterministic>True</Deterministic>
|
<Deterministic>True</Deterministic>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<AndroidKeyStore>False</AndroidKeyStore>
|
<AndroidKeyStore>False</AndroidKeyStore>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows10.0.26100.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows10.0.26100.0|AnyCPU'">
|
||||||
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION</DefineConstants>
|
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION</DefineConstants>
|
||||||
<Deterministic>True</Deterministic>
|
<Deterministic>True</Deterministic>
|
||||||
<Optimize>False</Optimize>
|
<Optimize>False</Optimize>
|
||||||
@@ -89,8 +89,8 @@
|
|||||||
<DebugSymbols>False</DebugSymbols>
|
<DebugSymbols>False</DebugSymbols>
|
||||||
<Optimize>True</Optimize>
|
<Optimize>True</Optimize>
|
||||||
<Deterministic>True</Deterministic>
|
<Deterministic>True</Deterministic>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<RunAOTCompilation>False</RunAOTCompilation>
|
<RunAOTCompilation>False</RunAOTCompilation>
|
||||||
<PublishTrimmed>True</PublishTrimmed>
|
<PublishTrimmed>True</PublishTrimmed>
|
||||||
<AndroidKeyStore>False</AndroidKeyStore>
|
<AndroidKeyStore>False</AndroidKeyStore>
|
||||||
@@ -98,8 +98,8 @@
|
|||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows10.0.26100.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows10.0.26100.0|AnyCPU'">
|
||||||
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
<ApplicationId>com.companyname.jugenddienststunden</ApplicationId>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<Optimize>True</Optimize>
|
<Optimize>True</Optimize>
|
||||||
<Deterministic>True</Deterministic>
|
<Deterministic>True</Deterministic>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -109,43 +109,43 @@
|
|||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AssemblyVersion>1.0.8</AssemblyVersion>
|
<AssemblyVersion>1.0.9</AssemblyVersion>
|
||||||
<FileVersion>1.0.8</FileVersion>
|
<FileVersion>1.0.9</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<DebugSymbols>True</DebugSymbols>
|
<DebugSymbols>True</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows10.0.19041.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows10.0.19041.0|AnyCPU'">
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION</DefineConstants>
|
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION</DefineConstants>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows10.0.19041.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows10.0.19041.0|AnyCPU'">
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-android35.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-android35.0|AnyCPU'">
|
||||||
<WarningLevel>8</WarningLevel>
|
<WarningLevel>8</WarningLevel>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<EnableLLVM>True</EnableLLVM>
|
<EnableLLVM>True</EnableLLVM>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-android35.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-android35.0|AnyCPU'">
|
||||||
<WarningLevel>8</WarningLevel>
|
<WarningLevel>8</WarningLevel>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
<EnableLLVM>True</EnableLLVM>
|
<EnableLLVM>True</EnableLLVM>
|
||||||
<DebugSymbols>False</DebugSymbols>
|
<DebugSymbols>False</DebugSymbols>
|
||||||
<AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
|
<AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
|
||||||
@@ -163,16 +163,16 @@
|
|||||||
<WarningLevel>8</WarningLevel>
|
<WarningLevel>8</WarningLevel>
|
||||||
<NoWarn>1701;1702</NoWarn>
|
<NoWarn>1701;1702</NoWarn>
|
||||||
<WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors>
|
<WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-windows10.0.26100.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-windows10.0.26100.0|AnyCPU'">
|
||||||
<WarningLevel>8</WarningLevel>
|
<WarningLevel>8</WarningLevel>
|
||||||
<NoWarn>1701;1702</NoWarn>
|
<NoWarn>1701;1702</NoWarn>
|
||||||
<WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors>
|
<WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors>
|
||||||
<ApplicationDisplayVersion>1.0.8</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>9</ApplicationVersion>
|
<ApplicationVersion>10</ApplicationVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -256,18 +256,18 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Maui" Version="11.1.0" />
|
<PackageReference Include="CommunityToolkit.Maui" Version="12.2.0" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.40">
|
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.110">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.40" />
|
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.110" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.2" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.9" />
|
||||||
<PackageReference Include="Microsoft.Maui.Graphics" Version="9.0.40" />
|
<PackageReference Include="Microsoft.Maui.Graphics" Version="9.0.110" />
|
||||||
<PackageReference Include="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="9.0.2" />
|
<PackageReference Include="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="9.0.9" />
|
||||||
<PackageReference Include="Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk" Version="9.0.2" />
|
<PackageReference Include="Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk" Version="9.0.9" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="ZXing.Net.Maui.Controls" Version="0.4.0" />
|
<PackageReference Include="ZXing.Net.Maui.Controls" Version="0.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
namespace Jugenddienst_Stunden.Models;
|
namespace Jugenddienst_Stunden.Models;
|
||||||
internal class Note {
|
internal class Note {
|
||||||
public string Filename { get; set; }
|
public string Filename { get; set; }
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
public void Save() =>
|
public void Save() =>
|
||||||
File.WriteAllText(System.IO.Path.Combine(FileSystem.AppDataDirectory, Filename), Text);
|
File.WriteAllText(System.IO.Path.Combine(FileSystem.AppDataDirectory, Filename), Text);
|
||||||
|
|
||||||
public void Delete() =>
|
public void Delete() =>
|
||||||
File.Delete(System.IO.Path.Combine(FileSystem.AppDataDirectory, Filename));
|
File.Delete(System.IO.Path.Combine(FileSystem.AppDataDirectory, Filename));
|
||||||
|
|
||||||
public static Note Load(string filename) {
|
public static Note Load(string filename) {
|
||||||
filename = System.IO.Path.Combine(FileSystem.AppDataDirectory, filename);
|
filename = System.IO.Path.Combine(FileSystem.AppDataDirectory, filename);
|
||||||
|
|
||||||
if (!File.Exists(filename))
|
if (!File.Exists(filename))
|
||||||
throw new FileNotFoundException("Unable to find file on local storage.", filename);
|
throw new FileNotFoundException("Unable to find file on local storage.", filename);
|
||||||
|
|
||||||
return
|
return
|
||||||
new() {
|
new() {
|
||||||
Filename = Path.GetFileName(filename),
|
Filename = Path.GetFileName(filename),
|
||||||
Text = File.ReadAllText(filename),
|
Text = File.ReadAllText(filename),
|
||||||
Date = File.GetLastWriteTime(filename)
|
Date = File.GetLastWriteTime(filename)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEnumerable<Note> LoadAll() {
|
public static IEnumerable<Note> LoadAll() {
|
||||||
// Get the folder where the notes are stored.
|
// Get the folder where the notes are stored.
|
||||||
string appDataPath = FileSystem.AppDataDirectory;
|
string appDataPath = FileSystem.AppDataDirectory;
|
||||||
|
|
||||||
// Use Linq extensions to load the *.notes.txt files.
|
// Use Linq extensions to load the *.notes.txt files.
|
||||||
return Directory
|
return Directory
|
||||||
|
|
||||||
// Select the file names from the directory
|
// Select the file names from the directory
|
||||||
.EnumerateFiles(appDataPath, "*.notes.txt")
|
.EnumerateFiles(appDataPath, "*.notes.txt")
|
||||||
|
|
||||||
// Each file name is used to load a note
|
// Each file name is used to load a note
|
||||||
.Select(filename => Note.Load(Path.GetFileName(filename)))
|
.Select(filename => Note.Load(Path.GetFileName(filename)))
|
||||||
|
|
||||||
// With the final collection of notes, order them by date
|
// With the final collection of notes, order them by date
|
||||||
.OrderByDescending(note => note.Date);
|
.OrderByDescending(note => note.Date);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Note() {
|
public Note() {
|
||||||
Filename = $"{Path.GetRandomFileName()}.notes.txt";
|
Filename = $"{Path.GetRandomFileName()}.notes.txt";
|
||||||
Date = DateTime.Now;
|
Date = DateTime.Now;
|
||||||
Text = "";
|
Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,33 +4,40 @@ using System.Collections.ObjectModel;
|
|||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types;
|
namespace Jugenddienst_Stunden.Types;
|
||||||
|
|
||||||
internal class Hours : ObservableObject {
|
internal partial class Hours : ObservableObject {
|
||||||
public int? Zeit;
|
public double? Zeit;
|
||||||
public int? Nominal;
|
public double? Nominal;
|
||||||
//public Dictionary<DateOnly,NominalDay> nominal_day_api;
|
//public Dictionary<DateOnly,NominalDay> nominal_day_api;
|
||||||
public List<NominalDay>? Nominal_day_api;
|
public List<NominalDay>? Nominal_day_api;
|
||||||
//public Dictionary<int,NominalWeek> nominal_week_api;
|
//public Dictionary<int,NominalWeek> nominal_week_api;
|
||||||
public List<NominalWeek>? Nominal_week_api;
|
public List<NominalWeek>? Nominal_week_api;
|
||||||
//public List<string> time_line;
|
//public List<string> time_line;
|
||||||
public string? Zeit_total;
|
public double? Zeit_total;
|
||||||
|
|
||||||
//https://stackoverflow.com/questions/29449641/deserialize-json-when-a-value-can-be-an-object-or-an-empty-array/29450279#29450279
|
//https://stackoverflow.com/questions/29449641/deserialize-json-when-a-value-can-be-an-object-or-an-empty-array/29450279#29450279
|
||||||
//[JsonConverter(typeof(JsonSingleOrEmptyArrayConverter<Hours>))]
|
//[JsonConverter(typeof(JsonSingleOrEmptyArrayConverter<Hours>))]
|
||||||
//public Dictionary<int,decimal> zeit_total_daily;
|
//public Dictionary<int,decimal> zeit_total_daily;
|
||||||
|
|
||||||
public List<TimeDay> zeit_total_daily_api;
|
public List<TimeDay> zeit_total_daily_api;
|
||||||
public List<DayTime>? daytime;
|
public List<DayTime>? daytime;
|
||||||
//public List<string> wochensumme;
|
//public List<string> wochensumme;
|
||||||
public int overtime_month;
|
|
||||||
public int overtime;
|
[ObservableProperty]
|
||||||
//public List<string> overtime_day;
|
public double overtime_month;
|
||||||
public int zeitausgleich;
|
|
||||||
public int zeitausgleich_month;
|
[ObservableProperty]
|
||||||
public int holiday;
|
public double overtime;
|
||||||
public int krankheit;
|
//public List<string> overtime_day;
|
||||||
public int weiterbildung;
|
|
||||||
public int bereitschaft;
|
[ObservableProperty]
|
||||||
public int bereitschaft_month;
|
public double zeitausgleich;
|
||||||
|
|
||||||
|
public double zeitausgleich_month;
|
||||||
|
public double holiday;
|
||||||
|
public double krankheit;
|
||||||
|
public double weiterbildung;
|
||||||
|
public double bereitschaft;
|
||||||
|
public double bereitschaft_month;
|
||||||
//public Operator operator_api;
|
//public Operator operator_api;
|
||||||
public DateTime Today;
|
public DateTime Today;
|
||||||
public DateTime Date;
|
public DateTime Date;
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
internal class NominalDay {
|
internal class NominalDay {
|
||||||
public int day_number;
|
public int day_number;
|
||||||
public int month_number;
|
public int month_number;
|
||||||
public int hours;
|
public double hours;
|
||||||
public DateOnly date;
|
public DateOnly date;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
internal class NominalWeek {
|
internal class NominalWeek {
|
||||||
public int Week_number;
|
public int Week_number;
|
||||||
public int Hours;
|
public double Hours;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
public class Sollstunden {
|
public class Sollstunden {
|
||||||
public int Timetable { get; set; }
|
public int Timetable { get; set; }
|
||||||
public int Wochentag { get; set; }
|
public int Wochentag { get; set; }
|
||||||
public float Zeit { get; set; }
|
public double Zeit { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,5 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal struct TimeDay {
|
internal struct TimeDay {
|
||||||
public int Day { get; set; }
|
public int Day { get; set; }
|
||||||
public decimal Hours { get; set; }
|
public double Hours { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,10 +56,9 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
|||||||
|
|
||||||
public string Title { get; set; } = GlobalVar.Name + " " + GlobalVar.Surname;
|
public string Title { get; set; } = GlobalVar.Name + " " + GlobalVar.Surname;
|
||||||
|
|
||||||
private Hours _hour;
|
[ObservableProperty]
|
||||||
public Hours Hours {
|
private Hours hours;
|
||||||
get => _hour;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mindest-Datum für den Datepicker
|
/// Mindest-Datum für den Datepicker
|
||||||
@@ -94,42 +93,42 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Monatsübersicht: Geleistete Stunden
|
/// Monatsübersicht: Geleistete Stunden
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? ZeitCalculated {
|
public double? ZeitCalculated {
|
||||||
get => Hours.Zeit_total;
|
get => Hours.Zeit_total;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Monatsübersicht: Sollstunden
|
/// Monatsübersicht: Sollstunden
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Nominal {
|
public double? Nominal {
|
||||||
get => Hours.Nominal;
|
get => Hours.Nominal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Monatsübersicht: Differenz zwischen Soll und geleisteten Stunden
|
/// Monatsübersicht: Differenz zwischen Soll und geleisteten Stunden
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Overtime {
|
public double? Overtime {
|
||||||
get => Hours.overtime;
|
get => Hours.overtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Monatsübersicht: Restüberstunden insgesamt
|
/// Monatsübersicht: Restüberstunden insgesamt
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int OvertimeMonth {
|
public double OvertimeMonth {
|
||||||
get => Hours.overtime_month;
|
get => Hours.overtime_month;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Zeitausgleich {
|
public double Zeitausgleich {
|
||||||
get => Hours.zeitausgleich;
|
get => Hours.zeitausgleich;
|
||||||
}
|
}
|
||||||
public int ZeitausgleichMonth {
|
public double ZeitausgleichMonth {
|
||||||
get => Hours.zeitausgleich_month;
|
get => Hours.zeitausgleich_month;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Monatsübersicht: Resturlaub
|
/// Monatsübersicht: Resturlaub
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Holiday {
|
public double Holiday {
|
||||||
get => Hours.holiday;
|
get => Hours.holiday;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +157,7 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
|||||||
/// CTOR
|
/// CTOR
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public StundenViewModel() {
|
public StundenViewModel() {
|
||||||
_hour = new Hours();
|
Hours = new Hours();
|
||||||
|
|
||||||
LoadOverview = "Lade Summen für " + DateToday.ToString("MMMM");
|
LoadOverview = "Lade Summen für " + DateToday.ToString("MMMM");
|
||||||
|
|
||||||
@@ -202,7 +201,7 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
|||||||
private async Task LoadData() {
|
private async Task LoadData() {
|
||||||
try {
|
try {
|
||||||
BaseResponse dat = await HoursBase.LoadBase("hours&year=" + DateToday.ToString("yyyy") + "&month=" + DateToday.ToString("MM"));
|
BaseResponse dat = await HoursBase.LoadBase("hours&year=" + DateToday.ToString("yyyy") + "&month=" + DateToday.ToString("MM"));
|
||||||
_hour = dat.hour;
|
Hours = dat.hour;
|
||||||
Settings = dat.settings;
|
Settings = dat.settings;
|
||||||
|
|
||||||
if (Settings.Version != AppInfo.Current.VersionString.Substring(0, 5)) {
|
if (Settings.Version != AppInfo.Current.VersionString.Substring(0, 5)) {
|
||||||
@@ -295,14 +294,14 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
|||||||
/// Refreshes all properties
|
/// Refreshes all properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void RefreshProperties() {
|
private void RefreshProperties() {
|
||||||
|
OnPropertyChanged(nameof(Hours));
|
||||||
|
OnPropertyChanged(nameof(Title));
|
||||||
OnPropertyChanged(nameof(Nominal));
|
OnPropertyChanged(nameof(Nominal));
|
||||||
OnPropertyChanged(nameof(Overtime));
|
OnPropertyChanged(nameof(Overtime));
|
||||||
OnPropertyChanged(nameof(OvertimeMonth));
|
OnPropertyChanged(nameof(OvertimeMonth));
|
||||||
OnPropertyChanged(nameof(Zeitausgleich));
|
OnPropertyChanged(nameof(Zeitausgleich));
|
||||||
OnPropertyChanged(nameof(ZeitCalculated));
|
OnPropertyChanged(nameof(ZeitCalculated));
|
||||||
OnPropertyChanged(nameof(Holiday));
|
OnPropertyChanged(nameof(Holiday));
|
||||||
OnPropertyChanged(nameof(Hours));
|
|
||||||
OnPropertyChanged(nameof(Title));
|
|
||||||
OnPropertyChanged(nameof(MinimumDate));
|
OnPropertyChanged(nameof(MinimumDate));
|
||||||
OnPropertyChanged(nameof(MaximumDate));
|
OnPropertyChanged(nameof(MaximumDate));
|
||||||
OnPropertyChanged(nameof(LoadOverview));
|
OnPropertyChanged(nameof(LoadOverview));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
SelectionChangedCommand="{Binding SelectNoteCommand}"
|
SelectionChangedCommand="{Binding SelectNoteCommand}"
|
||||||
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
|
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
|
||||||
|
|
||||||
<!-- Designate how the collection of items are laid out -->
|
<!-- Designate how the collection of items is laid out -->
|
||||||
<CollectionView.ItemsLayout>
|
<CollectionView.ItemsLayout>
|
||||||
<LinearItemsLayout Orientation="Vertical" ItemSpacing="10" />
|
<LinearItemsLayout Orientation="Vertical" ItemSpacing="10" />
|
||||||
</CollectionView.ItemsLayout>
|
</CollectionView.ItemsLayout>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
|||||||
BIN
Uhr.afdesign
BIN
Uhr.afdesign
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB |
BIN
appicon.afdesign
BIN
appicon.afdesign
Binary file not shown.
Binary file not shown.
BIN
paket_icon.png
BIN
paket_icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB |
BIN
splash.afdesign
BIN
splash.afdesign
Binary file not shown.
BIN
splash.pdf
BIN
splash.pdf
Binary file not shown.
Reference in New Issue
Block a user