aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-07 15:39:12 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-07 15:39:12 +0200
commitbd3cb640be12621ac37253e8a8c627ae40692e4d (patch)
treecddc36bc95b966f48e1b7387fed1955504d3975b /Software/Visual_Studio/PPC/Tango.PPC.UI
parent7a1f9f14cc50001366be0efefc25fd5af403d02e (diff)
downloadTango-bd3cb640be12621ac37253e8a8c627ae40692e4d.tar.gz
Tango-bd3cb640be12621ac37253e8a8c627ae40692e4d.zip
Some fixes and improvements for PPC & Machine Studio.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs12
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs21
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml6
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml14
6 files changed, 32 insertions, 27 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs
index f5c6f43b9..ee1b39ca6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs
@@ -142,6 +142,13 @@ namespace Tango.PPC.UI.ViewModels
set { _deploymentSlot = value; RaisePropertyChangedAuto(); }
}
+ private MachineSetupView _currentView;
+ public MachineSetupView CurrentView
+ {
+ get { return _currentView; }
+ set { _currentView = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -284,6 +291,7 @@ namespace Tango.PPC.UI.ViewModels
/// <param name="view">The view.</param>
private Task NavigateTo(MachineSetupView view)
{
+ CurrentView = view;
return View.NavigateTo(view);
}
@@ -312,11 +320,13 @@ namespace Tango.PPC.UI.ViewModels
}
}
- private void ConnectivityProvider_ConnectionStateChanged(object sender, Common.Connectivity.ConnectionStateEventArgs e)
+ private async void ConnectivityProvider_ConnectionStateChanged(object sender, Common.Connectivity.ConnectionStateEventArgs e)
{
if (e.IsConnected)
{
ConnectivityProvider.ConnectionStateChanged -= ConnectivityProvider_ConnectionStateChanged;
+ await NavigateTo(MachineSetupView.WiFiTestView);
+ await Task.Delay(5000);
EnsureWiFi();
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
index a553f3a18..07d034964 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
@@ -213,13 +213,20 @@ namespace Tango.PPC.UI.ViewModels
private void CompleteUpdate()
{
- String updater_exe = Path.Combine(_update_result.UpdatePackagePath, "Tango.PPC.Updater.exe");
-
- LogManager.Log("Completing machine setup...");
- LogManager.Log($"Executing '{updater_exe}' with arguments '{PathHelper.GetStartupPath()}'...");
- Process.Start(updater_exe, PathHelper.GetStartupPath());
- LogManager.Log("Terminating application process!");
- Environment.Exit(0);
+ if (!IsDbUpdate)
+ {
+ String updater_exe = Path.Combine(_update_result.UpdatePackagePath, "Tango.PPC.Updater.exe");
+ LogManager.Log("Completing machine setup...");
+ LogManager.Log($"Executing '{updater_exe}' with arguments '{PathHelper.GetStartupPath()}'...");
+ Process.Start(updater_exe, PathHelper.GetStartupPath());
+ LogManager.Log("Terminating application process!");
+ Environment.Exit(0);
+ }
+ else
+ {
+ LogManager.Log("Restarting Application...");
+ ApplicationManager.Restart();
+ }
}
#endregion
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 0b3e0b1ee..bf3a85543 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -151,7 +151,7 @@
</Grid>
<!--External Header Content Here-->
- <commonControls:AsyncAdornerControl>
+ <!--<commonControls:AsyncAdornerControl>
<commonControls:AsyncAdornerControl.Style>
<Style TargetType="commonControls:AsyncAdornerControl">
<Setter Property="Visibility" Value="Hidden"></Setter>
@@ -169,7 +169,7 @@
<StackPanel VerticalAlignment="Center">
<touch:TouchGifAnimation Source="/Images/preloader_rectangles.gif" EnableAnimation="{Binding NotificationProvider.IsInGlobalBusyState}" />
</StackPanel>
- </commonControls:AsyncAdornerControl>
+ </commonControls:AsyncAdornerControl>-->
</Grid>
</DockPanel>
</Border>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml
index 895619807..57793a9b3 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml
@@ -13,7 +13,7 @@
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LoadingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <Image gif:ImageBehavior.EnableAnimation="{Binding IsLoading}" gif:ImageBehavior.AnimatedSource="/Images/Twine_Loading_GIF.gif" Margin="100 100 100 0" RenderTransformOrigin="0.5,0.5" RenderOptions.BitmapScalingMode="Fant" Height="382">
+ <!--<Image gif:ImageBehavior.EnableAnimation="{Binding IsLoading}" gif:ImageBehavior.AnimatedSource="/Images/Twine_Loading_GIF.gif" Margin="100 100 100 0" RenderTransformOrigin="0.5,0.5" RenderOptions.BitmapScalingMode="Fant" Height="382">
<Image.Style>
<Style TargetType="Image">
<Setter Property="RenderTransform">
@@ -45,8 +45,10 @@
</Style.Triggers>
</Style>
</Image.Style>
- </Image>
+ </Image>-->
+ <touch:TouchBusyIndicator Width="250" Margin="0 100 0 0" Height="250" IsIndeterminate="{Binding IsLoading}" />
+
<TextBlock Margin="0 40 0 0" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
<Run>v</Run><Run Text="{Binding ApplicationManager.Version,Mode=OneWay}"></Run>
</TextBlock>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
index 13f163ef5..30b99dbbf 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
@@ -65,7 +65,7 @@
<TextBlock DockPanel.Dock="Top" Margin="20 0" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
Checking internet connection, please wait...
</TextBlock>
- <touch:TouchBusyIndicator Width="250" Margin="0 100 0 0" Height="250" IsIndeterminate="True" />
+ <touch:TouchBusyIndicator Width="250" Margin="0 100 0 0" Height="250" IsIndeterminate="{Binding CurrentView,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='WiFiTestView'}" />
</StackPanel>
</Grid>
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 9df92bbcc..6d1bde59d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -91,19 +91,5 @@
<local:MachineUpdateView></local:MachineUpdateView>
</controls:NavigationControl>
</touch:TouchPanel>
-
- <!--<Grid Background="#28000000" Visibility="{Binding NotificationProvider.IsInGlobalBusyState,Converter={StaticResource BooleanToVisibilityConverter}}"/>
-
- <commonControls:AsyncAdornerControl HorizontalAlignment="Center" VerticalAlignment="Center" Width="600" Height="200" Visibility="Visible">
- <Grid>
- <Border Background="White" CornerRadius="10">
- <Border.Effect>
- <DropShadowEffect ShadowDepth="0" BlurRadius="10" />
- </Border.Effect>
-
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Please wait...</TextBlock>
- </Border>
- </Grid>
- </commonControls:AsyncAdornerControl>-->
</Grid>
</UserControl>