diff --git a/SkyTeam/BuchungenPage.xaml b/SkyTeam/BuchungenPage.xaml new file mode 100644 index 0000000..aae7269 --- /dev/null +++ b/SkyTeam/BuchungenPage.xaml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SkyTeam/BuchungenPage.xaml.cs b/SkyTeam/BuchungenPage.xaml.cs new file mode 100644 index 0000000..46c3017 --- /dev/null +++ b/SkyTeam/BuchungenPage.xaml.cs @@ -0,0 +1,69 @@ +using System.Windows; +using System.Windows.Controls; +using System.Collections.ObjectModel; + +namespace SkyTeam +{ + public partial class MeineBuchungenPage : Page + { + public MeineBuchungenPage() + { + InitializeComponent(); + LoadBookings(); + } + + private void LoadBookings() + { + + var bookings = new ObservableCollection + { + new { BookingNumber = "SKY001", From = "FRA", To = "JFK", DepartureTime = "2026-02-01 09:00", ArrivalTime = "2026-02-01 13:30", Status = "Bestätigt" }, + new { BookingNumber = "SKY002", From = "MUC", To = "LAX", DepartureTime = "2026-02-03 14:20", ArrivalTime = "2026-02-04 08:45", Status = "Geplant" } + }; + BookingsDataGrid.ItemsSource = bookings; + } + + private void SearchBookingsButton_Click(object sender, RoutedEventArgs e) + { + string from = FromFilterTextBox.Text; + string to = ToFilterTextBox.Text; + + 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/FlugeRepo.cs b/SkyTeam/FlugeRepo.cs new file mode 100644 index 0000000..ab8ab95 --- /dev/null +++ b/SkyTeam/FlugeRepo.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SkyTeam +{ + class FlugeRepo + { + } +} diff --git a/SkyTeam/FlugzeugRepo.cs b/SkyTeam/FlugzeugRepo.cs new file mode 100644 index 0000000..874121d --- /dev/null +++ b/SkyTeam/FlugzeugRepo.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SkyTeam +{ + class FlugzeugRepo + { + } +} diff --git a/SkyTeam/HomePage.xaml b/SkyTeam/HomePage.xaml new file mode 100644 index 0000000..b42e15b --- /dev/null +++ b/SkyTeam/HomePage.xaml @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SkyTeam/HomePage.xaml.cs b/SkyTeam/HomePage.xaml.cs new file mode 100644 index 0000000..810c14e --- /dev/null +++ b/SkyTeam/HomePage.xaml.cs @@ -0,0 +1,49 @@ +using System.Windows; +using System.Windows.Controls; + +namespace SkyTeam +{ + public partial class NavigationPage : Page + { + public NavigationPage() + { + InitializeComponent(); + + } + + 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/LogInPage.xaml b/SkyTeam/LogInPage.xaml new file mode 100644 index 0000000..1b9c60d --- /dev/null +++ b/SkyTeam/LogInPage.xaml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SkyTeam/SettingsPage.xaml.cs b/SkyTeam/SettingsPage.xaml.cs new file mode 100644 index 0000000..db8d2da --- /dev/null +++ b/SkyTeam/SettingsPage.xaml.cs @@ -0,0 +1,88 @@ +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"; + + 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); + ((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()); + } + + + + } + } +} diff --git a/SkyTeam/SkyTeam.csproj b/SkyTeam/SkyTeam.csproj index 694c014..ea1d73e 100644 --- a/SkyTeam/SkyTeam.csproj +++ b/SkyTeam/SkyTeam.csproj @@ -9,7 +9,11 @@ +<<<<<<< HEAD +======= + +>>>>>>> deaa68880afaf3dd53903180eef7a43c3e23056a diff --git a/SkyTeam/mitarbeiterRepo.cs b/SkyTeam/mitarbeiterRepo.cs new file mode 100644 index 0000000..d8a9a88 --- /dev/null +++ b/SkyTeam/mitarbeiterRepo.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SkyTeam +{ + class mitarbeiterRepo + { + } +} diff --git a/SkyTeam/session.cs b/SkyTeam/session.cs new file mode 100644 index 0000000..292a2f0 --- /dev/null +++ b/SkyTeam/session.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SkyTeam +{ + class session + { + int selectedId { get; set; } + } +}