Skip to content
Snippets Groups Projects
Commit 7fb51e2d authored by Philipp Müller's avatar Philipp Müller
Browse files

do some spinny thingy

parent bccc515d
No related branches found
No related tags found
1 merge request!67do some spinny thingy
<Page x:Class="InnoLabProjektDektopApp.ProgramsList" <Page x:Class="InnoLabProjektDektopApp.ProgramsList"
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="{StaticResource BACKGROUND_PRIMARY_BRUSH}"> Background="{StaticResource BACKGROUND_PRIMARY_BRUSH}">
<Page.Resources>
<Storyboard x:Key="RefreshButtonSpinStoryboard">
<DoubleAnimation
Storyboard.TargetName="RefreshPath"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
From="0"
To="360"
Duration="0:0:0.5">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseInOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</Page.Resources>
<Grid VerticalAlignment="Center"> <Grid VerticalAlignment="Center">
<StackPanel Margin="20,20,20,20"> <StackPanel Margin="20,20,20,20">
<Grid> <Grid>
...@@ -22,63 +38,55 @@ ...@@ -22,63 +38,55 @@
HorizontalAlignment="Left" /> HorizontalAlignment="Left" />
<!-- Suchfeld --> <!-- Suchfeld -->
<Border CornerRadius="10" Padding="10" Grid.Column="1" HorizontalAlignment="Right" Margin="10,0,0,0" Background="{StaticResource BACKGROUND_SECONDARY_BRUSH}">
<Border CornerRadius="10" Padding="10" Grid.Column="1" HorizontalAlignment="Right" Margin="10,0,0,0" Background="{StaticResource BACKGROUND_SECONDARY_BRUSH}">
<!-- Input Field with Placeholder --> <!-- Input Field with Placeholder -->
<Grid> <Grid>
<TextBox x:Name="SearchBox" <TextBox x:Name="SearchBox"
Margin="10,0" Margin="10,0"
Width="150" Width="150"
Height="30" Height="30"
FontSize="14" FontSize="14"
VerticalAlignment="Center" VerticalAlignment="Center"
Padding="5" Padding="5"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Background="Transparent" Background="Transparent"
Foreground="{StaticResource TEXT_PRIMARY_BRUSH}" Foreground="{StaticResource TEXT_PRIMARY_BRUSH}"
BorderBrush="{StaticResource TEXT_SECONDARY_BRUSH}" BorderBrush="{StaticResource TEXT_SECONDARY_BRUSH}"
BorderThickness="0" BorderThickness="0"
TextChanged="SearchBox_TextChanged" /> TextChanged="SearchBox_TextChanged" />
<TextBlock x:Name="SearchPlaceholder" <TextBlock x:Name="SearchPlaceholder"
Text="Search..." Text="Search..."
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Foreground="{StaticResource TEXT_SECONDARY_BRUSH}" Foreground="{StaticResource TEXT_SECONDARY_BRUSH}"
FontSize="14" FontSize="14"
Padding="5" Padding="5"
IsHitTestVisible="False" IsHitTestVisible="False"
Margin="15,0,0,0" /> Margin="15,0,0,0" />
<!-- Untere Linie als Border --> <!-- Untere Linie als Border -->
<Border Height="1" <Border Height="1"
Background="{StaticResource TEXT_PRIMARY_BRUSH}" Background="{StaticResource TEXT_PRIMARY_BRUSH}"
VerticalAlignment="Bottom" VerticalAlignment="Bottom"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Margin="10,0,40,0" /> Margin="10,0,40,0" />
<Border Width="30" <Border Width="30"
Height="30" Height="30"
Margin="165,0,0,0" Margin="165,0,0,0"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Right" HorizontalAlignment="Right">
>
<TextBlock Text="🔍" <TextBlock Text="🔍"
FontSize="14" FontSize="14"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center" HorizontalAlignment="Center" />
/>
</Border> </Border>
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
<TextBlock Margin="0,10,0,0" <TextBlock Margin="0,10,0,0"
Text="On the left side, you can find the programs that you marked as distracting. On the left, you find all currently running programs that you can potentially add to the distracting programs." /> Text="On the left side, you can find the programs that you marked as distracting. On the left, you find all currently running programs that you can potentially add to the distracting programs." />
<!-- Überschrift --> <!-- Überschrift -->
<Grid Margin="0,20"> <Grid Margin="0,20">
<!-- Define two equal columns --> <!-- Define two equal columns -->
...@@ -93,9 +101,9 @@ HorizontalAlignment="Right" ...@@ -93,9 +101,9 @@ HorizontalAlignment="Right"
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,15"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,15">
<CheckBox x:Name="OtherProgramsCheckBox" IsChecked="True" VerticalAlignment="Center"/> <CheckBox x:Name="OtherProgramsCheckBox" IsChecked="True" VerticalAlignment="Center"/>
<TextBlock x:Name="HeaderTextBlock" <TextBlock x:Name="HeaderTextBlock"
Style="{StaticResource Header2}" Style="{StaticResource Header2}"
Text="CATEGORY" Text="CATEGORY"
Margin="10,0,0,0"/> Margin="10,0,0,0"/>
</StackPanel> </StackPanel>
<!-- ScrollViewer for Items --> <!-- ScrollViewer for Items -->
...@@ -107,16 +115,20 @@ HorizontalAlignment="Right" ...@@ -107,16 +115,20 @@ HorizontalAlignment="Right"
<!-- Right Column StackPanel --> <!-- Right Column StackPanel -->
<StackPanel Grid.Column="1" Margin="20,10,20,8"> <StackPanel Grid.Column="1" Margin="20,10,20,8">
<!-- Header --> <!-- Header -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0" > <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0">
<TextBlock x:Name="HeaderTextBlock2" <TextBlock x:Name="HeaderTextBlock2"
Style="{StaticResource Header2}" Style="{StaticResource Header2}"
Text="Running Programs" Text="Running Programs"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
<!-- Refresh Button --> <!-- Refresh Button -->
<Border Margin="10,0,0,0" Style="{StaticResource RoundedButtonBorder}" MouseDown="RefreshButton_Click" Width="40" Height="40" VerticalAlignment="Center"> <Border Margin="10,0,0,0" Style="{StaticResource RoundedButtonBorder}" MouseDown="RefreshButton_Click" Width="40" Height="40" VerticalAlignment="Center">
<Viewbox Width="20" Height="20" HorizontalAlignment="Center"> <Viewbox Width="20" Height="20" HorizontalAlignment="Center">
<Path Margin="-4,0,0,0" Fill="Black" Data="M12,4V1L8,5L12,9V6C15.3,6 18,8.7 18,12C18,15.3 15.3,18 12,18C8.7,18 6,15.3 6,12H4C4,16.4 7.6,20 12,20C16.4,20 20,16.4 20,12C20,7.6 16.4,4 12,4Z"/> <Path x:Name="RefreshPath" Margin="-4,0,0,0" Fill="Black" Data="M12,4V1L8,5L12,9V6C15.3,6 18,8.7 18,12C18,15.3 15.3,18 12,18C8.7,18 6,15.3 6,12H4C4,16.4 7.6,20 12,20C16.4,20 20,16.4 20,12C20,7.6 16.4,4 12,4Z">
<Path.RenderTransform>
<RotateTransform Angle="0" CenterX="12" CenterY="12" />
</Path.RenderTransform>
</Path>
</Viewbox> </Viewbox>
</Border> </Border>
</StackPanel> </StackPanel>
...@@ -127,12 +139,6 @@ HorizontalAlignment="Right" ...@@ -127,12 +139,6 @@ HorizontalAlignment="Right"
</ScrollViewer> </ScrollViewer>
</StackPanel> </StackPanel>
</Grid> </Grid>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Page> </Page>
\ No newline at end of file
...@@ -18,6 +18,7 @@ using System.Diagnostics; ...@@ -18,6 +18,7 @@ using System.Diagnostics;
using static InnoLabProjektDektopApp.DistractionsList; using static InnoLabProjektDektopApp.DistractionsList;
using System; using System;
using InnoLabProjektDektopApp.Utils; using InnoLabProjektDektopApp.Utils;
using System.Windows.Media.Animation;
namespace InnoLabProjektDektopApp namespace InnoLabProjektDektopApp
...@@ -75,6 +76,10 @@ namespace InnoLabProjektDektopApp ...@@ -75,6 +76,10 @@ namespace InnoLabProjektDektopApp
private void RefreshButton_Click(object sender, RoutedEventArgs e) private void RefreshButton_Click(object sender, RoutedEventArgs e)
{ {
// Start the spin animation
var storyboard = (Storyboard)FindResource("RefreshButtonSpinStoryboard");
storyboard.Begin();
RefreshRunningProcessList(); RefreshRunningProcessList();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment