CharaktereNeu.xaml.cs gelöscht

This commit is contained in:
Jakob Weber 2025-09-03 10:08:00 +02:00
parent 87de7a0b63
commit a2b92b83ac

View File

@ -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();
}
}
}