aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml128
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml.cs47
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml9
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml1
4 files changed, 185 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml
new file mode 100644
index 000000000..ad8a5ca18
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml
@@ -0,0 +1,128 @@
+<UserControl x:Class="Tango.PPC.UI.Views.BackupRestoreView"
+ 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:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ 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:BackupRestoreViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.BackupRestoreViewVM}">
+
+ <UserControl.Resources>
+ <Style TargetType="touch:TouchButton" x:Key="ButtonMenu">
+ <Setter Property="Padding" Value="10"></Setter>
+ <Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
+ <Setter Property="Height" Value="140"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="BorderBrush" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="EnableDropShadow" Value="False"></Setter>
+ <Setter Property="CornerRadius" Value="5"></Setter>
+ <Setter Property="Margin" Value="0 0 0 20"></Setter>
+ <Setter Property="RippleBrush" Value="#4BB8B8B8"></Setter>
+ </Style>
+ </UserControl.Resources>
+
+ <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0 20 0 0">
+ <Image Source="/Images/backup-restore.png" Stretch="Fill" Width="700" />
+ </StackPanel>
+ </Grid>
+
+ <Grid DockPanel.Dock="Bottom" Margin="50 20">
+ <touch:TouchButton Command="{Binding NavigateBackCommand}" HorizontalAlignment="Right" Height="60" Width="200" Style="{StaticResource TangoHollowButton}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Margin="-30 0 30 0" Icon="ArrowLeft" />
+ <TextBlock>Back</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </Grid>
+
+ <controls:NavigationControl x:Name="navigationControl" TransitionType="Slide" KeepElementsAttached="True" Margin="0 20 0 0" SelectedIndex="0">
+
+ <Grid controls:NavigationControl.NavigationName="MainView">
+ <StackPanel HorizontalAlignment="Left" Margin="50 20 50 0">
+ <TextBlock TextWrapping="Wrap" FontSize="{StaticResource TangoDefaultFontSize}">
+ <Run FontSize="{StaticResource TangoTitleFontSize}">Welcome to the backup/restore wizard</Run>
+ <LineBreak/>
+ <LineBreak/>
+ <Run>This wizard allows you to create a complete backup of your current machine state including software, firmware, data and user settings.</Run>
+ <LineBreak/>
+ <LineBreak/>
+ <LineBreak/>
+ <Run>For creating a complete backup of your system please press 'Backup'.</Run>
+ <LineBreak/>
+ <Run>In case you want to restore your system to a previous state, please press 'Restore'.</Run>
+ </TextBlock>
+ </StackPanel>
+
+ <StackPanel VerticalAlignment="Center" Margin="50 150 50 0">
+ <touch:TouchButton Style="{StaticResource ButtonMenu}" Command="{Binding NavigateCommand}" CommandParameter="BackupView">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
+ <Image Source="../Images/backup-big.png" Width="80" Height="80" />
+ <StackPanel Margin="10 0 0 0">
+ <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Backup</TextBlock>
+ <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" Width="470" TextWrapping="Wrap">
+ Create a complete backup of your system state and save it to a storage device.
+ </TextBlock>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchButton>
+
+ <touch:TouchButton Style="{StaticResource ButtonMenu}" Command="{Binding NavigateCommand}" CommandParameter="RestoreView">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
+ <Image Source="../Images/restore.png" Width="80" Height="65" />
+ <StackPanel Margin="10 0 0 0">
+ <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Restore</TextBlock>
+ <TextBlock Foreground="{StaticResource TangoGrayTextBrush}">
+ Restore your system from a previously saved backup file.
+ </TextBlock>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchButton>
+ </StackPanel>
+ </Grid>
+
+ <Grid controls:NavigationControl.NavigationName="BackupView">
+ <StackPanel HorizontalAlignment="Left" Margin="50 20 50 0">
+ <TextBlock TextWrapping="Wrap" FontSize="{StaticResource TangoDefaultFontSize}">
+ <Run FontSize="{StaticResource TangoTitleFontSize}">Backup your system</Run>
+ <LineBreak/>
+ <LineBreak/>
+ <Run>This wizard allows you to create a complete backup of your current machine state including software, firmware, data and user settings.</Run>
+ <LineBreak/>
+ <LineBreak/>
+ <LineBreak/>
+ <Run>For creating a complete backup of your system please press 'Backup'.</Run>
+ <LineBreak/>
+ <Run>In case you want to restore your system to a previous state, please press 'Restore'.</Run>
+ </TextBlock>
+ </StackPanel>
+ </Grid>
+
+ <Grid controls:NavigationControl.NavigationName="RestoreView">
+ <StackPanel HorizontalAlignment="Left" Margin="50 20 50 0">
+ <TextBlock TextWrapping="Wrap" FontSize="{StaticResource TangoDefaultFontSize}">
+ <Run FontSize="{StaticResource TangoTitleFontSize}">Restore your system</Run>
+ <LineBreak/>
+ <LineBreak/>
+ <Run>This wizard allows you to create a complete backup of your current machine state including software, firmware, data and user settings.</Run>
+ <LineBreak/>
+ <LineBreak/>
+ <LineBreak/>
+ <Run>For creating a complete backup of your system please press 'Backup'.</Run>
+ <LineBreak/>
+ <Run>In case you want to restore your system to a previous state, please press 'Restore'.</Run>
+ </TextBlock>
+ </StackPanel>
+ </Grid>
+ </controls:NavigationControl>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml.cs
new file mode 100644
index 000000000..824bad9f0
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml.cs
@@ -0,0 +1,47 @@
+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;
+using Tango.PPC.Common;
+using Tango.PPC.UI.ViewModels;
+using Tango.PPC.UI.ViewsContracts;
+
+namespace Tango.PPC.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for BackupRestoreView.xaml
+ /// </summary>
+ public partial class BackupRestoreView : UserControl, IBackupRestoreView
+ {
+ public static BackupRestoreView Instance { get; internal set; }
+
+ public BackupRestoreView()
+ {
+ InitializeComponent();
+
+ Instance = this;
+ }
+
+ public Task NavigateTo(BackupRestoreViewVM.BackupRestoreView view)
+ {
+ TaskCompletionSource<object> source = new TaskCompletionSource<object>();
+
+ navigationControl.NavigateTo(view.ToString(), () =>
+ {
+ source.SetResult(new object());
+ });
+
+ return source.Task;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
index 39c087c52..fa6b8de7e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -100,6 +100,15 @@
</StackPanel>
</touch:TouchButton>
</Border>
+
+ <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1">
+ <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="40 25" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding BackupRestoreCommand}">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
+ <Image Source="/Images/Menu/backup.png" VerticalAlignment="Center" Width="32" Height="32"></Image>
+ <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Backup/Restore</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </Border>
</StackPanel>
</StackPanel>
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 6d6d57526..2119aebe7 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -89,6 +89,7 @@
<local:MachineUpdateView></local:MachineUpdateView>
<local:RestartingSystemView></local:RestartingSystemView>
<local:EmergencyView></local:EmergencyView>
+ <local:BackupRestoreView></local:BackupRestoreView>
</controls:NavigationControl>
</touch:TouchPanel>
</Grid>