diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-26 14:19:06 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-26 14:19:06 +0200 |
| commit | 6fb22273d15ed476ccbd3820de6af9bc0deee793 (patch) | |
| tree | 35c40b14471bbc191d12a1dafcd807ec16aacb87 /Software/Visual_Studio/PPC/Tango.PPC.UI/Views | |
| parent | 10a9435c7fece43c588addb744952d92596a8f5b (diff) | |
| download | Tango-6fb22273d15ed476ccbd3820de6af9bc0deee793.tar.gz Tango-6fb22273d15ed476ccbd3820de6af9bc0deee793.zip | |
Implemented Application Initialization Error and Handling.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views')
3 files changed, 57 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingErrorView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingErrorView.xaml new file mode 100644 index 000000000..7682ba4ce --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingErrorView.xaml @@ -0,0 +1,28 @@ +<UserControl x:Class="Tango.PPC.UI.Views.LoadingErrorView" + 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" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" + xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:local="clr-namespace:Tango.PPC.UI.Views" + mc:Ignorable="d" + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LoadingErrorViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingErrorViewVM}"> + <Grid> + <DockPanel Margin="20 60 20 20"> + <StackPanel DockPanel.Dock="Top"> + <Image Source="../Images/warning-red.png" Width="300" Stretch="Uniform" HorizontalAlignment="Center"></Image> + <TextBlock HorizontalAlignment="Center" Margin="0 40 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Application Loading Error</TextBlock> + <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoTitleFontSize}">The application has failed to load properly due to the following reason.</TextBlock> + <TextBlock HorizontalAlignment="Center" Foreground="{StaticResource TangoGrayTextBrush}" TextAlignment="Center" Margin="100 20 100 0" TextWrapping="Wrap" Text="{Binding Error}"></TextBlock> + </StackPanel> + + <Grid> + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="320"> + <touch:TouchButton Command="{Binding RestartCommand}" Padding="0 30" CornerRadius="40">RESTART</touch:TouchButton> + </StackPanel> + </Grid> + </DockPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingErrorView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingErrorView.xaml.cs new file mode 100644 index 000000000..0713cc320 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingErrorView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 Tango.PPC.UI.Views +{ + /// <summary> + /// Interaction logic for LoadingErrorView.xaml + /// </summary> + public partial class LoadingErrorView : UserControl + { + public LoadingErrorView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml index 7eca6dba6..4ca7e39ec 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml @@ -77,6 +77,7 @@ <controls:NavigationControl TransitionAlwaysFades="True" KeepElementsAttached="True" TransitionType="Zoom" x:Name="NavigationControl" x:FieldModifier="public"> <local:LoadingView></local:LoadingView> + <local:LoadingErrorView></local:LoadingErrorView> <local:LoginView></local:LoginView> <local:LayoutView></local:LayoutView> <local:ExternalBridgeView></local:ExternalBridgeView> |
