zaaReloaded2/zaaReloaded2/ExceptionHandler/ExceptionView.xaml
Daniel Kraus 81619edcb1 Implement exception handling and reporting.
- NEU: Fehlerbehandlung und Fehlerberichte.
2015-07-27 22:19:30 +02:00

116 lines
6.3 KiB
XML
Executable File

<!--
ExceptionView.xaml
part of zaaReloaded2
Copyright 2015 Daniel Kraus
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Window x:Class="zaaReloaded2.ExceptionHandler.ExceptionView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:l="clr-namespace:zaaReloaded2"
xmlns:ex="clr-namespace:zaaReloaded2.ExceptionHandler"
xmlns:actions="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender"
xmlns:settings="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
SizeToContent="WidthAndHeight" ResizeMode="CanResizeWithGrip"
WindowStartupLocation="CenterScreen"
Title="zaaReloaded2: Fehler!"
settings:WindowState.Save="True"
>
<i:Interaction.Triggers>
<i:EventTrigger SourceObject="{Binding ViewDetailsMessage}" EventName="Sent">
<i:EventTrigger.Actions>
<actions:ShowViewAction Assembly="zaaReloaded2" View="zaaReloaded2.ExceptionHandler.ExceptionDetailView" />
</i:EventTrigger.Actions>
</i:EventTrigger>
<i:EventTrigger SourceObject="{Binding SubmitReportMessage}" EventName="Sent">
<i:EventTrigger.Actions>
<ex:SubmissionProcessAction />
</i:EventTrigger.Actions>
</i:EventTrigger>
</i:Interaction.Triggers>
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="480" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Image Source="/zaaReloaded2;component/Resources/images/error.png" Stretch="None"
Margin="0,0,15,0" VerticalAlignment="Top" />
<StackPanel Grid.Column="1" Grid.Row="0">
<TextBlock Text="Leider wurde eine Fehlermeldung ausgelöst!"
Foreground="Red" FontWeight="Bold" FontSize="16"
Margin="0,0,0,10"/>
<TextBlock Margin="0,0,0,10" TextWrapping="Wrap" TextAlignment="Left"
FontWeight="Bold" Foreground="Red" Text="{Binding Path=Message, Mode=OneTime}" />
<!--<TextBox Margin="0,0,0,10" Text="{Binding Path=Exception, Mode=OneWay}" MaxHeight="80"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />-->
<TextBlock Text="Bitte senden Sie einen Fehlerbericht an den Programmierer!"
TextWrapping="Wrap" TextAlignment="Justify" />
<GroupBox Header="Fehlerbericht senden"
Margin="0,10,0,10" Padding="5,10,5,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0"
TextWrapping="Wrap" TextAlignment="Justify"
Text="Datenschutzhinweis: Alle Angaben werden per E-Mail an den Programmierer gesendet und vertraulich behandelt."
Margin="0,0,0,10" />
<Label Grid.Column="0" Grid.Row="1" Content="Name (opt.)" />
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Path=User,UpdateSourceTrigger=PropertyChanged}"
Margin="0,0,0,10" />
<Label Grid.Column="0" Grid.Row="2" Content="E-Mail (opt.)" />
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Path=Email,UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Grid.Column="1" Grid.Row="3" Content="Kopie an Sie selbst?"
IsChecked="{Binding Path=CcUser}" IsEnabled="{Binding IsCcUserEnabled}"
Margin="0,10,0,10" />
<Label Grid.Column="0" Grid.Row="4" Content="Kommentar (opt.)" />
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Path=Comment,UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" Height="48" AcceptsReturn="True" />
<UniformGrid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="5" Margin="0,10,0,10"
Columns="3">
<Button Command="{Binding SubmitReportCommand}" Content="Fehlerbericht senden"
BorderThickness="2" FontWeight="Bold"
IsDefault="True" Padding="10,5,10,5" Margin="0,0,10,0" />
<Button Command="{Binding ViewDetailsCommand}" Content="Technische Info..."
Padding="10,5,10,5" Margin="0,0,10,0" />
<Button Command="{Binding ClearFormCommand}" Content="Eingaben löschen"
Padding="10,5,10,5" />
</UniformGrid>
</Grid>
</GroupBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Command="{Binding CloseViewCommand}" Content="Schließen" IsCancel="True"
Padding="10,5,10,5" />
</StackPanel>
</StackPanel>
</Grid>
</Window>