From a2b92b83acdd82bdd250a412c0d23a89f41d1d6c Mon Sep 17 00:00:00 2001 From: Jakob Weber Date: Wed, 3 Sep 2025 10:08:00 +0200 Subject: [PATCH] =?UTF-8?q?CharaktereNeu.xaml.cs=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CharaktereNeu.xaml.cs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 CharaktereNeu.xaml.cs diff --git a/CharaktereNeu.xaml.cs b/CharaktereNeu.xaml.cs deleted file mode 100644 index 3721c60..0000000 --- a/CharaktereNeu.xaml.cs +++ /dev/null @@ -1,26 +0,0 @@ -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(); - } - } -}