diff --git a/PenPaperMain/Registrieren.xaml b/PenPaperMain/Registrieren.xaml
new file mode 100644
index 0000000..3f4b97c
--- /dev/null
+++ b/PenPaperMain/Registrieren.xaml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PenPaperMain/Registrieren.xaml.cs b/PenPaperMain/Registrieren.xaml.cs
new file mode 100644
index 0000000..d36b585
--- /dev/null
+++ b/PenPaperMain/Registrieren.xaml.cs
@@ -0,0 +1,82 @@
+using System;
+using System.Net.Http;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+using System.Windows;
+
+
+//jakob
+namespace Pen_Paper_Main
+{
+ public partial class Registrieren : Window
+ {
+ public Registrieren()
+ {
+ InitializeComponent();
+ }
+
+ private async void Button_Click(object sender, RoutedEventArgs e)
+ {
+ string user = BenutzernameInput.Text.Trim();
+ string pass = PasswortBox.Password;
+ string pass2 = PasswortBoxConfirm.Password;
+
+ // simple Validierung
+ if (string.IsNullOrWhiteSpace(user) || string.IsNullOrWhiteSpace(pass))
+ {
+ MessageBox.Show("Bitte Benutzername und Passwort eingeben.");
+ return;
+ }
+ if (pass != pass2)
+ {
+ MessageBox.Show("Passwörter stimmen nicht überein.");
+ return;
+ }
+
+ var result = await CallApi("register", user, pass);
+
+ if (result.ok)
+ {
+ MessageBox.Show("Registrierung erfolgreich");
+ var a = new Anmeldung();
+ a.Show();
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("Fehler: " + result.msg);
+ }
+ }
+
+ private async Task<(bool ok, string msg)> CallApi(string action, string u, string p)
+ {
+ try
+ {
+ //versucht api zu callen
+ using var client = new HttpClient();
+ var json = JsonSerializer.Serialize(new { username = u, password = p });
+ var resp = await client.PostAsync(
+
+ //url der api und worauf es verweist
+ $"http://localhost/api/users.php?action={action}",
+ new StringContent(json, Encoding.UTF8, "application/json")
+ );
+
+ // antwort wird erwartet
+ var body = await resp.Content.ReadAsStringAsync();
+ //text als json umformatieren
+ using var doc = JsonDocument.Parse(body);
+ //liest ob ok true oder false ist (ist definiert in db.php)
+ bool ok = doc.RootElement.GetProperty("ok").GetBoolean();
+ string msg = doc.RootElement.GetProperty("msg").GetString() ?? "";
+
+ return (ok, msg);
+ }
+ catch
+ {
+ return (false, "invalid response");
+ }
+ }
+ }
+}
diff --git a/PenPaperMain/SitzungVerwalten.xaml b/PenPaperMain/SitzungVerwalten.xaml
new file mode 100644
index 0000000..09fa26f
--- /dev/null
+++ b/PenPaperMain/SitzungVerwalten.xaml
@@ -0,0 +1,51 @@
+
+
+
+ Sitzungen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sitzung erstellen
+
+ Sitzung beitreten
+
+ Titel eingeben
+
+
+
+ Code eingeben
+
+
+
+
+
+
+
+
diff --git a/PenPaperMain/SitzungVerwalten.xaml.cs b/PenPaperMain/SitzungVerwalten.xaml.cs
new file mode 100644
index 0000000..73e8b40
--- /dev/null
+++ b/PenPaperMain/SitzungVerwalten.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Pen_Paper_Main
+{
+ ///
+ /// Interaktionslogik für SitzungVerwalten.xaml
+ ///
+ public partial class SitzungVerwalten : Window
+ {
+ public SitzungVerwalten()
+ {
+ InitializeComponent();
+ }
+ }
+}