Implement Bovender's exception handling.
This commit is contained in:
		
							
								
								
									
										124
									
								
								zaaReloaded2/ExceptionHandler/ExceptionDetailView.xaml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										124
									
								
								zaaReloaded2/ExceptionHandler/ExceptionDetailView.xaml
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,124 @@
 | 
			
		||||
<!--
 | 
			
		||||
	ExceptionDetailView.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.ExceptionDetailView"
 | 
			
		||||
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
			
		||||
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
			
		||||
        xmlns:l="clr-namespace:zaaReloaded2"
 | 
			
		||||
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
 | 
			
		||||
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
 | 
			
		||||
        xmlns:settings="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
 | 
			
		||||
        xmlns:converter="clr-namespace:Bovender.Mvvm.Converters;assembly=Bovender"
 | 
			
		||||
        SizeToContent="Height" Width="700"
 | 
			
		||||
        x:Name="exceptionDetailView"
 | 
			
		||||
        Title="Technische Fehlerdetails"
 | 
			
		||||
        settings:WindowState.Save="True"
 | 
			
		||||
        >
 | 
			
		||||
    <Window.Resources>
 | 
			
		||||
        <ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />
 | 
			
		||||
    </Window.Resources>
 | 
			
		||||
    <DockPanel Margin="10">
 | 
			
		||||
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
 | 
			
		||||
            <Button Content="Schließen" IsCancel="True">
 | 
			
		||||
                <!-- Use interaction trigger rather than MVVM CloseViewCommand since the latter
 | 
			
		||||
                would cause all subscribed views to be closed, including the ExceptionView instance. -->
 | 
			
		||||
                <i:Interaction.Triggers>
 | 
			
		||||
                    <i:EventTrigger EventName="Click">
 | 
			
		||||
                        <ei:CallMethodAction TargetObject="{Binding ElementName=exceptionDetailView}" MethodName="Close" />
 | 
			
		||||
                    </i:EventTrigger>
 | 
			
		||||
                </i:Interaction.Triggers>
 | 
			
		||||
            </Button>
 | 
			
		||||
        </StackPanel>
 | 
			
		||||
        <Grid DockPanel.Dock="Bottom" Margin="0,10,0,0">
 | 
			
		||||
            <Grid.ColumnDefinitions>
 | 
			
		||||
                <ColumnDefinition Width="Auto" />
 | 
			
		||||
                <ColumnDefinition Width="Auto"/>
 | 
			
		||||
            </Grid.ColumnDefinitions>
 | 
			
		||||
            <Grid.RowDefinitions>
 | 
			
		||||
                <RowDefinition />
 | 
			
		||||
            </Grid.RowDefinitions>
 | 
			
		||||
            <Grid Margin="0,0,5,0" Grid.Column="0" Grid.Row="0">
 | 
			
		||||
                <Grid.ColumnDefinitions>
 | 
			
		||||
                    <ColumnDefinition Width="Auto" />
 | 
			
		||||
                    <ColumnDefinition Width="Auto" />
 | 
			
		||||
                </Grid.ColumnDefinitions>
 | 
			
		||||
                <Grid.RowDefinitions>
 | 
			
		||||
                    <RowDefinition />
 | 
			
		||||
                    <RowDefinition />
 | 
			
		||||
                    <RowDefinition />
 | 
			
		||||
                </Grid.RowDefinitions>
 | 
			
		||||
                <Label Grid.Column="0" Grid.Row="0" Content="Addin-Version" />
 | 
			
		||||
                <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=AddinVersion, Mode=OneWay}" />
 | 
			
		||||
                <Label Grid.Column="0" Grid.Row="1" Content="Word-Version" />
 | 
			
		||||
                <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Path=WordVersion, Mode=OneWay}" />
 | 
			
		||||
                <Label Grid.Column="0" Grid.Row="2" Content="Word-Bitness" />
 | 
			
		||||
                <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Path=WordBitness, Mode=OneWay}" />
 | 
			
		||||
            </Grid>
 | 
			
		||||
            <Grid Margin="5,0,0,0" Grid.Column="1" Grid.Row="0">
 | 
			
		||||
                <Grid.ColumnDefinitions>
 | 
			
		||||
                    <ColumnDefinition Width="Auto" />
 | 
			
		||||
                    <ColumnDefinition Width="Auto" />
 | 
			
		||||
                </Grid.ColumnDefinitions>
 | 
			
		||||
                <Grid.RowDefinitions>
 | 
			
		||||
                    <RowDefinition />
 | 
			
		||||
                    <RowDefinition />
 | 
			
		||||
                    <RowDefinition />
 | 
			
		||||
                    <RowDefinition />
 | 
			
		||||
                </Grid.RowDefinitions>
 | 
			
		||||
                <Label Grid.Column="0" Grid.Row="0"  Content="Windows-Version" />
 | 
			
		||||
                <TextBox Grid.Column="1" Grid.Row="0"  Text="{Binding Path=OS, Mode=OneWay}" />
 | 
			
		||||
                <Label Grid.Column="0" Grid.Row="1"  Content="Windows-Bitness" />
 | 
			
		||||
                <TextBox Grid.Column="1" Grid.Row="1"  Text="{Binding Path=OSBitness, Mode=OneWay}" />
 | 
			
		||||
                <Label Grid.Column="0" Grid.Row="2"  Content="CLR-Version" />
 | 
			
		||||
                <TextBox Grid.Column="1" Grid.Row="2"  Text="{Binding Path=CLR, Mode=OneWay}" />
 | 
			
		||||
            </Grid>
 | 
			
		||||
        </Grid>
 | 
			
		||||
        <Grid>
 | 
			
		||||
            <Grid.ColumnDefinitions>
 | 
			
		||||
                <ColumnDefinition Width="Auto" />
 | 
			
		||||
                <ColumnDefinition />
 | 
			
		||||
            </Grid.ColumnDefinitions>
 | 
			
		||||
            <Grid.RowDefinitions>
 | 
			
		||||
                <RowDefinition MinHeight="72" />
 | 
			
		||||
                <RowDefinition MinHeight="32" />
 | 
			
		||||
                <RowDefinition />
 | 
			
		||||
                <RowDefinition />
 | 
			
		||||
            </Grid.RowDefinitions>
 | 
			
		||||
            <Label Grid.Column="0" Grid.Row="0" Content="Fehler" />
 | 
			
		||||
            <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=Exception, Mode=OneWay}"
 | 
			
		||||
                     TextWrapping="NoWrap" 
 | 
			
		||||
                     VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" />
 | 
			
		||||
            <Label Grid.Column="0" Grid.Row="1" Content="Beschreibung" />
 | 
			
		||||
            <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Path=Message, Mode=OneWay}" TextWrapping="Wrap" />
 | 
			
		||||
            <Label Grid.Column="0" Grid.Row="2" Content="Urspr. Fehler"
 | 
			
		||||
                   Visibility="{Binding HasInnerException,Converter={StaticResource visBoolConv}}" />
 | 
			
		||||
            <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Path=InnerException, Mode=OneWay}"
 | 
			
		||||
                     TextWrapping="NoWrap" 
 | 
			
		||||
                     VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" 
 | 
			
		||||
                     Visibility="{Binding HasInnerException,Converter={StaticResource visBoolConv}}" />
 | 
			
		||||
            <Label Grid.Column="0" Grid.Row="3" Content="Urps. Fehlerbeschreibung" 
 | 
			
		||||
                   Visibility="{Binding HasInnerException,Converter={StaticResource visBoolConv}}" />
 | 
			
		||||
            <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Path=InnerMessage, Mode=OneWay}" TextWrapping="Wrap"
 | 
			
		||||
                     Visibility="{Binding HasInnerException,Converter={StaticResource visBoolConv}}" />
 | 
			
		||||
            <!--<Label Grid.Column="0" Grid.Row="4" Content="{x:Static l:Strings.StackTrace}" />
 | 
			
		||||
            <TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Path=StackTrace, Mode=OneWay}"
 | 
			
		||||
                     VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"  Height="60" />-->
 | 
			
		||||
        </Grid>
 | 
			
		||||
    </DockPanel>
 | 
			
		||||
</Window>
 | 
			
		||||
							
								
								
									
										33
									
								
								zaaReloaded2/ExceptionHandler/ExceptionDetailView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								zaaReloaded2/ExceptionHandler/ExceptionDetailView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
/* ExceptionDetailView.xaml.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System.Windows;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Interaction logic for ExceptionDetailView.xaml
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public partial class ExceptionDetailView : Window
 | 
			
		||||
    {
 | 
			
		||||
        public ExceptionDetailView()
 | 
			
		||||
        {
 | 
			
		||||
            InitializeComponent();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										115
									
								
								zaaReloaded2/ExceptionHandler/ExceptionView.xaml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										115
									
								
								zaaReloaded2/ExceptionHandler/ExceptionView.xaml
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,115 @@
 | 
			
		||||
<!--
 | 
			
		||||
	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="XLToolbox.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>
 | 
			
		||||
							
								
								
									
										33
									
								
								zaaReloaded2/ExceptionHandler/ExceptionView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								zaaReloaded2/ExceptionHandler/ExceptionView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
/* ExceptionView.xaml.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System.Windows;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Interaction logic for ExceptionView.xaml
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public partial class ExceptionView : Window
 | 
			
		||||
    {
 | 
			
		||||
        public ExceptionView()
 | 
			
		||||
        {
 | 
			
		||||
            InitializeComponent();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										92
									
								
								zaaReloaded2/ExceptionHandler/ExceptionViewModel.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										92
									
								
								zaaReloaded2/ExceptionHandler/ExceptionViewModel.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,92 @@
 | 
			
		||||
/* ExceptionViewModel.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Specialized;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using Bovender.Unmanaged;
 | 
			
		||||
using zaaReloaded2.Updater;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    public class ExceptionViewModel : Bovender.ExceptionHandler.ExceptionViewModel
 | 
			
		||||
    {
 | 
			
		||||
        #region Additional properties for the exception report
 | 
			
		||||
 | 
			
		||||
        public string WordVersion
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                // TODO: Get Word version
 | 
			
		||||
                return "n/a";
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public string WordBitness
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                return Environment.Is64BitProcess ? "64-bit" : "32-bit";
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public string AddinVersion
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                return zaaReloaded2.Updater.Version.CurrentVersion().ToString();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
        #region constructor
 | 
			
		||||
 | 
			
		||||
        public ExceptionViewModel(Exception e) : base(e) { }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
        #region Overrides
 | 
			
		||||
 | 
			
		||||
        public override object RevealModelObject()
 | 
			
		||||
        {
 | 
			
		||||
            return Exception;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override NameValueCollection GetPostValues()
 | 
			
		||||
        {
 | 
			
		||||
            NameValueCollection v = base.GetPostValues();
 | 
			
		||||
            v["excel_version"] = WordVersion;
 | 
			
		||||
            v["excel_bitness"] = ProcessBitness;
 | 
			
		||||
            v["toolbox_version"] = AddinVersion;
 | 
			
		||||
            return v;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override Uri GetPostUri()
 | 
			
		||||
        {
 | 
			
		||||
            return new Uri(Properties.Settings.Default.ExceptionPostUrl);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override string DevPath()
 | 
			
		||||
        {
 | 
			
		||||
            return @"x:\Code\zaaReloaded2\";
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										50
									
								
								zaaReloaded2/ExceptionHandler/SubmissionCompletedAction.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										50
									
								
								zaaReloaded2/ExceptionHandler/SubmissionCompletedAction.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,50 @@
 | 
			
		||||
/* SubmissionCompletedAction.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Windows;
 | 
			
		||||
using Bovender.Mvvm.Messaging;
 | 
			
		||||
using Bovender.Mvvm.Actions;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// WPF action that is invoked when the exception report submission
 | 
			
		||||
    /// process is completed.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    class SubmissionCompletedAction : ProcessCompletedAction
 | 
			
		||||
    {
 | 
			
		||||
        protected override Window CreateSuccessWindow()
 | 
			
		||||
        {
 | 
			
		||||
            return Content.InjectInto<SubmissionSuccessView>();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override Window CreateFailureWindow()
 | 
			
		||||
        {
 | 
			
		||||
            return Content.InjectInto<SubmissionFailureView>();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override Window CreateCancelledWindow()
 | 
			
		||||
        {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										46
									
								
								zaaReloaded2/ExceptionHandler/SubmissionFailureView.xaml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										46
									
								
								zaaReloaded2/ExceptionHandler/SubmissionFailureView.xaml
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
<!--
 | 
			
		||||
	SubmissionFailureView.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.SubmissionFailureView"
 | 
			
		||||
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
			
		||||
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
			
		||||
        xmlns:l="clr-namespace:zaaReloaded2"
 | 
			
		||||
        SizeToContent="WidthAndHeight"
 | 
			
		||||
        Title="Fehlerbericht versenden"
 | 
			
		||||
        >
 | 
			
		||||
    <Window.Resources>
 | 
			
		||||
        <ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />
 | 
			
		||||
    </Window.Resources>
 | 
			
		||||
    <StackPanel Margin="10" Orientation="Horizontal">
 | 
			
		||||
        <TextBlock FontSize="72" FontWeight="Bold" Foreground="Red" Margin="0,0,10,0"
 | 
			
		||||
                   LineHeight="48" LineStackingStrategy="BlockLineHeight">
 | 
			
		||||
            ×
 | 
			
		||||
            <TextBlock.Effect>
 | 
			
		||||
                <DropShadowEffect BlurRadius="6" ShadowDepth="2" Opacity="0.6" />
 | 
			
		||||
            </TextBlock.Effect>
 | 
			
		||||
        </TextBlock>
 | 
			
		||||
        <StackPanel>
 | 
			
		||||
            <TextBlock Text="Beim Senden des Fehlerberichtes ist wiederum leider ein Fehler aufgetreten... (Funktioniert das Netzwerk?)" />
 | 
			
		||||
            <TextBlock Text="{Binding Exception}" Margin="0,10,0,0" Foreground="LightSlateGray" />
 | 
			
		||||
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
 | 
			
		||||
                <Button Command="{Binding CloseViewCommand}" Content="Schließen" />
 | 
			
		||||
            </StackPanel>
 | 
			
		||||
        </StackPanel>
 | 
			
		||||
    </StackPanel>
 | 
			
		||||
</Window>
 | 
			
		||||
							
								
								
									
										33
									
								
								zaaReloaded2/ExceptionHandler/SubmissionFailureView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								zaaReloaded2/ExceptionHandler/SubmissionFailureView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
/* SubmissionFailureView.xaml.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System.Windows;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Interaction logic for SubmissionFailureView.xaml
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public partial class SubmissionFailureView : Window
 | 
			
		||||
    {
 | 
			
		||||
        public SubmissionFailureView()
 | 
			
		||||
        {
 | 
			
		||||
            InitializeComponent();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										34
									
								
								zaaReloaded2/ExceptionHandler/SubmissionProcessAction.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										34
									
								
								zaaReloaded2/ExceptionHandler/SubmissionProcessAction.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
/* SubmissionProcessAction.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using Bovender.Mvvm.Actions;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    class SubmissionProcessAction : MessageActionBase
 | 
			
		||||
    {
 | 
			
		||||
        protected override System.Windows.Window CreateView()
 | 
			
		||||
        {
 | 
			
		||||
            return Content.InjectInto<SubmissionProcessView>();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										45
									
								
								zaaReloaded2/ExceptionHandler/SubmissionProcessView.xaml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								zaaReloaded2/ExceptionHandler/SubmissionProcessView.xaml
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
<!--
 | 
			
		||||
	SubmissionProcessView.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.SubmissionProcessView"
 | 
			
		||||
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
			
		||||
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
			
		||||
        xmlns:l="clr-namespace:zaaReloaded2"
 | 
			
		||||
        xmlns:ex="clr-namespace:zaaReloaded2.ExceptionHandler"
 | 
			
		||||
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
 | 
			
		||||
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
 | 
			
		||||
        Title="Fehlerbericht versenden"
 | 
			
		||||
        ResizeMode="NoResize" ShowInTaskbar="False"
 | 
			
		||||
        SizeToContent="WidthAndHeight"
 | 
			
		||||
        >
 | 
			
		||||
    <Window.Resources>
 | 
			
		||||
        <ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />
 | 
			
		||||
    </Window.Resources>
 | 
			
		||||
    <i:Interaction.Triggers>
 | 
			
		||||
        <i:EventTrigger SourceObject="{Binding CompletedMessage}" EventName="Sent">
 | 
			
		||||
            <ex:SubmissionCompletedAction />
 | 
			
		||||
        </i:EventTrigger>
 | 
			
		||||
    </i:Interaction.Triggers>
 | 
			
		||||
    <StackPanel Margin="10">
 | 
			
		||||
        <ProgressBar Width="240" Value="{Binding PercentCompleted}" IsIndeterminate="{Binding IsIndeterminate}" />
 | 
			
		||||
        <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center">
 | 
			
		||||
            <Button Command="{Binding CancelCommand}" Content="Abbrechen" />
 | 
			
		||||
        </StackPanel>
 | 
			
		||||
    </StackPanel>
 | 
			
		||||
</Window>
 | 
			
		||||
							
								
								
									
										45
									
								
								zaaReloaded2/ExceptionHandler/SubmissionProcessView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								zaaReloaded2/ExceptionHandler/SubmissionProcessView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
/* SubmissionProcessView.xaml.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Windows;
 | 
			
		||||
using System.Windows.Controls;
 | 
			
		||||
using System.Windows.Data;
 | 
			
		||||
using System.Windows.Documents;
 | 
			
		||||
using System.Windows.Input;
 | 
			
		||||
using System.Windows.Media;
 | 
			
		||||
using System.Windows.Media.Imaging;
 | 
			
		||||
using System.Windows.Navigation;
 | 
			
		||||
using System.Windows.Shapes;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Interaction logic for SubmissionProcessView.xaml
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public partial class SubmissionProcessView : Window
 | 
			
		||||
    {
 | 
			
		||||
        public SubmissionProcessView()
 | 
			
		||||
        {
 | 
			
		||||
            InitializeComponent();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										45
									
								
								zaaReloaded2/ExceptionHandler/SubmissionSuccessView.xaml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								zaaReloaded2/ExceptionHandler/SubmissionSuccessView.xaml
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
<!--
 | 
			
		||||
	SubmissionSuccessView.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.SubmissionSuccessView"
 | 
			
		||||
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
			
		||||
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
			
		||||
        xmlns:l="clr-namespace:zaaReloaded2"
 | 
			
		||||
        SizeToContent="WidthAndHeight"
 | 
			
		||||
        Title="Fehlerbericht versenden"
 | 
			
		||||
        >
 | 
			
		||||
    <Window.Resources>
 | 
			
		||||
        <ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />
 | 
			
		||||
    </Window.Resources>
 | 
			
		||||
    <StackPanel Margin="10" Orientation="Horizontal">
 | 
			
		||||
        <TextBlock FontSize="48" FontWeight="Bold" Foreground="GreenYellow" Margin="0,0,10,0"
 | 
			
		||||
                   LineHeight="48" LineStackingStrategy="BlockLineHeight">
 | 
			
		||||
            ✔
 | 
			
		||||
            <TextBlock.Effect>
 | 
			
		||||
                <DropShadowEffect BlurRadius="6" ShadowDepth="2" Opacity="0.6" />
 | 
			
		||||
            </TextBlock.Effect>
 | 
			
		||||
        </TextBlock>
 | 
			
		||||
        <StackPanel>
 | 
			
		||||
            <TextBlock Text="Der Fehlerbericht wurde erfolgreich versandt." />
 | 
			
		||||
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 10 0 0">
 | 
			
		||||
                <Button Command="{Binding CloseViewCommand}" Content="Schließen" />
 | 
			
		||||
            </StackPanel>
 | 
			
		||||
        </StackPanel>
 | 
			
		||||
    </StackPanel>
 | 
			
		||||
</Window>
 | 
			
		||||
							
								
								
									
										33
									
								
								zaaReloaded2/ExceptionHandler/SubmissionSuccessView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								zaaReloaded2/ExceptionHandler/SubmissionSuccessView.xaml.cs
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
/* SubmissionSuccessView.xaml.cs
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System.Windows;
 | 
			
		||||
 | 
			
		||||
namespace zaaReloaded2.ExceptionHandler
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Interaction logic for SubmissionSuccessView.xaml
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public partial class SubmissionSuccessView : Window
 | 
			
		||||
    {
 | 
			
		||||
        public SubmissionSuccessView()
 | 
			
		||||
        {
 | 
			
		||||
            InitializeComponent();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										19
									
								
								zaaReloaded2/Properties/Settings.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										19
									
								
								zaaReloaded2/Properties/Settings.Designer.cs
									
									
									
										generated
									
									
									
								
							@@ -70,27 +70,30 @@ namespace zaaReloaded2.Properties {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [global::System.Configuration.UserScopedSettingAttribute()]
 | 
			
		||||
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
 | 
			
		||||
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
 | 
			
		||||
        [global::System.Configuration.DefaultSettingValueAttribute("http://zaa.nephrowiki.de/updates")]
 | 
			
		||||
        [global::System.Configuration.DefaultSettingValueAttribute("http://zaa.nephrowiki.de/downloads")]
 | 
			
		||||
        public string UpdatesUrl {
 | 
			
		||||
            get {
 | 
			
		||||
                return ((string)(this["UpdatesUrl"]));
 | 
			
		||||
            }
 | 
			
		||||
            set {
 | 
			
		||||
                this["UpdatesUrl"] = value;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [global::System.Configuration.UserScopedSettingAttribute()]
 | 
			
		||||
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
 | 
			
		||||
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
 | 
			
		||||
        [global::System.Configuration.DefaultSettingValueAttribute("versioninfo.txt")]
 | 
			
		||||
        public string VersionInfoFile {
 | 
			
		||||
            get {
 | 
			
		||||
                return ((string)(this["VersionInfoFile"]));
 | 
			
		||||
            }
 | 
			
		||||
            set {
 | 
			
		||||
                this["VersionInfoFile"] = value;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
 | 
			
		||||
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
 | 
			
		||||
        [global::System.Configuration.DefaultSettingValueAttribute("http://zaa.nephrowiki.de/postreport.php")]
 | 
			
		||||
        public string ExceptionPostUrl {
 | 
			
		||||
            get {
 | 
			
		||||
                return ((string)(this["ExceptionPostUrl"]));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -17,11 +17,14 @@
 | 
			
		||||
    <Setting Name="Homepage" Type="System.Uri" Scope="Application">
 | 
			
		||||
      <Value Profile="(Default)">http://zaa.nephrowiki.de</Value>
 | 
			
		||||
    </Setting>
 | 
			
		||||
    <Setting Name="UpdatesUrl" Type="System.String" Scope="User">
 | 
			
		||||
      <Value Profile="(Default)">http://zaa.nephrowiki.de/updates</Value>
 | 
			
		||||
    <Setting Name="UpdatesUrl" Type="System.String" Scope="Application">
 | 
			
		||||
      <Value Profile="(Default)">http://zaa.nephrowiki.de/downloads</Value>
 | 
			
		||||
    </Setting>
 | 
			
		||||
    <Setting Name="VersionInfoFile" Type="System.String" Scope="User">
 | 
			
		||||
    <Setting Name="VersionInfoFile" Type="System.String" Scope="Application">
 | 
			
		||||
      <Value Profile="(Default)">versioninfo.txt</Value>
 | 
			
		||||
    </Setting>
 | 
			
		||||
    <Setting Name="ExceptionPostUrl" Type="System.String" Scope="Application">
 | 
			
		||||
      <Value Profile="(Default)">http://zaa.nephrowiki.de/postreport.php</Value>
 | 
			
		||||
    </Setting>
 | 
			
		||||
  </Settings>
 | 
			
		||||
</SettingsFile>
 | 
			
		||||
@@ -74,16 +74,29 @@ namespace zaaReloaded2
 | 
			
		||||
            this.ribbon = ribbonUI;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Handles ribbon button clicks. This method also contains the try...catch
 | 
			
		||||
        /// structure that invokes the central exception handler in the event of an
 | 
			
		||||
        /// exception.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="control"></param>
 | 
			
		||||
        public void Ribbon_Click(Office.IRibbonControl control)
 | 
			
		||||
        {
 | 
			
		||||
            switch (control.Id)
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                case "zrlAbout":
 | 
			
		||||
                    ViewModels.AboutViewModel vm = new ViewModels.AboutViewModel();
 | 
			
		||||
                    vm.InjectInto<Views.AboutView>().ShowDialog();
 | 
			
		||||
                    break;
 | 
			
		||||
                default:
 | 
			
		||||
                    throw new InvalidOperationException("No operation defined for " + control.Id);
 | 
			
		||||
                switch (control.Id)
 | 
			
		||||
                {
 | 
			
		||||
                    case "zrlAbout":
 | 
			
		||||
                        ViewModels.AboutViewModel vm = new ViewModels.AboutViewModel();
 | 
			
		||||
                        vm.InjectInto<Views.AboutView>().ShowDialog();
 | 
			
		||||
                        break;
 | 
			
		||||
                    default:
 | 
			
		||||
                        throw new InvalidOperationException("No operation defined for " + control.Id);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch (Exception e)
 | 
			
		||||
            {
 | 
			
		||||
                Bovender.ExceptionHandler.CentralHandler.Manage(this, e);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -23,9 +23,6 @@
 | 
			
		||||
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
 | 
			
		||||
            <section name="zaaReloaded2.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
 | 
			
		||||
        </sectionGroup>
 | 
			
		||||
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
 | 
			
		||||
            <section name="zaaReloaded2.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
 | 
			
		||||
        </sectionGroup>
 | 
			
		||||
    </configSections>
 | 
			
		||||
    <applicationSettings>
 | 
			
		||||
        <zaaReloaded2.Properties.Settings>
 | 
			
		||||
@@ -41,16 +38,15 @@
 | 
			
		||||
            <setting name="Homepage" serializeAs="String">
 | 
			
		||||
                <value>http://zaa.nephrowiki.de</value>
 | 
			
		||||
            </setting>
 | 
			
		||||
        </zaaReloaded2.Properties.Settings>
 | 
			
		||||
    </applicationSettings>
 | 
			
		||||
    <userSettings>
 | 
			
		||||
        <zaaReloaded2.Properties.Settings>
 | 
			
		||||
            <setting name="UpdatesUrl" serializeAs="String">
 | 
			
		||||
                <value>http://zaa.nephrowiki.de/updates</value>
 | 
			
		||||
                <value>http://zaa.nephrowiki.de/downloads</value>
 | 
			
		||||
            </setting>
 | 
			
		||||
            <setting name="VersionInfoFile" serializeAs="String">
 | 
			
		||||
                <value>versioninfo.txt</value>
 | 
			
		||||
            </setting>
 | 
			
		||||
            <setting name="ExceptionPostUrl" serializeAs="String">
 | 
			
		||||
                <value>http://zaa.nephrowiki.de/postreport.php</value>
 | 
			
		||||
            </setting>
 | 
			
		||||
        </zaaReloaded2.Properties.Settings>
 | 
			
		||||
    </userSettings>
 | 
			
		||||
    </applicationSettings>
 | 
			
		||||
</configuration>
 | 
			
		||||
@@ -114,6 +114,7 @@
 | 
			
		||||
    <Reference Include="Bovender">
 | 
			
		||||
      <HintPath>..\packages\Bovender.0.2.0.0\lib\net40\Bovender.dll</HintPath>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
 | 
			
		||||
    <Reference Include="PresentationCore" />
 | 
			
		||||
    <Reference Include="PresentationFramework" />
 | 
			
		||||
    <Reference Include="System" />
 | 
			
		||||
@@ -175,6 +176,14 @@
 | 
			
		||||
    <Compile Include="Controller\Elements\CustomText.cs" />
 | 
			
		||||
    <Compile Include="Controller\Settings.cs" />
 | 
			
		||||
    <Compile Include="Controller\SettingsRepository.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\ExceptionDetailView.xaml.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\ExceptionView.xaml.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\ExceptionViewModel.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\SubmissionCompletedAction.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\SubmissionFailureView.xaml.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\SubmissionProcessAction.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\SubmissionProcessView.xaml.cs" />
 | 
			
		||||
    <Compile Include="ExceptionHandler\SubmissionSuccessView.xaml.cs" />
 | 
			
		||||
    <Compile Include="Formatter\DocumentWriter.cs" />
 | 
			
		||||
    <Compile Include="Ribbon.cs" />
 | 
			
		||||
    <Compile Include="Thesaurus\ThesaurusBase.cs" />
 | 
			
		||||
@@ -250,6 +259,26 @@
 | 
			
		||||
    <EmbeddedResource Include="Thesaurus\Defaults\units.txt" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Page Include="ExceptionHandler\ExceptionDetailView.xaml">
 | 
			
		||||
      <Generator>MSBuild:Compile</Generator>
 | 
			
		||||
      <SubType>Designer</SubType>
 | 
			
		||||
    </Page>
 | 
			
		||||
    <Page Include="ExceptionHandler\ExceptionView.xaml">
 | 
			
		||||
      <Generator>MSBuild:Compile</Generator>
 | 
			
		||||
      <SubType>Designer</SubType>
 | 
			
		||||
    </Page>
 | 
			
		||||
    <Page Include="ExceptionHandler\SubmissionFailureView.xaml">
 | 
			
		||||
      <Generator>MSBuild:Compile</Generator>
 | 
			
		||||
      <SubType>Designer</SubType>
 | 
			
		||||
    </Page>
 | 
			
		||||
    <Page Include="ExceptionHandler\SubmissionProcessView.xaml">
 | 
			
		||||
      <Generator>MSBuild:Compile</Generator>
 | 
			
		||||
      <SubType>Designer</SubType>
 | 
			
		||||
    </Page>
 | 
			
		||||
    <Page Include="ExceptionHandler\SubmissionSuccessView.xaml">
 | 
			
		||||
      <Generator>MSBuild:Compile</Generator>
 | 
			
		||||
      <SubType>Designer</SubType>
 | 
			
		||||
    </Page>
 | 
			
		||||
    <Resource Include="Style.xaml">
 | 
			
		||||
      <Generator>MSBuild:Compile</Generator>
 | 
			
		||||
      <SubType>Designer</SubType>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user