aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/BackupRestore/DefaultBackupManager.cs4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/error.pngbin0 -> 810 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/getting-ready.pngbin0 -> 586 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/service.pngbin0 -> 844 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/shutting-down.pngbin0 -> 1190 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs55
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj17
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/BackupRestoreViewVM.cs91
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs11
-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.xaml36
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewsContracts/IBackupRestoreView.cs19
15 files changed, 80 insertions, 347 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/BackupRestore/DefaultBackupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/BackupRestore/DefaultBackupManager.cs
index 1eeb848ed..e73dde3ce 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/BackupRestore/DefaultBackupManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/BackupRestore/DefaultBackupManager.cs
@@ -10,7 +10,7 @@ namespace Tango.PPC.UI.BackupRestore
{
public class DefaultBackupManager : IBackupManager
{
- public event EventHandler<BackupRestoreEventArgs> Progress;
+ public event EventHandler<BackupRestoreProgressEventArgs> Progress;
public DefaultBackupManager(IPPCApplicationManager applicationManager)
{
@@ -29,7 +29,7 @@ namespace Tango.PPC.UI.BackupRestore
protected virtual void OnProgress(BackupRestoreStage stage, double progress = 0, double maxProgress = 100, bool isIntermediate = true)
{
- Progress?.Invoke(this, new BackupRestoreEventArgs()
+ Progress?.Invoke(this, new BackupRestoreProgressEventArgs()
{
Stage = stage,
Progress = progress,
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/error.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/error.png
new file mode 100644
index 000000000..b4b50e4ac
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/error.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/getting-ready.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/getting-ready.png
new file mode 100644
index 000000000..a0dc77f92
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/getting-ready.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/service.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/service.png
new file mode 100644
index 000000000..ba351ee66
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/service.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/shutting-down.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/shutting-down.png
new file mode 100644
index 000000000..9aa8e2db6
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/shutting-down.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
index 77b09f638..fe4be700c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
@@ -117,22 +117,22 @@ namespace Tango.PPC.UI.Navigation
var fromView = MainView.Instance.NavigationControl.SelectedElement;
FrameworkElement toView = null;
- toView = MainView.Instance.NavigationControl.NavigateTo(view.ToString(),() =>
- {
- var fromVM = toView.DataContext as PPCViewModel;
+ toView = MainView.Instance.NavigationControl.NavigateTo(view.ToString(), () =>
+ {
+ var fromVM = toView.DataContext as PPCViewModel;
- if (fromVM != null)
- {
- fromVM.OnNavigatedFrom();
- }
+ if (fromVM != null)
+ {
+ fromVM.OnNavigatedFrom();
+ }
- var toVM = toView.DataContext as PPCViewModel;
+ var toVM = toView.DataContext as PPCViewModel;
- if (toVM != null)
- {
- toVM.OnNavigatedTo();
- }
- });
+ if (toVM != null)
+ {
+ toVM.OnNavigatedTo();
+ }
+ });
return Task.FromResult(true);
}
@@ -251,16 +251,19 @@ namespace Tango.PPC.UI.Navigation
{
await Task.Delay(100);
- var v = moduleNavigation.NavigateTo(view, () =>
+ FrameworkElement v = null;
+
+ v = moduleNavigation.NavigateTo(view, () =>
{
- if (fromVM is PPCViewModel)
+ if (v != null)
{
- (fromVM as PPCViewModel)?.OnNavigatedFrom();
- }
+ var toVM = v.DataContext as PPCViewModel;
- if (_currentVM is PPCViewModel)
- {
- (_currentVM as PPCViewModel)?.OnNavigatedTo();
+ if (toVM != null)
+ {
+ (fromVM as PPCViewModel)?.OnNavigatedFrom();
+ (toVM as PPCViewModel)?.OnNavigatedTo();
+ }
}
});
@@ -284,6 +287,18 @@ namespace Tango.PPC.UI.Navigation
}
else
{
+ await Task.Delay(500);
+
+ if (fromVM is PPCViewModel)
+ {
+ (fromVM as PPCViewModel)?.OnNavigatedFrom();
+ }
+
+ if (_currentVM is PPCViewModel)
+ {
+ (_currentVM as PPCViewModel)?.OnNavigatedTo();
+ }
+
NavigationCycleCompleted?.Invoke(fromVM, _currentVM);
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
index fd068bd61..ca7bad41e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
@@ -155,7 +155,6 @@
<Compile Include="Printing\DefaultPrintingManager.cs" />
<Compile Include="Threading\DefaultDispatcherProvider.cs" />
<Compile Include="ViewModelLocator.cs" />
- <Compile Include="ViewModels\BackupRestoreViewVM.cs" />
<Compile Include="ViewModels\EmergencyViewVM.cs" />
<Compile Include="ViewModels\ExternalBridgeViewVM.cs" />
<Compile Include="ViewModels\LayoutViewVM.cs" />
@@ -167,13 +166,9 @@
<Compile Include="ViewModels\MachineUpdateViewVM.cs" />
<Compile Include="ViewModels\NoPermissionsViewVM.cs" />
<Compile Include="ViewModels\RestartingSystemViewVM.cs" />
- <Compile Include="ViewsContracts\IBackupRestoreView.cs" />
<Compile Include="ViewsContracts\ILayoutView.cs" />
<Compile Include="ViewsContracts\IMachineSetupView.cs" />
<Compile Include="ViewsContracts\IMachineUpdateView.cs" />
- <Compile Include="Views\BackupRestoreView.xaml.cs">
- <DependentUpon>BackupRestoreView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\ExternalBridgeView.xaml.cs">
<DependentUpon>ExternalBridgeView.xaml</DependentUpon>
</Compile>
@@ -259,10 +254,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Views\BackupRestoreView.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
<Page Include="Views\ExternalBridgeView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -363,6 +354,10 @@
<Resource Include="Images\backup-restore.png" />
<Resource Include="Images\restore.png" />
<Resource Include="Images\backup-big.png" />
+ <Resource Include="Images\GlobalStatus\getting-ready.png" />
+ <Resource Include="Images\GlobalStatus\shutting-down.png" />
+ <Resource Include="Images\GlobalStatus\error.png" />
+ <Resource Include="Images\GlobalStatus\service.png" />
<Content Include="Manifests\release.xml" />
<Content Include="Manifests\debug.xml" />
<None Include="packages.config" />
@@ -447,6 +442,10 @@
<Project>{6aa425c9-ea6a-4b01-aaed-5ff122e8b663}</Project>
<Name>Tango.WiFi</Name>
</ProjectReference>
+ <ProjectReference Include="..\Modules\Tango.PPC.BackupRestore\Tango.PPC.BackupRestore.csproj">
+ <Project>{bc2753f8-c0f7-48f5-a85c-149ec7a2f8c7}</Project>
+ <Name>Tango.PPC.BackupRestore</Name>
+ </ProjectReference>
<ProjectReference Include="..\Modules\Tango.PPC.BugReporting\Tango.PPC.BugReporting.csproj">
<Project>{8146fa0a-0725-4a1a-82e6-696c58f33a2b}</Project>
<Name>Tango.PPC.BugReporting</Name>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
index 9fc482389..688a9b376 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
@@ -109,7 +109,6 @@ namespace Tango.PPC.UI
TangoIOC.Default.Register<NoPermissionsViewVM>();
TangoIOC.Default.Register<RestartingSystemViewVM>();
TangoIOC.Default.Register<EmergencyViewVM>();
- TangoIOC.Default.Register<BackupRestoreViewVM>();
TangoIOC.Default.GetInstance<IPPCApplicationManager>().ContentRendered += (_, __) =>
@@ -117,7 +116,6 @@ namespace Tango.PPC.UI
TangoIOC.Default.Register<ILayoutView, LayoutView>(LayoutView.Instance);
TangoIOC.Default.Register<IMachineSetupView, MachineSetupView>(MachineSetupView.Instance);
TangoIOC.Default.Register<IMachineUpdateView, MachineUpdateView>(MachineUpdateView.Instance);
- TangoIOC.Default.Register<IBackupRestoreView, BackupRestoreView>(BackupRestoreView.Instance);
};
//TangoIOC.Default.Register<LoadingViewVM>();
@@ -216,13 +214,5 @@ namespace Tango.PPC.UI
return TangoIOC.Default.GetInstance<EmergencyViewVM>();
}
}
-
- public static BackupRestoreViewVM BackupRestoreViewVM
- {
- get
- {
- return TangoIOC.Default.GetInstance<BackupRestoreViewVM>();
- }
- }
}
} \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/BackupRestoreViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/BackupRestoreViewVM.cs
deleted file mode 100644
index 416ece24b..000000000
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/BackupRestoreViewVM.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Core.Commands;
-using Tango.Core.DI;
-using Tango.PPC.Common;
-using Tango.PPC.Common.BackupRestore;
-using Tango.PPC.UI.ViewsContracts;
-
-namespace Tango.PPC.UI.ViewModels
-{
- public class BackupRestoreViewVM : PPCViewModel<IBackupRestoreView>
- {
- private Stack<BackupRestoreView> _navigation_history;
- private BackupRestoreView _currentView;
- private bool _canNavigateBack;
-
- public enum BackupRestoreView
- {
- MainView,
- BackupView,
- RestoreView
- }
-
- [TangoInject]
- public IBackupManager BackupManager { get; set; }
-
- public RelayCommand<String> NavigateCommand { get; set; }
-
- public RelayCommand NavigateBackCommand { get; set; }
-
- public BackupRestoreViewVM()
- {
- NavigateCommand = new RelayCommand<string>(HandleNavigateCommand);
- NavigateBackCommand = new RelayCommand(NavigateBack, () => _canNavigateBack);
-
- _navigation_history = new Stack<BackupRestoreView>();
- _canNavigateBack = true;
- }
-
- public override void OnNavigatedTo()
- {
- base.OnNavigatedTo();
-
- _navigation_history = new Stack<BackupRestoreView>();
- _currentView = BackupRestoreView.MainView;
- }
-
- private void HandleNavigateCommand(string view)
- {
- var v = (BackupRestoreView)Enum.Parse(typeof(BackupRestoreView), view);
- NavigateTo(v);
- }
-
- private Task NavigateTo(BackupRestoreView view, bool pushHistory = true)
- {
- if (pushHistory)
- {
- _navigation_history.Push(_currentView);
- }
-
- _currentView = view;
- return View.NavigateTo(view);
- }
-
- private async void NavigateBack()
- {
- _canNavigateBack = false;
- InvalidateRelayCommands();
-
- if (_navigation_history.Count > 0)
- {
- await NavigateTo(_navigation_history.Pop(), false);
- }
- else
- {
- await NavigationManager.NavigateBack();
- }
-
- _canNavigateBack = true;
- InvalidateRelayCommands();
- }
-
- public override void OnApplicationStarted()
- {
-
- }
- }
-}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
index 0b530c278..9e8a9fe34 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
@@ -112,11 +112,6 @@ namespace Tango.PPC.UI.ViewModels
public RelayCommand UpdateCommand { get; set; }
/// <summary>
- /// Gets or sets the backup restore command.
- /// </summary>
- public RelayCommand BackupRestoreCommand { get; set; }
-
- /// <summary>
/// Gets or sets the power command.
/// </summary>
public RelayCommand PowerCommand { get; set; }
@@ -151,12 +146,6 @@ namespace Tango.PPC.UI.ViewModels
PowerCommand = new RelayCommand(() => IsPowerOpened = true);
RestartApplicationCommand = new RelayCommand(RestartApplication);
-
- BackupRestoreCommand = new RelayCommand(() =>
- {
- NavigationManager.NavigateTo(NavigationView.BackupRestoreView);
- IsMenuOpened = false;
- });
}
#endregion
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml
deleted file mode 100644
index ad8a5ca18..000000000
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml
+++ /dev/null
@@ -1,128 +0,0 @@
-<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
deleted file mode 100644
index 824bad9f0..000000000
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/BackupRestoreView.xaml.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-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 fa6b8de7e..39c087c52 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -100,15 +100,6 @@
</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 2119aebe7..443ca4f7a 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -7,6 +7,7 @@
xmlns:commonControls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common"
xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels"
xmlns:global="clr-namespace:Tango.PPC.UI"
+ xmlns:operations="clr-namespace:Tango.Integration.Operation;assembly=Tango.Integration"
xmlns:local="clr-namespace:Tango.PPC.UI.Views"
xmlns:notifications="clr-namespace:Tango.PPC.UI.Notifications"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
@@ -73,6 +74,40 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
+
+ <Image Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="Fant">
+ <Image.Style>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Disconnected}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/machine-off.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Standby}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.ReadyToDye}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/ready-to-dye.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.GettingReady}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/getting-ready.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Printing}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/dyeing.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.ShuttingDown}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/shutting-down.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Error}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/error.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Service}">
+ <Setter Property="Source" Value="/Images/GlobalStatus/service.png"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Image.Style>
+ </Image>
<Grid></Grid>
</DockPanel>
</Border>
@@ -89,7 +124,6 @@
<local:MachineUpdateView></local:MachineUpdateView>
<local:RestartingSystemView></local:RestartingSystemView>
<local:EmergencyView></local:EmergencyView>
- <local:BackupRestoreView></local:BackupRestoreView>
</controls:NavigationControl>
</touch:TouchPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewsContracts/IBackupRestoreView.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewsContracts/IBackupRestoreView.cs
deleted file mode 100644
index ef5f43eda..000000000
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewsContracts/IBackupRestoreView.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.PPC.Common;
-using static Tango.PPC.UI.ViewModels.BackupRestoreViewVM;
-
-namespace Tango.PPC.UI.ViewsContracts
-{
- public interface IBackupRestoreView : IPPCView
- {
- /// <summary>
- /// Navigates to the specified backup/restore view.
- /// </summary>
- /// <param name="view">The view.</param>
- Task NavigateTo(BackupRestoreView view);
- }
-}