diff --git a/PenPaperMain/Anmeldung.xaml b/PenPaperMain/Anmeldung.xaml
new file mode 100644
index 0000000..c75527f
--- /dev/null
+++ b/PenPaperMain/Anmeldung.xaml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PenPaperMain/Anmeldung.xaml.cs b/PenPaperMain/Anmeldung.xaml.cs
new file mode 100644
index 0000000..351a746
--- /dev/null
+++ b/PenPaperMain/Anmeldung.xaml.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Net.Http;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Pen_Paper_Main
+{
+ public partial class Anmeldung : Window
+ {
+ public Anmeldung()
+ {
+ InitializeComponent();
+ }
+
+ private async void Anmelden_Click(object sender, RoutedEventArgs e)
+ {
+ string user = BenutzernameInput.Text;
+ string pass = PasswortBox.Password;
+
+ var result = await CallApi("login", user, pass);
+
+ if (result.ok)
+ {
+ MessageBox.Show("Anmeldung erfolgreich");
+ Lobby lobby = new Lobby();
+ lobby.Show();
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("Fehler: " + result.msg);
+ }
+ }
+
+ private async Task<(bool ok,string msg)> CallApi(string action, string u, string p)
+ {
+ using var client = new HttpClient();
+ var json = JsonSerializer.Serialize(new { username = u, password = p });
+ var resp = await client.PostAsync($"http://localhost/api/users.php?action={action}",
+ new StringContent(json, Encoding.UTF8, "application/json"));
+ var body = await resp.Content.ReadAsStringAsync();
+ try
+ {
+ var doc = JsonDocument.Parse(body);
+ bool ok = doc.RootElement.GetProperty("ok").GetBoolean();
+ string msg = doc.RootElement.GetProperty("msg").GetString();
+ return (ok, msg);
+ }
+ catch { return (false, "invalid response"); }
+ }
+
+ private void PasswortBox_PasswordChanged(object sender, RoutedEventArgs e)
+ {
+ PasswortPlaceholder.Visibility = string.IsNullOrEmpty(PasswortBox.Password)
+ ? Visibility.Visible
+ : Visibility.Collapsed;
+ }
+
+ private void BenutzernameInput_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ BenutzernamePlaceHolder.Visibility = string.IsNullOrEmpty(BenutzernameInput.Text)
+ ? Visibility.Visible
+ : Visibility.Collapsed;
+ }
+ }
+}
diff --git a/PenPaperMain/CharaktereNeu.xaml.cs b/PenPaperMain/CharaktereNeu.xaml.cs
new file mode 100644
index 0000000..3721c60
--- /dev/null
+++ b/PenPaperMain/CharaktereNeu.xaml.cs
@@ -0,0 +1,26 @@
+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 CharakterNeu : Window
+ {
+ public CharakterNeu() { InitializeComponent(); }
+
+ private async void Save_Click(object s, RoutedEventArgs e)
+ {
+ var payload = new { username = TxtUser.Text, name = TxtChar.Text };
+ using var http = new HttpClient();
+ var resp = await http.PostAsync("http://localhost/api/characters.php?action=create",
+ new StringContent(JsonSerializer.Serialize(payload), Encoding.UTF8, "application/json"));
+ var body = await resp.Content.ReadAsStringAsync();
+ MessageBox.Show(body);
+ DialogResult = true; Close();
+ }
+ }
+}
diff --git a/PenPaperMain/Kampange.xaml b/PenPaperMain/Kampange.xaml
new file mode 100644
index 0000000..2190b6c
--- /dev/null
+++ b/PenPaperMain/Kampange.xaml
@@ -0,0 +1,50 @@
+
+
+ Kampangen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Titel :
+
+ BlaBlaBla
+
+ Beschreibung :
+
+
+
+ BlaBlaBla
+
+
+
+
+
+
+
+
diff --git a/PenPaperMain/Kampange.xaml.cs b/PenPaperMain/Kampange.xaml.cs
new file mode 100644
index 0000000..a57cd17
--- /dev/null
+++ b/PenPaperMain/Kampange.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 Kampange.xaml
+ ///
+ public partial class Kampange : Window
+ {
+ public Kampange()
+ {
+ InitializeComponent();
+ }
+ }
+}