From f02da51f06df3b4b74b34fd57fd5ccadd18421db Mon Sep 17 00:00:00 2001 From: Sandra Borst <108298114+VerfluchteZocke@users.noreply.github.com> Date: Wed, 12 Mar 2025 15:11:49 +0100 Subject: [PATCH] changed statistics session colors, removed logging boxes --- .../Screens/FirstLaunch/03_1DistractionsList.xaml.cs | 3 +-- .../Screens/FirstLaunch/04Settings.xaml.cs | 2 +- .../Screens/Regulaer/01Overview.xaml | 2 +- .../Screens/Regulaer/01Overview.xaml.cs | 3 +++ .../Screens/Regulaer/02Session.xaml | 2 +- .../Screens/Regulaer/02Session.xaml.cs | 2 +- .../Screens/Regulaer/Abonnement.xaml.cs | 2 +- .../Screens/Regulaer/SessionStatistics.xaml.cs | 12 ++++++------ .../InnoLabProjektDektopApp/Styles/Styles.xaml | 4 ++++ 9 files changed, 19 insertions(+), 13 deletions(-) diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_1DistractionsList.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_1DistractionsList.xaml.cs index 21aa4e6..d9ec699 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_1DistractionsList.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_1DistractionsList.xaml.cs @@ -144,7 +144,7 @@ namespace InnoLabProjektDektopApp stackPanel.Children.Add(checkBox); ItemsPanel.Children.Add(stackPanel); - MessageBox.Show($"URL '{enteredUrl}' has been added to the '{_category}' category.", "Success", MessageBoxButton.OK, MessageBoxImage.Information); + //MessageBox.Show($"URL '{enteredUrl}' has been added to the '{_category}' category.", "Success", MessageBoxButton.OK, MessageBoxImage.Information); // Clear the input field UrlInputBox.Clear(); @@ -269,7 +269,6 @@ namespace InnoLabProjektDektopApp { string updatedJson = JsonSerializer.Serialize(_data, new JsonSerializerOptions { WriteIndented = true }); File.WriteAllText(_jsonFilePath, updatedJson); - MessageBox.Show("Data saved successfully!"); } catch (Exception ex) { diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/04Settings.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/04Settings.xaml.cs index 324956f..fb73501 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/04Settings.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/04Settings.xaml.cs @@ -116,7 +116,7 @@ namespace InnoLabProjektDektopApp // save json File.WriteAllText(filePath, JsonSerializer.Serialize(settings, new JsonSerializerOptions { WriteIndented = true })); - MessageBox.Show($"Settings saved for {projectName}.", "Success.", MessageBoxButton.OK, MessageBoxImage.Information); + //MessageBox.Show($"Settings saved for {projectName}.", "Success.", MessageBoxButton.OK, MessageBoxImage.Information); // show massageBox /*if (File.Exists(filePath)) diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml index 56de8cf..8b03eb4 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml @@ -322,7 +322,7 @@ Margin="10,80,0,0"> </Border> <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_7"> - <TextBlock Text="Contract" Style="{StaticResource ButtonTextStyle}" /> + <TextBlock Text="Contact" Style="{StaticResource ButtonTextStyle}" /> </Border> <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_8"> diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs index b1d4d7c..2a311b7 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/01Overview.xaml.cs @@ -465,6 +465,7 @@ namespace InnoLabProjektDektopApp bool insultingWords = InsultingWordsCheckBox.IsChecked ?? false; // Anzeige der Werte in einer MessageBox + /* MessageBox.Show($"Focus Period: {focusPeriod} minutes\n" + $"Break Period: {breakPeriod} minutes\n" + $"Cycles: {cycles}\n" + @@ -477,6 +478,8 @@ namespace InnoLabProjektDektopApp MessageBoxButton.OK, MessageBoxImage.Information); + */ + tmpSession = new Session(focusPeriod, breakPeriod, cycles, distractionMode, mascotVisible, wordsOfAffirmation, insultingWords); this.NavigationService.Navigate(tmpSession); diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml index a984ab0..c048127 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml @@ -41,7 +41,7 @@ </Border> <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_7"> - <TextBlock Text="Contract" Style="{StaticResource ButtonTextStyle}" /> + <TextBlock Text="Contact" Style="{StaticResource ButtonTextStyle}" /> </Border> <Border Style="{StaticResource RoundedButtonBorder2}" MouseDown="Button_Click_8"> diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml.cs index 0ac7392..57cf31c 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/02Session.xaml.cs @@ -309,7 +309,7 @@ namespace InnoLabProjektDektopApp reason2.IsChecked == true ? "Mir ist etwas sehr Wichtiges dazwischengekommen, was ich nicht verschieben konnte." : "Kein Grund ausgewählt"; - MessageBox.Show($"Abbruchgrund: {selectedReason}", "Sitzung beendet", MessageBoxButton.OK, MessageBoxImage.Information); + // MessageBox.Show($"Abbruchgrund: {selectedReason}", "Sitzung beendet", MessageBoxButton.OK, MessageBoxImage.Information); reasonWindow.Close(); processMonitor.FinishSession(); }; diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/Abonnement.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/Abonnement.xaml.cs index a743fdc..43ebda7 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/Abonnement.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/Abonnement.xaml.cs @@ -28,7 +28,7 @@ namespace InnoLabProjektDektopApp.Screens.Regulaer private void Button_Click(object sender, MouseButtonEventArgs e) { // Beispiel: Öffne eine neue Seite / neues Fenster - MessageBox.Show("Premium Button clicked!"); + MessageBox.Show("Follow us on social media to be one of the first to know once the premium features are available!"); } } diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs index 0783f9a..40187c2 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/Regulaer/SessionStatistics.xaml.cs @@ -97,7 +97,7 @@ namespace InnoLabProjektDektopApp.Screens.Regulaer { Width = bar_width, Height = bar_height, - Fill = Brushes.Green + Fill = Brushes.Orange }; Canvas.SetLeft(cycleSegment, 0); @@ -133,7 +133,7 @@ namespace InnoLabProjektDektopApp.Screens.Regulaer { Width = bar_width * (segmentDuration / cycleDuration), Height = bar_height, - Fill = Brushes.Red + Fill = Brushes.DeepPink }; Canvas.SetLeft(segment, bar_width * (processStartTime - cycleStartTime).TotalSeconds / cycleDuration.TotalSeconds); @@ -224,8 +224,8 @@ namespace InnoLabProjektDektopApp.Screens.Regulaer // Create legend items var legendItems = new List<(string Text, Brush Color)> { - ("Productive Work", Brushes.Green), - ("Distraction", Brushes.Red), + ("Productive Work", Brushes.Orange), + ("Distraction", Brushes.DeepPink), ("Break", Brushes.Blue), ("Pause", Brushes.LightBlue) }; @@ -283,7 +283,7 @@ namespace InnoLabProjektDektopApp.Screens.Regulaer Name = $"Distractions:", Values = distractedTime.TotalSeconds > 1 ? [distractedTime.TotalMinutes] : new List<double>(), MaxRadialColumnWidth = 35, - Fill = new SolidColorPaint(SKColors.Red), + Fill = new SolidColorPaint(SKColors.DeepPink), ToolTipLabelFormatter = value => $"{distractedTimeFormatted} minutes" }, new PieSeries<double> { @@ -304,7 +304,7 @@ namespace InnoLabProjektDektopApp.Screens.Regulaer Name = $"Productive:", Values = productiveTime.TotalSeconds > 1 ? [productiveTime.TotalMinutes] : new List<double>(), MaxRadialColumnWidth = 35, - Fill = new SolidColorPaint(SKColors.Green), + Fill = new SolidColorPaint(SKColors.Orange), ToolTipLabelFormatter = value => $"{productiveTimeFormatted} minutes" } ]; diff --git a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml index 528abcc..11c7c84 100644 --- a/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml +++ b/InnoLabProjektDektopApp/InnoLabProjektDektopApp/Styles/Styles.xaml @@ -7,6 +7,8 @@ <!-- Ersetze durch den exakten Farbwert --> <Color x:Key="HIGHLIGHT_SECONDARY_COLOR">#1B2736</Color> <!-- Ersetze durch den exakten Farbwert --> + <Color x:Key="HIGHLIGHT_TERTIARY_COLOR">#004960</Color> + <Color x:Key="HIGHLIGHT_QUATERNARY_COLOR">#F4C01E</Color> <Color x:Key="BACKGROUND_PRIMARY_COLOR">#272727</Color> <!-- Ersetze durch den exakten Farbwert --> <Color x:Key="BACKGROUND_SECONDARY_COLOR">#333436</Color> @@ -19,6 +21,8 @@ <!-- Optional: Farben als Brushes bereitstellen --> <SolidColorBrush x:Key="HIGHLIGHT_PRIMARY_BRUSH" Color="{StaticResource HIGHLIGHT_PRIMARY_COLOR}" /> <SolidColorBrush x:Key="HIGHLIGHT_SECONDARY_BRUSH" Color="{StaticResource HIGHLIGHT_SECONDARY_COLOR}" /> + <SolidColorBrush x:Key="HIGHLIGHT_TERTIARY_BRUSH" Color="{StaticResource HIGHLIGHT_TERTIARY_COLOR}" /> + <SolidColorBrush x:Key="HIGHLIGHT_QUATERNARY_BRUSH" Color="{StaticResource HIGHLIGHT_QUATERNARY_COLOR}" /> <SolidColorBrush x:Key="BACKGROUND_PRIMARY_BRUSH" Color="{StaticResource BACKGROUND_PRIMARY_COLOR}" /> <SolidColorBrush x:Key="BACKGROUND_SECONDARY_BRUSH" Color="{StaticResource BACKGROUND_SECONDARY_COLOR}" /> <SolidColorBrush x:Key="TEXT_PRIMARY_BRUSH" Color="{StaticResource TEXT_PRIMARY_COLOR}" /> -- GitLab