wip
This commit is contained in:
parent
750d840563
commit
81c8b4181c
@ -8,7 +8,8 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ui:ThemesDictionary Theme="Light" />
|
||||
<ui:ControlsDictionary />
|
||||
<ResourceDictionary Source="/Resources/ButtonStyles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
</Application>
|
||||
@ -0,0 +1,4 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/WebPathMapping/IgnoredPaths/=BUTTONSTYLES_002EXAML/@EntryIndexedValue">ButtonStyles.xaml</s:String>
|
||||
|
||||
<s:String x:Key="/Default/CodeInspection/WebPathMapping/PathsInCorrectCasing/=BUTTONSTYLES_002EXAML/@EntryIndexedValue">ButtonStyles.xaml</s:String></wpf:ResourceDictionary>
|
||||
@ -3,11 +3,13 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
mc:Ignorable="d"
|
||||
Title="PictureGalleryPage" Width="1600" Height="900"
|
||||
Background="Black">
|
||||
|
||||
<Grid>
|
||||
<WrapPanel VerticalAlignment="Stretch" x:Name="PicturesPanel" Orientation="Horizontal" />
|
||||
<WrapPanel VerticalAlignment="Stretch" Background="Black" x:Name="PicturesPanel" Orientation="Horizontal" />
|
||||
<ContentPresenter x:Name="RootContentDialogPresenter" Grid.Row="0" />
|
||||
</Grid>
|
||||
</Page>
|
||||
@ -1,6 +1,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
@ -75,8 +76,8 @@ public partial class PictureGalleryPage : Page
|
||||
Image? imageControl = new()
|
||||
{
|
||||
Source = thumbnail,
|
||||
Width = 388,
|
||||
Margin = new Thickness(6)
|
||||
Width = 392,
|
||||
Margin = new Thickness(4)
|
||||
};
|
||||
hyperlink.Inlines.Add(new InlineUIContainer(imageControl));
|
||||
|
||||
@ -95,18 +96,20 @@ public partial class PictureGalleryPage : Page
|
||||
Application.Current.Dispatcher.BeginInvoke(
|
||||
async () =>
|
||||
{
|
||||
ContentDialog? contentDialog = new(this.RootContentDialogPresenter);
|
||||
Image? imageToShow = new()
|
||||
ContentDialog contentDialog = new (this.RootContentDialogPresenter);
|
||||
Image imageToShow = new()
|
||||
{
|
||||
MaxHeight = 570,
|
||||
Background = new SolidColorBrush(Colors.White),
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Source = PictureGalleryService.CreateThumbnail(picturePathUri.AbsolutePath, 450, 300)
|
||||
};
|
||||
|
||||
contentDialog.VerticalAlignment = VerticalAlignment.Top;
|
||||
contentDialog.PrimaryButtonAppearance = ControlAppearance.Caution;
|
||||
contentDialog.CloseButtonAppearance = ControlAppearance.Dark;
|
||||
|
||||
contentDialog.VerticalAlignment = VerticalAlignment.Top;
|
||||
contentDialog.PrimaryButtonAppearance = ControlAppearance.Primary;
|
||||
contentDialog.CloseButtonAppearance = ControlAppearance.Light;
|
||||
contentDialog.Background = new SolidColorBrush(Colors.White);
|
||||
contentDialog.Foreground = new SolidColorBrush(Colors.White);
|
||||
// contentDialog.SetCurrentValue(ContentDialog.TitleProperty, "Hello World");
|
||||
contentDialog.SetCurrentValue(ContentControl.ContentProperty, imageToShow);
|
||||
contentDialog.SetCurrentValue(ContentDialog.CloseButtonTextProperty, "Schließen");
|
||||
|
||||
@ -45,16 +45,28 @@
|
||||
Margin="0 0 0 0">
|
||||
<liveView:TimerControlRectangleAnimation x:Name="TimerControlRectangleAnimation" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Name="ButtonPanel" Background="#AA000000" Panel.ZIndex="2"
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Name="ButtonPanel" Background="Transparent" Panel.ZIndex="2"
|
||||
Margin="0 0 0 0">
|
||||
<ui:Button Content="Start" Click="NavToLiveView" Width="200" Height="75" VerticalAlignment="Bottom"
|
||||
Margin="0 0 5 0" />
|
||||
<ui:Button Content="Hide Debug" Click="SetVisibilityDebugConsole" Width="200" Height="75"
|
||||
VerticalAlignment="Bottom" Margin="0 0 5 0" />
|
||||
<ui:Button Content="Take Photo" Click="StartTakePhotoProcess" Width="200" Height="75" VerticalAlignment="Bottom"
|
||||
Margin="0 0 5 0" />
|
||||
<!-- <ui:Button Content="Take Photo" Click="StartTakePhotoProcess" Width="200" Height="75" VerticalAlignment="Bottom" -->
|
||||
<!-- Margin="0 0 5 0" /> -->
|
||||
<Button Width="160" Height="160"
|
||||
Click="StartTakePhotoProcess"
|
||||
Content="PUSH ME"
|
||||
FontSize="64"
|
||||
Foreground="White"
|
||||
Margin="0 0 5 0"
|
||||
Background="Red"
|
||||
BorderBrush="Transparent"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ModernRounded3DButtonStyle}"/>
|
||||
|
||||
<ui:Button Content="Pictures" Click="SetVisibilityPicturePanel" Width="200" Height="75"
|
||||
VerticalAlignment="Bottom" Margin="0 0 5 0" />
|
||||
VerticalAlignment="Bottom" Margin="0 0 5 0" />
|
||||
<ui:Button Content="Close" Appearance="Danger" Click="CloseApp" Width="200" Height="75" VerticalAlignment="Bottom" Margin="0 0 5 0" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@ -55,7 +55,6 @@ public partial class MainWindow : Window
|
||||
try
|
||||
{
|
||||
this._cameraService.TakePhoto();
|
||||
SwitchButtonAndTimerPanel();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@ -63,6 +62,10 @@ public partial class MainWindow : Window
|
||||
System.Windows.MessageBox.Show("Sorry, da ging was schief!");
|
||||
this._logger.Info(exception.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
SwitchButtonAndTimerPanel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -117,8 +120,18 @@ public partial class MainWindow : Window
|
||||
|
||||
private void StartTakePhotoProcess(object sender, RoutedEventArgs e)
|
||||
{
|
||||
TimerControlRectangleAnimation.StartTimer(5);
|
||||
SwitchButtonAndTimerPanel();
|
||||
try
|
||||
{
|
||||
TimerControlRectangleAnimation.StartTimer(5);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
this._logger.Error(exception.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
SwitchButtonAndTimerPanel();
|
||||
}
|
||||
}
|
||||
|
||||
private void SwitchButtonAndTimerPanel()
|
||||
|
||||
115
src/CamBooth/CamBooth.App/Resources/ButtonStyles.xaml
Normal file
115
src/CamBooth/CamBooth.App/Resources/ButtonStyles.xaml
Normal file
@ -0,0 +1,115 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Runder Button Stil mit 3D-Effekt, Wellenbewegung und Schatten -->
|
||||
<Style x:Key="ModernRounded3DButtonStyle" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid>
|
||||
<!-- 3D Hintergrund -->
|
||||
<Ellipse>
|
||||
<Ellipse.Fill>
|
||||
<LinearGradientBrush StartPoint="0.3,0" EndPoint="0.7,1">
|
||||
<GradientStop Color="#FFB22222" Offset="0.0" /> <!-- Obere Kante -->
|
||||
<GradientStop Color="#FF8B0000" Offset="1.0" /> <!-- Untere Kante -->
|
||||
</LinearGradientBrush>
|
||||
</Ellipse.Fill>
|
||||
<Ellipse.Effect>
|
||||
<DropShadowEffect Color="Black"
|
||||
BlurRadius="20"
|
||||
ShadowDepth="7"
|
||||
Opacity="0.6" />
|
||||
</Ellipse.Effect>
|
||||
</Ellipse>
|
||||
|
||||
<!-- Glanzeffekt (Highlight) -->
|
||||
<Ellipse>
|
||||
<Ellipse.Fill>
|
||||
<RadialGradientBrush GradientOrigin="0.5,0.3" Center="0.5,0.3" RadiusX="1" RadiusY="1">
|
||||
<GradientStop Color="#90EEEEEE" Offset="0.0" />
|
||||
<GradientStop Color="#00EEEEEE" Offset="1.0" />
|
||||
</RadialGradientBrush>
|
||||
</Ellipse.Fill>
|
||||
<Ellipse.OpacityMask>
|
||||
<RadialGradientBrush GradientOrigin="0.5,0.5">
|
||||
<GradientStop Color="White" Offset="0.6" />
|
||||
<GradientStop Color="Transparent" Offset="0.8" />
|
||||
</RadialGradientBrush>
|
||||
</Ellipse.OpacityMask>
|
||||
<!-- Dynamische Größe -->
|
||||
<Ellipse.RenderTransform>
|
||||
<ScaleTransform ScaleX="1" ScaleY="0.6" />
|
||||
</Ellipse.RenderTransform>
|
||||
</Ellipse>
|
||||
|
||||
<!-- Content (Button-Text) -->
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
TextElement.FontSize="32"
|
||||
TextElement.FontWeight="Bold"
|
||||
/>
|
||||
|
||||
<!-- Wellenkreis -->
|
||||
<Ellipse Name="RippleEffect"
|
||||
Fill="White"
|
||||
Opacity="0"
|
||||
Width="0"
|
||||
Height="0"
|
||||
RenderTransformOrigin="0.5,0.5">
|
||||
<Ellipse.RenderTransform>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||
</Ellipse.RenderTransform>
|
||||
</Ellipse>
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<!-- Hover-Effekt -->
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Background" Value="#FF4500" />
|
||||
<Setter TargetName="RippleEffect" Property="Opacity" Value="0.2" />
|
||||
</Trigger>
|
||||
|
||||
<!-- Klick-Effekt mit Wellen -->
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<!-- Wellenbewegung -->
|
||||
<DoubleAnimation Storyboard.TargetName="RippleEffect"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
From="0.3" To="0" Duration="0:0:0.5" />
|
||||
<DoubleAnimation Storyboard.TargetName="RippleEffect"
|
||||
Storyboard.TargetProperty="Width"
|
||||
From="0" To="200" Duration="0:0:0.5" />
|
||||
<DoubleAnimation Storyboard.TargetName="RippleEffect"
|
||||
Storyboard.TargetProperty="Height"
|
||||
From="0" To="200" Duration="0:0:0.5" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Setter Property="Background" Value="#D32F2F" />
|
||||
</Trigger>
|
||||
|
||||
<!-- 3D Effekt beim Loslassen -->
|
||||
<Trigger Property="IsPressed" Value="False">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<!-- Bewegung nach oben simulieren -->
|
||||
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.(TranslateTransform.Y)"
|
||||
To="-2"
|
||||
Duration="0:0:0.2"
|
||||
AutoReverse="True" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
@ -7,6 +7,7 @@
|
||||
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CDev_005CRepos_005CPrivat_005CCamBooth_005Cmisc_005CCanonBinaries_005CMlib_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CDev_005CRepos_005CPrivat_005CCamBooth_005Cmisc_005CCanonBinaries_005CUcs32P_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AApplication_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003Ftobia_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F6665f2e3e843578225e3796b83c5342a58c3f72bfef19eeee7aa90d157d4949_003FApplication_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AContentPresenter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003Ftobia_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F606231aefeb19a0da9311c15b3798ade39bbe28dd28a8e719884133e2e2f67_003FContentPresenter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADispatcher_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003Ftobia_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F9ac32f819d6853e0a6eda168c52b7f38eef9ae75936fb85d96a15c39d115245_003FDispatcher_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEventRoute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003Ftobia_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F4bda76b5cc453e1edf5d5c754c4a8215edbd3d3e4f80706dcf4f52a4f68979_003FEventRoute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003Ftobia_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F793c644a163b4a9992123fa9cc1562efbf3908_003F4a_003Fd28af422_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user