ErstChanges , braucht immer noch debug ,wahrscheinlich später
This commit is contained in:
53
SkyTeam/SettingsPage.xaml.cs
Normal file
53
SkyTeam/SettingsPage.xaml.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace SkyTeam
|
||||
{
|
||||
public partial class SettingsPage : Page
|
||||
{
|
||||
private bool _isDark = false;
|
||||
|
||||
public SettingsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DarkModeToggle_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_isDark = true;
|
||||
DarkModeToggle.Content = "An";
|
||||
// Apply dark theme to parent window
|
||||
if (Window.GetWindow(this) is MainWindow mainWindow)
|
||||
{
|
||||
mainWindow.Background = Brushes.Black;
|
||||
}
|
||||
}
|
||||
|
||||
private void DarkModeToggle_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_isDark = false;
|
||||
DarkModeToggle.Content = "Aus";
|
||||
if (Window.GetWindow(this) is MainWindow mainWindow)
|
||||
{
|
||||
mainWindow.Background = Brushes.White;
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteAccountButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show(
|
||||
"Sind Sie sicher, dass Sie Ihr Konto löschen möchten?\nDiese Aktion kann nicht rückgängig gemacht werden!",
|
||||
"Konto löschen",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Warning);
|
||||
|
||||
if (result == MessageBoxResult.Yes)
|
||||
{
|
||||
|
||||
MessageBox.Show("Konto wurde gelöscht.", "Erfolg", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user