Generelle Ausnahmenanzeige
This commit is contained in:
57
ChatController/ExceptionViewControl.xaml
Normal file
57
ChatController/ExceptionViewControl.xaml
Normal file
@@ -0,0 +1,57 @@
|
||||
<UserControl x:Class="ChatController.ExceptionViewControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="OrangeButtonStyle" TargetType="{x:Type Button}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<Setter Property="Height" Value="40" />
|
||||
<Setter Property="MinWidth" Value="100"></Setter>
|
||||
<Setter Property="BorderBrush" Value="#FF5A00" />
|
||||
<Setter Property="Background" Value="#FF5A00" />
|
||||
<Setter Property="Foreground" Value="White"></Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" Background="#FF5A00" CornerRadius="5" Padding="5,2">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FF988F" TargetName="Border" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="#FF7654" TargetName="Border" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="LightGray" TargetName="Border" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" TextWrapping="Wrap" FontWeight="Bold" Text="Es ist leider ein unbekannter Fehler aufgetreten. Prüfen Sie Ihre Internetverbindung oder versuchen Sie es später erneut. Wir sind stets bemüht, das Programm zu verbessern, daher freuen wir uns auch, wenn Sie die Fehlerdetails unten in einer Mail an support@bewoplaner.de senden." Margin="5, 5, 5, 10" FontSize="14" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Margin="5" FontSize="12" TextDecorations="Underline">Fehlerdetails:</TextBlock>
|
||||
<TextBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="5" IsReadOnly="True" Text="{Binding Path=Exception.StackTrace, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" />
|
||||
<Button Grid.Column="0" Grid.Row="3" Style="{StaticResource OrangeButtonStyle}" HorizontalAlignment="Left" Click="CopyToClipboardButton_OnClick">In die Zwischenablage kopieren</Button>
|
||||
<Button Grid.Column="2" Grid.Row="3" Style="{StaticResource OrangeButtonStyle}" HorizontalAlignment="Right" Click="OkButton_OnClick">OK</Button>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user