This commit is contained in:
Tikkinger 2025-06-19 10:13:29 +02:00
commit ce514f7737
2 changed files with 62 additions and 1 deletions

38
.gitignore vendored
View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
## Build outputs ## Build outputs
[Bb]in/ [Bb]in/
[Oo]bj/ [Oo]bj/
@ -25,4 +26,39 @@
## Package files ## Package files
*.nupkg *.nupkg
packages/ packages/
=======
## Visual Studio Code files
.vscode/
*.code-workspace
## Visual Studio files
.vs/
*.user
*.userosscache
*.sln.docstates
## Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
## Database files
AquaCare.Persistence/AquaCareDatenbank.db
AquaCare.Persistence/AquaCareDatenbank.db-shm
AquaCare.Persistence/AquaCareDatenbank.db-wal
## .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
>>>>>>> a4542b5f4bc0c338195b14e0a86137c5ccec21c6

View File

@ -1,6 +1,9 @@
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Interactivity; using Avalonia.Interactivity;
<<<<<<< HEAD
using AquaCare.Controller; using AquaCare.Controller;
=======
>>>>>>> a4542b5f4bc0c338195b14e0a86137c5ccec21c6
using AquaCare.Persistence; using AquaCare.Persistence;
using System; using System;
@ -8,11 +11,16 @@ namespace AquaCare.View
{ {
public partial class WerteWindow : Window public partial class WerteWindow : Window
{ {
<<<<<<< HEAD
private readonly WerteController _controller; private readonly WerteController _controller;
=======
private readonly Datenbank _datenbank;
>>>>>>> a4542b5f4bc0c338195b14e0a86137c5ccec21c6
public WerteWindow() public WerteWindow()
{ {
InitializeComponent(); InitializeComponent();
<<<<<<< HEAD
_controller = new WerteController(new Datenbank()); _controller = new WerteController(new Datenbank());
LoadData(); LoadData();
} }
@ -21,6 +29,23 @@ namespace AquaCare.View
{ {
var werte = _controller.LoadWerte(); var werte = _controller.LoadWerte();
WerteDataGrid.ItemsSource = werte; // Bindet die Werte an das DataGrid WerteDataGrid.ItemsSource = werte; // Bindet die Werte an das DataGrid
=======
_datenbank = new Datenbank();
LoadValues();
}
private void LoadValues()
{
try
{
var werte = _datenbank.GetValuesAsObjects();
WerteDataGrid.ItemsSource = werte; // Bindet die Werte an das DataGrid
}
catch (Exception ex)
{
Console.WriteLine($"Fehler beim Laden der Werte: {ex.Message}");
}
>>>>>>> a4542b5f4bc0c338195b14e0a86137c5ccec21c6
} }
private void CloseWindowClick(object? sender, RoutedEventArgs e) private void CloseWindowClick(object? sender, RoutedEventArgs e)