Skip to content
Snippets Groups Projects
Commit 86a3e6d6 authored by Sandra Borst's avatar Sandra Borst
Browse files

navigation works but huge frontend problems!!!

parent c9b946b3
No related tags found
No related merge requests found
Showing
with 89 additions and 117 deletions
No preview for this file type
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
StartupUri="Screens\FirstLaunch\04Settings.xaml"> StartupUri="Screens\Regulaer\03End.xaml">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
......
<Window x:Class="InnoLabProjektDektopApp.Startscreen" <UserControl x:Class="InnoLabProjektDektopApp.Startscreen"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d">
Height="550" Width="900">
<Grid> <Grid>
<Label Content="Are you ready to&#xA;work focused?" HorizontalAlignment="Left" Margin="76,102,0,0" VerticalAlignment="Top" Height="143" Width="432" FontSize="48" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/> <Label Content="Are you ready to&#xA;work focused?" HorizontalAlignment="Left" Margin="76,102,0,0" VerticalAlignment="Top" Height="143" Width="432" FontSize="48" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
...@@ -15,4 +14,4 @@ ...@@ -15,4 +14,4 @@
<Rectangle HorizontalAlignment="Left" Height="269" Margin="587,0,0,0" Stroke="Black" VerticalAlignment="Center" Width="313" Fill="#FF828080"/> <Rectangle HorizontalAlignment="Left" Height="269" Margin="587,0,0,0" Stroke="Black" VerticalAlignment="Center" Width="313" Fill="#FF828080"/>
<Image HorizontalAlignment="Left" Height="197" Margin="668,174,0,0" VerticalAlignment="Top" Width="213" Source="/Screens/FirstLaunch/Mascott_InnoLab.jpg"/> <Image HorizontalAlignment="Left" Height="197" Margin="668,174,0,0" VerticalAlignment="Top" Width="213" Source="/Screens/FirstLaunch/Mascott_InnoLab.jpg"/>
</Grid> </Grid>
</Window> </UserControl>
...@@ -14,25 +14,13 @@ namespace InnoLabProjektDektopApp ...@@ -14,25 +14,13 @@ namespace InnoLabProjektDektopApp
/// <summary> /// <summary>
/// Interaction logic for MainWindow.xaml /// Interaction logic for MainWindow.xaml
/// </summary> /// </summary>
public partial class Startscreen : Window public partial class Startscreen : UserControl
{ {
public Startscreen() public Startscreen()
{ {
InitializeComponent(); InitializeComponent();
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
} }
private void Option1_Click(object sender, RoutedEventArgs e)
{
//this.Content = new AnotherWindow().Content;
}
private void Option2_Click(object sender, RoutedEventArgs e)
{
//this.Content = new AnotherWindow().Content;
}
private void Option3_Click(object sender, RoutedEventArgs e)
{
//this.Content = new AnotherWindow().Content;
}
private void Button_Click(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e)
{ {
......
<Window x:Class="InnoLabProjektDektopApp.Progress" <UserControl x:Class="InnoLabProjektDektopApp.Progress"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d">
Height="550" Width="900">
<Grid> <Grid>
<Label Content="Your way to working more focused" HorizontalAlignment="Center" Margin="0,119,0,0" VerticalAlignment="Top" Height="108" Width="780" FontSize="48" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/> <Label Content="Your way to working more focused" HorizontalAlignment="Center" Margin="0,119,0,0" VerticalAlignment="Top" Height="108" Width="780" FontSize="48" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
...@@ -17,8 +16,8 @@ ...@@ -17,8 +16,8 @@
<TextBlock HorizontalAlignment="Left" Height="68" Margin="68,428,0,0" TextWrapping="Wrap" Text="Aliquam erat volutpat. Integer malesuada turpis id fringilla suscipit. Maecenas ultrices, orci vitae convallis mattis." VerticalAlignment="Top" Width="126"/> <TextBlock HorizontalAlignment="Left" Height="68" Margin="68,428,0,0" TextWrapping="Wrap" Text="Aliquam erat volutpat. Integer malesuada turpis id fringilla suscipit. Maecenas ultrices, orci vitae convallis mattis." VerticalAlignment="Top" Width="126"/>
<TextBlock HorizontalAlignment="Center" Height="68" Margin="0,428,0,0" TextWrapping="Wrap" Text="Aliquam erat volutpat. Integer malesuada turpis id fringilla suscipit. Maecenas ultrices, orci vitae convallis mattis." VerticalAlignment="Top" Width="124"/> <TextBlock HorizontalAlignment="Center" Height="68" Margin="0,428,0,0" TextWrapping="Wrap" Text="Aliquam erat volutpat. Integer malesuada turpis id fringilla suscipit. Maecenas ultrices, orci vitae convallis mattis." VerticalAlignment="Top" Width="124"/>
<TextBlock HorizontalAlignment="Left" Height="68" Margin="695,428,0,0" TextWrapping="Wrap" Text="Aliquam erat volutpat. Integer malesuada turpis id fringilla suscipit. Maecenas ultrices, orci vitae convallis mattis." VerticalAlignment="Top" Width="125"/> <TextBlock HorizontalAlignment="Left" Height="68" Margin="695,428,0,0" TextWrapping="Wrap" Text="Aliquam erat volutpat. Integer malesuada turpis id fringilla suscipit. Maecenas ultrices, orci vitae convallis mattis." VerticalAlignment="Top" Width="125"/>
<Button Content="Button" HorizontalAlignment="Left" Height="40" Margin="68,343,0,0" VerticalAlignment="Top" Width="110" Click="Button_Click1"/> <Button Content="Button" HorizontalAlignment="Left" Height="40" Margin="68,343,0,0" VerticalAlignment="Top" Width="110"/>
<Button Content="Button" HorizontalAlignment="Left" Height="40" Margin="388,343,0,0" VerticalAlignment="Top" Width="110" Click="Button_Click2"/> <Button Content="Button" HorizontalAlignment="Left" Height="40" Margin="388,343,0,0" VerticalAlignment="Top" Width="110"/>
<Button Content="Button" HorizontalAlignment="Left" Height="40" Margin="695,343,0,0" VerticalAlignment="Top" Width="110" Click="Button_Click2"/> <Button Content="Button" HorizontalAlignment="Left" Height="40" Margin="695,343,0,0" VerticalAlignment="Top" Width="110"/>
</Grid> </Grid>
</Window> </UserControl>
...@@ -14,7 +14,7 @@ namespace InnoLabProjektDektopApp ...@@ -14,7 +14,7 @@ namespace InnoLabProjektDektopApp
/// <summary> /// <summary>
/// Interaction logic for MainWindow.xaml /// Interaction logic for MainWindow.xaml
/// </summary> /// </summary>
public partial class Progress : Window public partial class Progress : UserControl
{ {
public Progress() public Progress()
{ {
...@@ -33,18 +33,5 @@ namespace InnoLabProjektDektopApp ...@@ -33,18 +33,5 @@ namespace InnoLabProjektDektopApp
{ {
//this.Content = new AnotherWindow().Content; //this.Content = new AnotherWindow().Content;
} }
private void Button_Click1(object sender, RoutedEventArgs e)
{
//this.Content = new AnotherWindow().Content;
}
private void Button_Click2(object sender, RoutedEventArgs e)
{
this.Content = new Settings().Content;
}
private void Button_Click3(object sender, RoutedEventArgs e)
{
//this.Content = new AnotherWindow().Content;
}
} }
} }
\ No newline at end of file
<Window x:Class="InnoLabProjektDektopApp.Distractions" <UserControl x:Class="InnoLabProjektDektopApp.Distractions"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d"
Height="550" Width="900"> HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid> <Grid>
<StackPanel Margin="20,0,20,20"> <StackPanel Margin="20,0,20,20">
...@@ -271,5 +272,5 @@ ...@@ -271,5 +272,5 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </UserControl>
...@@ -19,15 +19,18 @@ namespace InnoLabProjektDektopApp ...@@ -19,15 +19,18 @@ namespace InnoLabProjektDektopApp
/// <summary> /// <summary>
/// Interaction logic for MainWindow.xaml /// Interaction logic for MainWindow.xaml
/// </summary> /// </summary>
public partial class Distractions : Window public partial class Distractions : UserControl
{ {
private string jsonFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets", "distractingWebsites.json"); private string jsonFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets", "distractingWebsites.json");
private Dictionary<string, List<WebsiteEntry>> ?data; private Dictionary<string, List<WebsiteEntry>> ?data;
public Distractions() private readonly End _parentScreen;
public Distractions(End parentScreen)
{ {
InitializeComponent(); InitializeComponent();
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
_parentScreen = parentScreen;
LoadJsonData(); LoadJsonData();
} }
...@@ -230,9 +233,8 @@ namespace InnoLabProjektDektopApp ...@@ -230,9 +233,8 @@ namespace InnoLabProjektDektopApp
if (!string.IsNullOrEmpty(category)) if (!string.IsNullOrEmpty(category))
{ {
// Navigiere zur entsprechenden Seite (DistractionsList) // Navigiere zur entsprechenden Seite (DistractionsList)
var distractionListScreen = new DistractionsList(category); var distractionListScreen = new DistractionsList(category, this._parentScreen);
distractionListScreen.Show(); // Zeige neue Seite _parentScreen.MainContent.Content = distractionListScreen;
this.Close(); // Schließe aktuelle Seite
} }
} }
} }
......
...@@ -21,13 +21,15 @@ namespace InnoLabProjektDektopApp ...@@ -21,13 +21,15 @@ namespace InnoLabProjektDektopApp
{ {
private string _category; private string _category;
private Dictionary<string, List<WebsiteEntry>> _data; private Dictionary<string, List<WebsiteEntry>> _data;
private readonly End _parentScreen;
private string _jsonFilePath; private string _jsonFilePath;
public DistractionsList(string category) public DistractionsList(string category, End parentScreen)
{ {
InitializeComponent(); InitializeComponent();
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
_category = category; _category = category;
_parentScreen = parentScreen;
_jsonFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets", "distractingWebsites.json"); _jsonFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets", "distractingWebsites.json");
LoadCategoryItems(); LoadCategoryItems();
} }
...@@ -223,9 +225,11 @@ namespace InnoLabProjektDektopApp ...@@ -223,9 +225,11 @@ namespace InnoLabProjektDektopApp
private void BackButton_Click(object sender, RoutedEventArgs e) private void BackButton_Click(object sender, RoutedEventArgs e)
{ {
var distractionsScreen = new Distractions();
distractionsScreen.Show(); var distractionScreen = new Distractions(this._parentScreen);
this.Close();
// Setze den Content des MainContent im End-Screen
_parentScreen.MainContent.Content = distractionScreen;
} }
public class WebsiteEntry public class WebsiteEntry
......
<Window x:Class="InnoLabProjektDektopApp.Settings" <UserControl x:Class="InnoLabProjektDektopApp.Settings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d">
Height="550" Width="900">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"> <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<Grid> <Grid>
...@@ -178,4 +177,4 @@ ToolTip="You can decide how long the focus and break period should be. The focus ...@@ -178,4 +177,4 @@ ToolTip="You can decide how long the focus and break period should be. The focus
</Grid> </Grid>
</ScrollViewer> </ScrollViewer>
</Window> </UserControl>
...@@ -17,12 +17,14 @@ namespace InnoLabProjektDektopApp ...@@ -17,12 +17,14 @@ namespace InnoLabProjektDektopApp
/// <summary> /// <summary>
/// Interaction logic for MainWindow.xaml /// Interaction logic for MainWindow.xaml
/// </summary> /// </summary>
public partial class Settings : Window public partial class Settings : UserControl
{ {
public Settings() private readonly End _parentScreen;
public Settings(End parentScreen)
{ {
InitializeComponent(); InitializeComponent();
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
this._parentScreen = parentScreen;
MascotVisibilityChanged(null, null); MascotVisibilityChanged(null, null);
} }
private void MascotVisibilityChanged(object sender, RoutedEventArgs e) private void MascotVisibilityChanged(object sender, RoutedEventArgs e)
...@@ -124,13 +126,9 @@ private void SaveSettingsButton_Click(object sender, RoutedEventArgs e) ...@@ -124,13 +126,9 @@ private void SaveSettingsButton_Click(object sender, RoutedEventArgs e)
private void NavigateToOverviewButton_Click(object sender, RoutedEventArgs e) private void NavigateToOverviewButton_Click(object sender, RoutedEventArgs e)
{ {
// Erstelle eine Instanz des OverviewScreen // Erstelle eine Instanz des OverviewScreen
var overviewScreen = new Overview(); var overviewScreen = new Overview(_parentScreen);
_parentScreen.MainContent.Content = overviewScreen;
// Zeige den OverviewScreen
overviewScreen.Show();
// Schließe den aktuellen Screen
this.Close();
} }
......
<Window x:Class="InnoLabProjektDektopApp.Overview" <UserControl x:Class="InnoLabProjektDektopApp.Overview"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d"
Height="550" Width="900"> Background="Black">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Grid> <Grid>
<StackPanel Margin="20,0,20,20"> <StackPanel Margin="20,0,20,20">
<!-- Überschrift --> <!-- Überschrift -->
...@@ -194,4 +196,5 @@ TextChanged="FocusTopicInputBox_TextChanged" /> ...@@ -194,4 +196,5 @@ TextChanged="FocusTopicInputBox_TextChanged" />
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </ScrollViewer>
</UserControl>
...@@ -9,7 +9,7 @@ namespace InnoLabProjektDektopApp ...@@ -9,7 +9,7 @@ namespace InnoLabProjektDektopApp
/// <summary> /// <summary>
/// Interaction logic for Overview.xaml /// Interaction logic for Overview.xaml
/// </summary> /// </summary>
public partial class Overview : Window public partial class Overview : UserControl
{ {
// Aktuelles Profil, für das Einstellungen geladen werden sollen // Aktuelles Profil, für das Einstellungen geladen werden sollen
private string profile = "profile1"; private string profile = "profile1";
...@@ -17,10 +17,13 @@ namespace InnoLabProjektDektopApp ...@@ -17,10 +17,13 @@ namespace InnoLabProjektDektopApp
// Pfad zur JSON-Datei, in der die Einstellungen gespeichert sind // Pfad zur JSON-Datei, in der die Einstellungen gespeichert sind
private string SettingsFilePath; private string SettingsFilePath;
public Overview() private readonly End _parentScreen;
public Overview(End parentScreen)
{ {
InitializeComponent(); InitializeComponent();
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
this._parentScreen = parentScreen;
// Definieren des Pfads zur JSON-Datei // Definieren des Pfads zur JSON-Datei
this.SettingsFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "settings.json"); this.SettingsFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "settings.json");
...@@ -172,9 +175,8 @@ namespace InnoLabProjektDektopApp ...@@ -172,9 +175,8 @@ namespace InnoLabProjektDektopApp
MessageBoxButton.OK, MessageBoxButton.OK,
MessageBoxImage.Information); MessageBoxImage.Information);
var sessionScreen = new Session(focusPeriod, breakPeriod, cycles, distractionMode, mascotVisible, wordsOfAffirmation, insultingWords); var sessionScreen = new Session(focusPeriod, breakPeriod, cycles, distractionMode, mascotVisible, wordsOfAffirmation, insultingWords, this._parentScreen);
sessionScreen.Show(); _parentScreen.MainContent.Content = sessionScreen;
this.Close();
} }
} }
......
<Window x:Class="InnoLabProjektDektopApp.Session" <UserControl x:Class="InnoLabProjektDektopApp.Session"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d">
Height="550" Width="900">
<Grid> <Grid>
<Button Margin="0,100,150,10" Width="40" Height="40" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent" BorderBrush="Transparent" Click="discardSession_Click"> <Button Margin="0,100,150,10" Width="40" Height="40" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent" BorderBrush="Transparent" Click="discardSession_Click">
<Grid > <Grid >
...@@ -21,4 +20,4 @@ ...@@ -21,4 +20,4 @@
</StackPanel> </StackPanel>
<Button Content="Pause" Name="PlayPauseButton" Style="{StaticResource PlayPauseButton}" HorizontalAlignment="Center" Margin="0,320,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Click="PlayPause_Click"/> <Button Content="Pause" Name="PlayPauseButton" Style="{StaticResource PlayPauseButton}" HorizontalAlignment="Center" Margin="0,320,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Click="PlayPause_Click"/>
</Grid> </Grid>
</Window> </UserControl>
\ No newline at end of file \ No newline at end of file
...@@ -16,8 +16,10 @@ namespace InnoLabProjektDektopApp ...@@ -16,8 +16,10 @@ namespace InnoLabProjektDektopApp
/// <summary> /// <summary>
/// Interaction logic for MainWindow.xaml /// Interaction logic for MainWindow.xaml
/// </summary> /// </summary>
public partial class Session : Window public partial class Session : UserControl
{ {
private readonly End _parentScreen;
private int focusPeriod; private int focusPeriod;
private int breakPeriod; private int breakPeriod;
private int cycles; private int cycles;
...@@ -43,7 +45,7 @@ namespace InnoLabProjektDektopApp ...@@ -43,7 +45,7 @@ namespace InnoLabProjektDektopApp
string distractionMode, string distractionMode,
string mascotVisible, string mascotVisible,
bool wordsOfAffirmation, bool wordsOfAffirmation,
bool insultingWords) bool insultingWords, End parentScreen)
{ {
InitializeComponent(); InitializeComponent();
this.focusPeriod = focusPeriod; this.focusPeriod = focusPeriod;
...@@ -53,6 +55,7 @@ namespace InnoLabProjektDektopApp ...@@ -53,6 +55,7 @@ namespace InnoLabProjektDektopApp
this.mascotVisible = mascotVisible; this.mascotVisible = mascotVisible;
this.wordsOfAffirmation = wordsOfAffirmation; this.wordsOfAffirmation = wordsOfAffirmation;
this.insultingWords = insultingWords; this.insultingWords = insultingWords;
this._parentScreen = parentScreen;
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
this.maxTime = focusPeriod * 60; //todo: multiply with 60 later this.maxTime = focusPeriod * 60; //todo: multiply with 60 later
...@@ -264,10 +267,8 @@ namespace InnoLabProjektDektopApp ...@@ -264,10 +267,8 @@ namespace InnoLabProjektDektopApp
MessageBox.Show($"Abbruchgrund: {selectedReason}", "Sitzung beendet", MessageBoxButton.OK, MessageBoxImage.Information); MessageBox.Show($"Abbruchgrund: {selectedReason}", "Sitzung beendet", MessageBoxButton.OK, MessageBoxImage.Information);
// Zum OverviewScreen navigieren // Zum OverviewScreen navigieren
var overviewScreen = new Overview(); var overviewScreen = new Overview(_parentScreen);
overviewScreen.Show(); _parentScreen.MainContent.Content = overviewScreen;
reasonWindow.Close(); // Fenster schließen
this.Close(); // Aktuelles Fenster schließen
}; };
// Radiobuttons und Button zum StackPanel hinzufügen // Radiobuttons und Button zum StackPanel hinzufügen
......
...@@ -7,13 +7,9 @@ ...@@ -7,13 +7,9 @@
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d"
Height="550" Width="900"> Height="550" Width="900">
<Grid> <Grid Background="LightGray">
<header:HeaderTemplate VerticalAlignment="Top"/> <ContentControl x:Name="MainContent" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
<Button Content="Subscription" Style="{StaticResource TopMenuButon}" HorizontalAlignment="Right" Margin="0,4,100,0" VerticalAlignment="Top" Height="26" Width="80" Click="Option2_Click"/> Margin="0,0,0,0" ClipToBounds="False"/>
<Button Content="Contract" Style="{StaticResource TopMenuButon}" HorizontalAlignment="Right" Margin="0,4,20,0" VerticalAlignment="Top" Height="26" Width="80" Click="Option3_Click"/>
<!-- DELETE -->
<Label Content="End Page" HorizontalAlignment="Center" Margin="0,234,0,0" VerticalAlignment="Top" Height="108" Width="439" FontSize="48" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</Grid> </Grid>
</Window> </Window>
...@@ -20,18 +20,13 @@ namespace InnoLabProjektDektopApp ...@@ -20,18 +20,13 @@ namespace InnoLabProjektDektopApp
{ {
InitializeComponent(); InitializeComponent();
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
LoadScreen();
} }
private void Option1_Click(object sender, RoutedEventArgs e)
{ private void LoadScreen()
//this.Content = new AnotherWindow().Content;
}
private void Option2_Click(object sender, RoutedEventArgs e)
{
//this.Content = new AnotherWindow().Content;
}
private void Option3_Click(object sender, RoutedEventArgs e)
{ {
//this.Content = new AnotherWindow().Content; MainContent.Content = new Statistics(this);
} }
} }
} }
\ No newline at end of file
<Window x:Class="InnoLabProjektDektopApp.Statistics" <UserControl x:Class="InnoLabProjektDektopApp.Statistics"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:InnoLabProjektDektopApp" xmlns:local="clr-namespace:InnoLabProjektDektopApp"
xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates" xmlns:header="clr-namespace:InnoLabProjektDektopApp.Screens.Templates"
mc:Ignorable="d" mc:Ignorable="d" Background="Red">
Height="550" Width="900"> <ScrollViewer>
<Grid> <Grid>
<header:HeaderTemplate VerticalAlignment="top"/> <TextBlock Margin="10,10,-10,90" TextWrapping="Wrap" Text="Ganz viel Text und so"/>
<TextBlock Margin="665,132,-665,168" TextWrapping="Wrap" Text="Ganz viel Text und so"/>
<Button Content="Subscription" Style="{StaticResource TopMenuButon}" HorizontalAlignment="Right" Margin="0,4,100,0" VerticalAlignment="Top" Height="26" Width="80" Click="Option2_Click"/> <TextBlock Margin="10,371,-10,129" TextWrapping="Wrap" Text="Ganz viel Text und so"/>
<Button Content="Contract" Style="{StaticResource TopMenuButon}" HorizontalAlignment="Right" Margin="0,4,20,0" VerticalAlignment="Top" Height="26" Width="80" Click="Option3_Click"/>
<!-- DELETE -->
<Label Content="Statistics Page" HorizontalAlignment="Center" Margin="0,234,0,0" VerticalAlignment="Top" Height="108" Width="439" FontSize="48" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</Grid> </Grid>
</Window> </ScrollViewer>
</UserControl>
...@@ -14,10 +14,12 @@ namespace InnoLabProjektDektopApp ...@@ -14,10 +14,12 @@ namespace InnoLabProjektDektopApp
/// <summary> /// <summary>
/// Interaction logic for MainWindow.xaml /// Interaction logic for MainWindow.xaml
/// </summary> /// </summary>
public partial class Statistics : Window public partial class Statistics : UserControl
{ {
public Statistics() private readonly End _parentScreen;
public Statistics(End parentScreen)
{ {
this._parentScreen = parentScreen;
InitializeComponent(); InitializeComponent();
GlobalSettings.setDefaults(this); GlobalSettings.setDefaults(this);
} }
......
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2DEDC9624A7085F1363F3F7BDB3110EA433383A8" #pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7D74CC56137BF813041AB27EB36F34CDC24CEC07"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
...@@ -55,7 +55,7 @@ namespace InnoLabProjektDektopApp { ...@@ -55,7 +55,7 @@ namespace InnoLabProjektDektopApp {
_contentLoaded = true; _contentLoaded = true;
#line 5 "..\..\..\App.xaml" #line 5 "..\..\..\App.xaml"
this.StartupUri = new System.Uri("Screens\\FirstLaunch\\04Settings.xaml", System.UriKind.Relative); this.StartupUri = new System.Uri("Screens\\Regulaer\\03End.xaml", System.UriKind.Relative);
#line default #line default
#line hidden #line hidden
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment