From 7d57d88b8f8593ecde169c25712cdd5a6dedb995 Mon Sep 17 00:00:00 2001 From: Your Name <you@example.com> Date: Mon, 10 Mar 2025 16:44:24 +0100 Subject: [PATCH] updated burger menu style, added burger menu to overview --- .../Screens/Regulaer/01Overview.xaml | 52 +++++++++++++++++-- .../Screens/Regulaer/01Overview.xaml.cs | 44 +++++++++++++++- .../Screens/Regulaer/02Session.xaml | 4 -- .../Screens/Regulaer/SessionStatistics.xaml | 39 ++++++++++++++ .../Regulaer/SessionStatistics.xaml.cs | 40 ++++++++++++++ .../Styles/Styles.xaml | 8 +-- 6 files changed, 174 insertions(+), 13 deletions(-) diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml index c9e1ebc..b933c47 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml @@ -10,19 +10,24 @@ Background="{StaticResource BACKGROUND_PRIMARY_BRUSH}"> <ScrollViewer> <Grid VerticalAlignment="Center"> - <StackPanel Margin="20,0,20,20"> + + + + <StackPanel Margin="20,0,20,20"> + + <!-- Überschrift --> <TextBlock Style="{StaticResource Header1}" Text="Selection and editing of your saved profiles" HorizontalAlignment="Left" - Margin="0,10,0,10" /> + Margin="50,10,0,10" /> <!-- Profiles and Add Button Section --> <Border Background="{StaticResource BACKGROUND_SECONDARY_BRUSH}" CornerRadius="10" Padding="15" > - <StackPanel Orientation="Vertical"> + <StackPanel Orientation="Vertical" > <TextBlock Style="{StaticResource Header2}" Text="Want to customize this profile?" HorizontalAlignment="Left" /> @@ -289,6 +294,45 @@ TextChanged="FocusTopicInputBox_TextChanged" /> </StackPanel> - </Grid> + <ToggleButton x:Name="BurgerMenuButton" + Click="BurgerMenuButton_Click" + Margin="10,0,0,0" + VerticalAlignment="Top" + HorizontalAlignment="Left" + Style="{StaticResource BurgerMenuButtonStyle}"> + <TextBlock Text="☰" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center"/> + </ToggleButton> + <StackPanel x:Name="MenuPanel" +Visibility="Collapsed" +VerticalAlignment="Top" +HorizontalAlignment="Left" +Margin="10,80,0,0"> + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_2"> + <TextBlock Text="Distractions" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_3"> + <TextBlock Text="ProgrammsList" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_4"> + <TextBlock Text="Overview" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_6"> + <TextBlock Text="Abonnement" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_7"> + <TextBlock Text="Contract" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_8"> + <TextBlock Text="Settings" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + </StackPanel> + + </Grid> </ScrollViewer> </Page> diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs index 832ee9d..9b9ebd1 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs @@ -1,4 +1,5 @@ -using InnoLabProjektDektopApp.Services; +using InnoLabProjektDektopApp.Screens.Regulaer; +using InnoLabProjektDektopApp.Services; using InnoLabProjektDektopApp.Services.WebSocketServer; using System.IO; using System.Net.Sockets; @@ -698,5 +699,46 @@ namespace InnoLabProjektDektopApp } } + + private void Button_Click_2(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Distractions()); + } + + private void Button_Click_3(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new ProgramsList()); + } + + private void Button_Click_4(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Overview()); + } + + private void Button_Click_5(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Statistics()); + } + + private void Button_Click_6(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Abonnement()); + } + + private void Button_Click_7(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Contact()); + } + + private void Button_Click_8(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Settings()); + } + + private void BurgerMenuButton_Click(object sender, RoutedEventArgs e) + { + MenuPanel.Visibility = MenuPanel.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; + } + } } diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml index bead1c8..a984ab0 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml @@ -36,10 +36,6 @@ <TextBlock Text="Overview" Style="{StaticResource ButtonTextStyle}" /> </Border> - <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_5"> - <TextBlock Text="Statistics" Style="{StaticResource ButtonTextStyle}" /> - </Border> - <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_6"> <TextBlock Text="Abonnement" Style="{StaticResource ButtonTextStyle}" /> </Border> diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml index d6da400..f46709b 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml @@ -11,6 +11,7 @@ Background="{StaticResource BACKGROUND_PRIMARY_BRUSH}"> <Grid> + <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> @@ -28,6 +29,44 @@ <Canvas Name="chartCanvas" Margin="150" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Top"> + <ToggleButton x:Name="BurgerMenuButton" + Click="BurgerMenuButton_Click" + Margin="10,20,0,0" + VerticalAlignment="Top" + HorizontalAlignment="Left" + Style="{StaticResource BurgerMenuButtonStyle}"> + <TextBlock Text="☰" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center"/> + </ToggleButton> + <StackPanel x:Name="MenuPanel" + Visibility="Collapsed" + VerticalAlignment="Top" + HorizontalAlignment="Left" + Margin="10,80,0,0"> + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_2"> + <TextBlock Text="Distractions" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_3"> + <TextBlock Text="ProgrammsList" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_4"> + <TextBlock Text="Overview" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_6"> + <TextBlock Text="Abonnement" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_7"> + <TextBlock Text="Contract" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_8"> + <TextBlock Text="Settings" Style="{StaticResource ButtonTextStyle}" /> + </Border> + + </StackPanel> <Rectangle x:Name="chartBackground" Width="480" Height="150" Fill="#333436" RadiusX="10" RadiusY="10" Margin="-15,-25" HorizontalAlignment="Left" VerticalAlignment="Top"/> <TextBlock Text="Your session overview" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,-25"/> diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs index 97a29ec..0783f9a 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs @@ -346,5 +346,45 @@ namespace InnoLabProjektDektopApp.Screens.Regulaer public required bool IsBreak { get; set; } public required int Cycle { get; set; } } + + private void Button_Click_2(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Distractions()); + } + + private void Button_Click_3(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new ProgramsList()); + } + + private void Button_Click_4(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Overview()); + } + + private void Button_Click_5(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Statistics()); + } + + private void Button_Click_6(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Abonnement()); + } + + private void Button_Click_7(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Contact()); + } + + private void Button_Click_8(object sender, RoutedEventArgs e) + { + this.NavigationService.Navigate(new Settings()); + } + + private void BurgerMenuButton_Click(object sender, RoutedEventArgs e) + { + MenuPanel.Visibility = MenuPanel.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; + } } } diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml index 53b03db..528abcc 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml @@ -306,11 +306,11 @@ <Setter Property="Margin" Value="10,20,0,0"/> <Setter Property="VerticalAlignment" Value="Top"/> <Setter Property="HorizontalAlignment" Value="Left"/> - <Setter Property="Background" Value="{StaticResource BACKGROUND_SECONDARY_BRUSH}"/> + <Setter Property="Background" Value="Transparent"/> <!-- Green background --> <Setter Property="Foreground" Value="{StaticResource TEXT_PRIMARY_BRUSH}"/> <!-- White text --> - <Setter Property="FontSize" Value="40"/> + <Setter Property="FontSize" Value="50"/> <Setter Property="BorderBrush" Value="Transparent"/> <Setter Property="BorderThickness" Value="0"/> <Setter Property="Cursor" Value="Hand"/> @@ -328,11 +328,11 @@ </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> - <Setter Property="Background" Value="{StaticResource BACKGROUND_SECONDARY_BRUSH}"/> + <Setter Property="Background" Value="Transparent"/> <!-- Darker green on hover --> </Trigger> <Trigger Property="IsChecked" Value="True"> - <Setter Property="Background" Value="{StaticResource BACKGROUND_SECONDARY_BRUSH}"/> + <Setter Property="Background" Value="Transparent"/> <!-- Even darker green when checked --> </Trigger> </Style.Triggers> -- GitLab