solid state
This commit is contained in:
parent
b1054d08b2
commit
8d27883312
@ -2,9 +2,9 @@
|
|||||||
"AppSettings": {
|
"AppSettings": {
|
||||||
"AppName": "Meine Anwendung",
|
"AppName": "Meine Anwendung",
|
||||||
"Version": "1.0.0",
|
"Version": "1.0.0",
|
||||||
"IsDebugMode": true,
|
"IsDebugMode": false,
|
||||||
"PictureLocation": "C:\\tmp\\cambooth",
|
"PictureLocation": "C:\\tmp\\cambooth",
|
||||||
"DebugConsoleVisible": "true",
|
"DebugConsoleVisible": "false",
|
||||||
"PhotoCountdownSeconds": 2,
|
"PhotoCountdownSeconds": 2,
|
||||||
"FocusDelaySeconds": 1,
|
"FocusDelaySeconds": 1,
|
||||||
"FocusTimeoutMs": 1000,
|
"FocusTimeoutMs": 1000,
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
xmlns:liveView="clr-namespace:CamBooth.App.Features.LiveView"
|
xmlns:liveView="clr-namespace:CamBooth.App.Features.LiveView"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="LiveViewPage" Width="1350" Height="900"
|
Title="LiveViewPage" Width="1350" Height="900"
|
||||||
Background="PaleVioletRed">
|
Background="Transparent">
|
||||||
<Grid HorizontalAlignment="Stretch">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Canvas x:Name="LVCanvas" Background="Bisque" />
|
<Canvas x:Name="LVCanvas" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
@ -33,11 +33,20 @@ public partial class LiveViewPage : Page
|
|||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
this.SetImageAction = img => { this.bgbrush.ImageSource = img; };
|
this.SetImageAction = img => { this.bgbrush.ImageSource = img; };
|
||||||
|
|
||||||
// Mirror the LiveView image horizontally
|
// Configure the image brush
|
||||||
ScaleTransform scaleTransform = new ScaleTransform(-1, 1, 0.5, 0.5);
|
this.bgbrush.Stretch = Stretch.UniformToFill;
|
||||||
this.bgbrush.Transform = scaleTransform;
|
this.bgbrush.AlignmentX = AlignmentX.Center;
|
||||||
|
this.bgbrush.AlignmentY = AlignmentY.Center;
|
||||||
|
|
||||||
this.LVCanvas.Background = this.bgbrush;
|
this.LVCanvas.Background = this.bgbrush;
|
||||||
|
|
||||||
|
// Apply horizontal flip on the Canvas using RenderTransform
|
||||||
|
TransformGroup transformGroup = new();
|
||||||
|
transformGroup.Children.Add(new ScaleTransform { ScaleX = -1, ScaleY = 1 });
|
||||||
|
transformGroup.Children.Add(new TranslateTransform { X = 1, Y = 0 });
|
||||||
|
this.LVCanvas.RenderTransform = transformGroup;
|
||||||
|
this.LVCanvas.RenderTransformOrigin = new Point(0.5, 0.5);
|
||||||
|
|
||||||
cameraService.ConnectCamera();
|
cameraService.ConnectCamera();
|
||||||
cameraService._mainCamera.LiveViewUpdated += this.MainCamera_OnLiveViewUpdated;
|
cameraService._mainCamera.LiveViewUpdated += this.MainCamera_OnLiveViewUpdated;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,12 @@
|
|||||||
Fill="#4CAF50"
|
Fill="#4CAF50"
|
||||||
Height="75"
|
Height="75"
|
||||||
HorizontalAlignment="Left"/>
|
HorizontalAlignment="Left"/>
|
||||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="72">HIER EINE ANWEISUNG ANZEIGEN</TextBlock>
|
<TextBlock x:Name="InstructionText"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
FontSize="72"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Foreground="White">Lächeln!</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- ~1~ Countdown-Anzeige @1@ -->
|
<!-- ~1~ Countdown-Anzeige @1@ -->
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
@ -22,6 +22,32 @@ public partial class TimerControlRectangleAnimation : UserControl
|
|||||||
|
|
||||||
private Storyboard _progressBarAnimation;
|
private Storyboard _progressBarAnimation;
|
||||||
|
|
||||||
|
private Random _random = new Random();
|
||||||
|
|
||||||
|
private List<string> _photoInstructions = new List<string>
|
||||||
|
{
|
||||||
|
"Lächeln! 😊",
|
||||||
|
"Hasenohren machen! 🐰",
|
||||||
|
"Zunge rausstrecken! 👅",
|
||||||
|
"Grimasse ziehen! 😝",
|
||||||
|
"Daumen hoch! 👍",
|
||||||
|
"Peace-Zeichen! ✌️",
|
||||||
|
"Lustig gucken! 🤪",
|
||||||
|
"Crazy Face! 🤯",
|
||||||
|
"Küsschen! 😘",
|
||||||
|
"Winken! 👋",
|
||||||
|
"Herz mit den Händen! ❤️",
|
||||||
|
"Verrückt sein! 🤪",
|
||||||
|
"Überrascht schauen! 😲",
|
||||||
|
"Cool bleiben! 😎",
|
||||||
|
"Lachen! 😄",
|
||||||
|
"Zähne zeigen! 😁",
|
||||||
|
"Schnute ziehen! 😗",
|
||||||
|
"Augen zukneifen! 😆",
|
||||||
|
"Arm hochstrecken! 🙌",
|
||||||
|
"Gruppe umarmen! 🤗"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
public TimerControlRectangleAnimation()
|
public TimerControlRectangleAnimation()
|
||||||
{
|
{
|
||||||
@ -66,6 +92,10 @@ public partial class TimerControlRectangleAnimation : UserControl
|
|||||||
|
|
||||||
// TimerText.Text = TimeSpan.FromSeconds(_remainingTime).ToString(@"mm\:ss");
|
// TimerText.Text = TimeSpan.FromSeconds(_remainingTime).ToString(@"mm\:ss");
|
||||||
// StatusText.Text = "Timer läuft...";
|
// StatusText.Text = "Timer läuft...";
|
||||||
|
|
||||||
|
// Show initial random instruction
|
||||||
|
ShowRandomInstruction();
|
||||||
|
|
||||||
_timer.Start();
|
_timer.Start();
|
||||||
|
|
||||||
StartProgressBarAnimation();
|
StartProgressBarAnimation();
|
||||||
@ -120,4 +150,13 @@ public partial class TimerControlRectangleAnimation : UserControl
|
|||||||
{
|
{
|
||||||
_progressBarAnimation?.Stop();
|
_progressBarAnimation?.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ShowRandomInstruction()
|
||||||
|
{
|
||||||
|
if (_photoInstructions.Count > 0)
|
||||||
|
{
|
||||||
|
int randomIndex = _random.Next(_photoInstructions.Count);
|
||||||
|
InstructionText.Text = _photoInstructions[randomIndex];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -9,7 +9,12 @@
|
|||||||
Background="Black">
|
Background="Black">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollViewer x:Name="GalleryScrollViewer" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Background="Black" CanContentScroll="False">
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ScrollViewer Grid.Row="0" x:Name="GalleryScrollViewer" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Background="Black" CanContentScroll="False">
|
||||||
<ItemsControl x:Name="PicturesPanel" Background="Black">
|
<ItemsControl x:Name="PicturesPanel" Background="Black">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
@ -18,6 +23,50 @@
|
|||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<!-- Pager Controls -->
|
||||||
|
<Border Grid.Row="1" Background="#2C2C2C" Padding="20,15" BorderBrush="#444444" BorderThickness="0,1,0,0">
|
||||||
|
<Grid HorizontalAlignment="Center">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- First Page Button -->
|
||||||
|
<Button Grid.Column="0" x:Name="FirstPageButton" Content="⏮️"
|
||||||
|
Width="60" Height="50" Margin="5,0"
|
||||||
|
FontSize="20" Background="#3C3C3C" Foreground="White"
|
||||||
|
Click="FirstPageButton_Click" />
|
||||||
|
|
||||||
|
<!-- Previous Page Button -->
|
||||||
|
<Button Grid.Column="1" x:Name="PreviousPageButton" Content="◀️"
|
||||||
|
Width="60" Height="50" Margin="5,0"
|
||||||
|
FontSize="20" Background="#3C3C3C" Foreground="White"
|
||||||
|
Click="PreviousPageButton_Click" />
|
||||||
|
|
||||||
|
<!-- Page Info -->
|
||||||
|
<TextBlock Grid.Column="2" x:Name="PageInfoText"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
|
Margin="20,0" FontSize="18" Foreground="White"
|
||||||
|
Text="Seite 1 von 1" MinWidth="150" TextAlignment="Center" />
|
||||||
|
|
||||||
|
<!-- Next Page Button -->
|
||||||
|
<Button Grid.Column="3" x:Name="NextPageButton" Content="▶️"
|
||||||
|
Width="60" Height="50" Margin="5,0"
|
||||||
|
FontSize="20" Background="#3C3C3C" Foreground="White"
|
||||||
|
Click="NextPageButton_Click" />
|
||||||
|
|
||||||
|
<!-- Last Page Button -->
|
||||||
|
<Button Grid.Column="4" x:Name="LastPageButton" Content="⏭️"
|
||||||
|
Width="60" Height="50" Margin="5,0"
|
||||||
|
FontSize="20" Background="#3C3C3C" Foreground="White"
|
||||||
|
Click="LastPageButton_Click" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<ContentPresenter x:Name="RootContentDialogPresenter" Grid.Row="0" />
|
<ContentPresenter x:Name="RootContentDialogPresenter" Grid.Row="0" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Documents;
|
using System.Windows.Documents;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
@ -26,6 +26,10 @@ public partial class PictureGalleryPage : Page
|
|||||||
|
|
||||||
private ContentDialog? _openContentDialog;
|
private ContentDialog? _openContentDialog;
|
||||||
|
|
||||||
|
private int _currentPage = 1;
|
||||||
|
private int _itemsPerPage = 12;
|
||||||
|
private int _totalPages = 1;
|
||||||
|
|
||||||
|
|
||||||
public PictureGalleryPage(AppSettingsService appSettingsService, Logger logger, PictureGalleryService pictureGalleryService)
|
public PictureGalleryPage(AppSettingsService appSettingsService, Logger logger, PictureGalleryService pictureGalleryService)
|
||||||
{
|
{
|
||||||
@ -41,7 +45,10 @@ public partial class PictureGalleryPage : Page
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.LoadPictures(12);
|
_currentPage = 1;
|
||||||
|
CalculateTotalPages();
|
||||||
|
LoadCurrentPage();
|
||||||
|
UpdatePagerControls();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -59,16 +66,20 @@ public partial class PictureGalleryPage : Page
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void LoadPictures(int howManyPictures = 0)
|
private void LoadPictures(int startIndex, int count)
|
||||||
{
|
{
|
||||||
int loop = 0;
|
|
||||||
|
|
||||||
this.Dispatcher.Invoke(
|
this.Dispatcher.Invoke(
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
do
|
// Clear existing items
|
||||||
|
this.PicturesPanel.Items.Clear();
|
||||||
|
|
||||||
|
int totalThumbnails = this._pictureGalleryService.ThumbnailsOrderedByNewestDescending.Count;
|
||||||
|
int endIndex = Math.Min(startIndex + count, totalThumbnails);
|
||||||
|
|
||||||
|
for (int i = startIndex; i < endIndex; i++)
|
||||||
{
|
{
|
||||||
BitmapImage thumbnail = this._pictureGalleryService.ThumbnailsOrderedByNewestDescending[loop];
|
BitmapImage thumbnail = this._pictureGalleryService.ThumbnailsOrderedByNewestDescending[i];
|
||||||
|
|
||||||
TextBlock? textBlock = new();
|
TextBlock? textBlock = new();
|
||||||
Hyperlink? hyperlink = new();
|
Hyperlink? hyperlink = new();
|
||||||
@ -85,9 +96,7 @@ public partial class PictureGalleryPage : Page
|
|||||||
|
|
||||||
textBlock.Inlines.Add(hyperlink);
|
textBlock.Inlines.Add(hyperlink);
|
||||||
this.PicturesPanel.Items.Add(textBlock);
|
this.PicturesPanel.Items.Add(textBlock);
|
||||||
loop++;
|
|
||||||
}
|
}
|
||||||
while ((loop < howManyPictures || howManyPictures == 0) && loop < this._pictureGalleryService.ThumbnailsOrderedByNewestDescending.Count);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,6 +125,20 @@ public partial class PictureGalleryPage : Page
|
|||||||
this.Dispatcher.Invoke(CloseDialog);
|
this.Dispatcher.Invoke(CloseDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RefreshGallery()
|
||||||
|
{
|
||||||
|
CalculateTotalPages();
|
||||||
|
|
||||||
|
// If current page is now beyond total pages, go to last page
|
||||||
|
if (_currentPage > _totalPages)
|
||||||
|
{
|
||||||
|
_currentPage = Math.Max(1, _totalPages);
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadCurrentPage();
|
||||||
|
UpdatePagerControls();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task ShowPhotoDialogAsync(string picturePath)
|
public async Task ShowPhotoDialogAsync(string picturePath)
|
||||||
{
|
{
|
||||||
@ -142,6 +165,19 @@ public partial class PictureGalleryPage : Page
|
|||||||
contentDialog.SetCurrentValue(ContentDialog.CloseButtonTextProperty, "Schließen");
|
contentDialog.SetCurrentValue(ContentDialog.CloseButtonTextProperty, "Schließen");
|
||||||
contentDialog.SetCurrentValue(ContentDialog.PrimaryButtonTextProperty, "Drucken");
|
contentDialog.SetCurrentValue(ContentDialog.PrimaryButtonTextProperty, "Drucken");
|
||||||
|
|
||||||
|
// Apply gold color to Primary button (Drucken)
|
||||||
|
contentDialog.Loaded += (s, args) =>
|
||||||
|
{
|
||||||
|
// Find the Primary button and apply gold styling
|
||||||
|
if (contentDialog.Template?.FindName("PrimaryButton", contentDialog) is System.Windows.Controls.Button primaryButton)
|
||||||
|
{
|
||||||
|
primaryButton.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#D4AF37"));
|
||||||
|
primaryButton.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#1F1A00"));
|
||||||
|
primaryButton.BorderBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F6E7A1"));
|
||||||
|
primaryButton.BorderThickness = new Thickness(2);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
contentDialog.Tag = picturePath;
|
contentDialog.Tag = picturePath;
|
||||||
contentDialog.ButtonClicked += this.ContentDialog_OnButtonClicked;
|
contentDialog.ButtonClicked += this.ContentDialog_OnButtonClicked;
|
||||||
|
|
||||||
@ -171,6 +207,75 @@ public partial class PictureGalleryPage : Page
|
|||||||
string picturePath = Uri.UnescapeDataString(picturePathUri.AbsolutePath);
|
string picturePath = Uri.UnescapeDataString(picturePathUri.AbsolutePath);
|
||||||
_ = this.ShowPhotoDialogAsync(picturePath);
|
_ = this.ShowPhotoDialogAsync(picturePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CalculateTotalPages()
|
||||||
|
{
|
||||||
|
int totalItems = this._pictureGalleryService.ThumbnailsOrderedByNewestDescending.Count;
|
||||||
|
_totalPages = totalItems > 0 ? (int)Math.Ceiling((double)totalItems / _itemsPerPage) : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCurrentPage()
|
||||||
|
{
|
||||||
|
int startIndex = (_currentPage - 1) * _itemsPerPage;
|
||||||
|
LoadPictures(startIndex, _itemsPerPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdatePagerControls()
|
||||||
|
{
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
PageInfoText.Text = $"Seite {_currentPage} von {_totalPages}";
|
||||||
|
|
||||||
|
FirstPageButton.IsEnabled = _currentPage > 1;
|
||||||
|
PreviousPageButton.IsEnabled = _currentPage > 1;
|
||||||
|
NextPageButton.IsEnabled = _currentPage < _totalPages;
|
||||||
|
LastPageButton.IsEnabled = _currentPage < _totalPages;
|
||||||
|
|
||||||
|
// Visual feedback for disabled buttons
|
||||||
|
FirstPageButton.Opacity = FirstPageButton.IsEnabled ? 1.0 : 0.5;
|
||||||
|
PreviousPageButton.Opacity = PreviousPageButton.IsEnabled ? 1.0 : 0.5;
|
||||||
|
NextPageButton.Opacity = NextPageButton.IsEnabled ? 1.0 : 0.5;
|
||||||
|
LastPageButton.Opacity = LastPageButton.IsEnabled ? 1.0 : 0.5;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FirstPageButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
_currentPage = 1;
|
||||||
|
LoadCurrentPage();
|
||||||
|
UpdatePagerControls();
|
||||||
|
GalleryScrollViewer.ScrollToTop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PreviousPageButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_currentPage > 1)
|
||||||
|
{
|
||||||
|
_currentPage--;
|
||||||
|
LoadCurrentPage();
|
||||||
|
UpdatePagerControls();
|
||||||
|
GalleryScrollViewer.ScrollToTop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void NextPageButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_currentPage < _totalPages)
|
||||||
|
{
|
||||||
|
_currentPage++;
|
||||||
|
LoadCurrentPage();
|
||||||
|
UpdatePagerControls();
|
||||||
|
GalleryScrollViewer.ScrollToTop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LastPageButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
_currentPage = _totalPages;
|
||||||
|
LoadCurrentPage();
|
||||||
|
UpdatePagerControls();
|
||||||
|
GalleryScrollViewer.ScrollToTop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,10 +26,10 @@
|
|||||||
<Frame Grid.Row="0"
|
<Frame Grid.Row="0"
|
||||||
x:Name="MainFrame"
|
x:Name="MainFrame"
|
||||||
NavigationUIVisibility="Hidden"
|
NavigationUIVisibility="Hidden"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Stretch"
|
||||||
Background="Black"
|
VerticalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
Background="Transparent"
|
||||||
Panel.ZIndex="0" />
|
Panel.ZIndex="1" />
|
||||||
|
|
||||||
<!-- Picture Gallery -->
|
<!-- Picture Gallery -->
|
||||||
<Frame Grid.Row="0"
|
<Frame Grid.Row="0"
|
||||||
@ -37,7 +37,7 @@
|
|||||||
NavigationUIVisibility="Hidden"
|
NavigationUIVisibility="Hidden"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Background="Blue"
|
Background="Transparent"
|
||||||
Panel.ZIndex="1" />
|
Panel.ZIndex="1" />
|
||||||
|
|
||||||
<!-- Inhalt der dritten Zeile -->
|
<!-- Inhalt der dritten Zeile -->
|
||||||
@ -53,11 +53,24 @@
|
|||||||
Margin="24 24 24 12"/>
|
Margin="24 24 24 12"/>
|
||||||
<liveView:TimerControlRectangleAnimation x:Name="TimerControlRectangleAnimation" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<liveView:TimerControlRectangleAnimation x:Name="TimerControlRectangleAnimation" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<!-- Hide Debug Button (top-right) -->
|
||||||
|
<ui:Button Grid.Row="0"
|
||||||
|
x:Name="HideDebugButton"
|
||||||
|
Content="Hide Debug"
|
||||||
|
Click="SetVisibilityDebugConsole"
|
||||||
|
Width="160"
|
||||||
|
Height="60"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Margin="20"
|
||||||
|
Panel.ZIndex="5"
|
||||||
|
Visibility="Hidden"
|
||||||
|
FontSize="16"
|
||||||
|
Appearance="Secondary" />
|
||||||
|
|
||||||
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Name="ButtonPanel" Background="Transparent" Panel.ZIndex="2"
|
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Name="ButtonPanel" Background="Transparent" Panel.ZIndex="2"
|
||||||
Visibility="Hidden"
|
Visibility="Hidden"
|
||||||
Margin="0 0 0 0">
|
Margin="0 0 0 0">
|
||||||
<ui:Button x:Name="HideDebugButton" 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" -->
|
<!-- <ui:Button Content="Take Photo" Click="StartTakePhotoProcess" Width="200" Height="75" VerticalAlignment="Bottom" -->
|
||||||
<!-- Margin="0 0 5 0" /> -->
|
<!-- Margin="0 0 5 0" /> -->
|
||||||
<Button Width="160" Height="160"
|
<Button Width="160" Height="160"
|
||||||
@ -137,7 +150,12 @@
|
|||||||
<ui:Button Content="Jetzt in Galerie ansehen"
|
<ui:Button Content="Jetzt in Galerie ansehen"
|
||||||
Click="OpenGalleryFromPrompt"
|
Click="OpenGalleryFromPrompt"
|
||||||
Width="240"
|
Width="240"
|
||||||
Height="52" />
|
Height="52"
|
||||||
|
Background="#D4AF37"
|
||||||
|
Foreground="#1F1A00"
|
||||||
|
BorderBrush="#F6E7A1"
|
||||||
|
BorderThickness="2"
|
||||||
|
FontWeight="SemiBold" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
@ -240,6 +258,9 @@
|
|||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Background="LightGreen"
|
Background="LightGreen"
|
||||||
Panel.ZIndex="2" />
|
Panel.ZIndex="2" />
|
||||||
|
|
||||||
|
<!-- Dialog Host for ContentDialogs -->
|
||||||
|
<ContentPresenter x:Name="DialogPresenter" Grid.Row="0" Panel.ZIndex="100" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
|
||||||
@ -12,6 +14,8 @@ using CamBooth.App.Features.DebugConsole;
|
|||||||
using CamBooth.App.Features.LiveView;
|
using CamBooth.App.Features.LiveView;
|
||||||
using CamBooth.App.Features.PictureGallery;
|
using CamBooth.App.Features.PictureGallery;
|
||||||
|
|
||||||
|
using Wpf.Ui.Controls;
|
||||||
|
|
||||||
namespace CamBooth.App;
|
namespace CamBooth.App;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -263,8 +267,28 @@ public partial class MainWindow : Window
|
|||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShutdownWindows(object sender, RoutedEventArgs e)
|
private async void ShutdownWindows(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
// Show confirmation dialog
|
||||||
|
var confirmDialog = new ContentDialog(this.DialogPresenter);
|
||||||
|
confirmDialog.Title = "Sicherheitsabfrage";
|
||||||
|
confirmDialog.Content = "Möchtest du die Fotobox wirklich ausschalten?";
|
||||||
|
confirmDialog.PrimaryButtonText = "Ja, ausschalten";
|
||||||
|
confirmDialog.CloseButtonText = "Abbrechen";
|
||||||
|
confirmDialog.DefaultButton = ContentDialogButton.Close;
|
||||||
|
confirmDialog.PrimaryButtonAppearance = ControlAppearance.Danger;
|
||||||
|
confirmDialog.CloseButtonAppearance = ControlAppearance.Secondary;
|
||||||
|
confirmDialog.Background = new SolidColorBrush(Colors.White);
|
||||||
|
confirmDialog.Foreground = new SolidColorBrush(Colors.Black);
|
||||||
|
|
||||||
|
var result = await confirmDialog.ShowAsync();
|
||||||
|
|
||||||
|
// Only proceed with shutdown if user confirmed
|
||||||
|
if (result != ContentDialogResult.Primary)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._appSettings.IsShutdownEnabled)
|
if (this._appSettings.IsShutdownEnabled)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@ -5,4 +5,6 @@
|
|||||||
- Kiosk Modus einrichten
|
- Kiosk Modus einrichten
|
||||||
- Energiesparmodus abschalten
|
- Energiesparmodus abschalten
|
||||||
- Starbildschirm mit freundlicher Begrüßung, kurzer Erklärung, und viel Spaß wünschen mit der FotoCam
|
- Starbildschirm mit freundlicher Begrüßung, kurzer Erklärung, und viel Spaß wünschen mit der FotoCam
|
||||||
- Verschiedene Hinweise anzeigen beim Fotofrafieren (lächeln, Hasensohren, Zunge raus, Grimasse, usw.)
|
- Verschiedene Hinweise anzeigen beim Fotografieren (lächeln, Hasensohren, Zunge raus, Grimasse, usw.)
|
||||||
|
- Bild über QR Code runterladen
|
||||||
|
- Windows updates deaktivieren
|
||||||
@ -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_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: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_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_003AContentDialog_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003FTobias_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FSourcesCache_003F50577c506a4fb056866bbe92395cb594743ca23835afa29fd9c9ef6a9686988_003FContentDialog_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_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_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_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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user