diff --git a/SkyTeam/BuchungenPage.xaml b/SkyTeam/BuchungenPage.xaml index 7a7f162..aae7269 100644 --- a/SkyTeam/BuchungenPage.xaml +++ b/SkyTeam/BuchungenPage.xaml @@ -4,108 +4,168 @@ xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" Title="MeineBuchungenPage"> - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - + + + + + + + - diff --git a/SkyTeam/BuchungenPage.xaml.cs b/SkyTeam/BuchungenPage.xaml.cs index 1490bd7..46c3017 100644 --- a/SkyTeam/BuchungenPage.xaml.cs +++ b/SkyTeam/BuchungenPage.xaml.cs @@ -30,5 +30,40 @@ namespace SkyTeam MessageBox.Show($"Suche Flüge von {from} nach {to}", "Suche", MessageBoxButton.OK); } + + private void HomeButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new NavigationPage()); + } + + private void BookingsButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage()); + } + + private void SettingsButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new SettingsPage()); + } + + private void BookFlightButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage()); + } + private void LogoutButton_Click(object sender, RoutedEventArgs e) + { + var result = MessageBox.Show( + "Möchten Sie sich wirklich abmelden?", + "Abmelden", + MessageBoxButton.YesNo, + MessageBoxImage.Question); + if (result == MessageBoxResult.Yes) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new LogInPage()); + } + + + + } } } diff --git a/SkyTeam/HomePage.xaml.cs b/SkyTeam/HomePage.xaml.cs index ef6a86c..810c14e 100644 --- a/SkyTeam/HomePage.xaml.cs +++ b/SkyTeam/HomePage.xaml.cs @@ -13,22 +13,22 @@ namespace SkyTeam private void HomeButton_Click(object sender, RoutedEventArgs e) { - + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new NavigationPage()); } private void BookingsButton_Click(object sender, RoutedEventArgs e) { - + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage()); } private void SettingsButton_Click(object sender, RoutedEventArgs e) { - + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new SettingsPage()); } private void BookFlightButton_Click(object sender, RoutedEventArgs e) { - + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage()); } private void LogoutButton_Click(object sender, RoutedEventArgs e) { @@ -37,8 +37,13 @@ namespace SkyTeam "Abmelden", MessageBoxButton.YesNo, MessageBoxImage.Question); + if (result == MessageBoxResult.Yes) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new LogInPage()); + } + + - } } } diff --git a/SkyTeam/LogInPage.xaml b/SkyTeam/LogInPage.xaml index 45b1742..1b9c60d 100644 --- a/SkyTeam/LogInPage.xaml +++ b/SkyTeam/LogInPage.xaml @@ -4,84 +4,111 @@ xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" Title="LogInPage"> - + - + Margin="0,0,0,50"> + Width="36" + Height="36" + Margin="0,0,15,0"/> + FontSize="14" + Foreground="#666" + Margin="0,5,0,0"/> - - + + + - - - - - + + + + + + + + + - - - - + + + + - + + + + + + + + + + + + + + + + + diff --git a/SkyTeam/SettingsPage.xaml.cs b/SkyTeam/SettingsPage.xaml.cs index f27550f..db8d2da 100644 --- a/SkyTeam/SettingsPage.xaml.cs +++ b/SkyTeam/SettingsPage.xaml.cs @@ -46,8 +46,43 @@ namespace SkyTeam { MessageBox.Show("Konto wurde gelöscht.", "Erfolg", MessageBoxButton.OK, MessageBoxImage.Information); - + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new LogInPage()); + } + } + private void HomeButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new NavigationPage()); + } + + private void BookingsButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage()); + } + + private void SettingsButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new SettingsPage()); + } + + private void BookFlightButton_Click(object sender, RoutedEventArgs e) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage()); + } + private void LogoutButton_Click(object sender, RoutedEventArgs e) + { + var result = MessageBox.Show( + "Möchten Sie sich wirklich abmelden?", + "Abmelden", + MessageBoxButton.YesNo, + MessageBoxImage.Question); + if (result == MessageBoxResult.Yes) + { + ((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new LogInPage()); + } + + + } } }