aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-01-22 16:38:48 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-01-22 16:38:48 +0200
commit287af6d4bed5333087cb9d702d20035b1ad9a326 (patch)
tree58d229d36680c9ee768516834cde6d8301055e02 /Software/Visual_Studio/PPC/Tango.PPC.UI
parentb06466e5b4fd861207452fa4cebb2ee68195a8e6 (diff)
downloadTango-287af6d4bed5333087cb9d702d20035b1ad9a326.tar.gz
Tango-287af6d4bed5333087cb9d702d20035b1ad9a326.zip
Implemented team viewer join group.
Prevent multiple power up dialogs from showing. Implement auto available dispenser assignment for machine creation. Sorting for machines and dispensers in Machine designer. Implemented new PPC factory reset with team viewer and device name change. Fixed "Exit To Shell" to open real explorer. Redesigned restarting system view. Updated power off animation. Updated loading animation.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/loading_anim.gifbin0 -> 798338 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power_off_2.gifbin0 -> 32040 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs9
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml11
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml40
9 files changed, 51 insertions, 19 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/loading_anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/loading_anim.gif
new file mode 100644
index 000000000..793007cc4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/loading_anim.gif
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power_off_2.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power_off_2.gif
new file mode 100644
index 000000000..867107140
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power_off_2.gif
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
index 149fb549f..003938303 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
@@ -242,7 +242,7 @@ namespace Tango.PPC.UI.PPCApplication
{
LogManager.Log("Application started with '-update_ok' startup arguments. The application has been successfully updated.");
- if (settings.ApplicationState == ApplicationStates.PreSetup)
+ if (settings.ApplicationState == ApplicationStates.PreSetup || settings.ApplicationState == ApplicationStates.FactoryRestore)
{
isAfterSetup = true;
LogManager.Log("System restart is required.");
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 eef669d4f..467b68d8b 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
@@ -428,6 +428,8 @@
<Resource Include="Images\thread_loading.gif" />
<Resource Include="Images\thread_loading.png" />
<Resource Include="Images\firmware.png" />
+ <Resource Include="Images\power_off_2.gif" />
+ <Resource Include="Images\loading_anim.gif" />
<Content Include="Manifests\release.xml" />
<Content Include="Manifests\debug.xml" />
<None Include="firmware_package.tfp">
@@ -691,7 +693,7 @@ if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)"</
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs
index f78a7f334..5c518f60d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs
@@ -31,6 +31,7 @@ namespace Tango.PPC.UI.ViewModels
public class MainViewVM : PPCViewModel
{
private DispatcherTimer _date_timer;
+ private bool _isPowerUpDialogShown;
private DateTime _currentDateTime;
/// <summary>
@@ -100,6 +101,12 @@ namespace Tango.PPC.UI.ViewModels
private async void MachineOperator_PowerUpStarted(object sender, EventArgs e)
{
+ if (_isPowerUpDialogShown)
+ {
+ LogManager.Log("Power up detected but power up dialog is already shown. Skipping...");
+ return;
+ }
+
LogManager.Log("Power up detected, showing power up screen...");
if (!Settings.DisplayPowerUpScreen)
@@ -136,7 +143,9 @@ namespace Tango.PPC.UI.ViewModels
InvokeUI(async () =>
{
+ _isPowerUpDialogShown = true;
await NotificationProvider.ShowDialog<PowerUpViewVM>(vm);
+ _isPowerUpDialogShown = false;
await Task.Factory.StartNew(() =>
{
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 79d9cd54b..a917695af 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml
@@ -10,9 +10,9 @@
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:local="clr-namespace:Tango.PPC.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LoadingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}">
+ d:DesignHeight="1280" d:DesignWidth="800" Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:LoadingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}">
<Grid>
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+ <StackPanel HorizontalAlignment="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.Style>
<Style TargetType="Image">
@@ -47,9 +47,10 @@
</Image.Style>
</Image>-->
- <Grid Margin="0 100 0 0">
- <Image Source="/Images/machine.png" Stretch="Uniform" Width="250" RenderOptions.BitmapScalingMode="Fant"></Image>
- <touch:TouchBusyIndicator Width="350" Height="350" IsIndeterminate="{Binding IsLoading}" />
+ <Grid Margin="0 0 0 0">
+ <!--<Image Source="/Images/machine.png" Stretch="Uniform" Width="250" RenderOptions.BitmapScalingMode="Fant"></Image>
+ <touch:TouchBusyIndicator Width="350" Height="350" IsIndeterminate="{Binding IsLoading}" />-->
+ <touch:TouchGifAnimation Source="/Images/loading_anim.gif" EnableAnimation="{Binding IsLoading}" />
</Grid>
<TextBlock Margin="0 40 0 0" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
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 9437caac9..40b296d1e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml
@@ -25,7 +25,7 @@
<Grid DockPanel.Dock="Bottom" Height="200" Background="{StaticResource TangoMidBackgroundBrush}">
<Border BorderThickness="0 1 0 0" BorderBrush="{StaticResource TangoGrayBrush}">
- <TextBox x:Name="txtLog" Foreground="{StaticResource TangoGrayTextBrush}" FontSize="12" SelectionBrush="Transparent" IsReadOnly="True" Padding="5" Background="Transparent" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
+ <TextBox x:Name="txtLog" Foreground="{StaticResource TangoGrayTextBrush}" FontSize="12" SelectionBrush="#8BB0B0B0" IsReadOnly="True" Padding="5" Background="Transparent" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
</TextBox>
</Border>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml
index 9762ef621..22952a827 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml
@@ -11,7 +11,7 @@
d:DesignHeight="1280" d:DesignWidth="800" Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:PowerOffViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.PowerOffViewVM}">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <touch:TouchGifAnimation Source="/Images/power_off.gif" EnableAnimation="{Binding IsVisible}" HorizontalAlignment="Center" />
+ <touch:TouchGifAnimation Source="/Images/power_off_2.gif" EnableAnimation="{Binding IsVisible}" HorizontalAlignment="Center" />
<TextBlock HorizontalAlignment="Center" Margin="0 60 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Machine is turning Off</TextBlock>
<TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">Do not unplug machine while turning off</TextBlock>
<touch:TouchButton Command="{Binding AbortCommand}" Style="{StaticResource TangoHollowButton}" Margin="0 100 0 0" HorizontalAlignment="Center" Width="200" Height="50">ABORT</touch:TouchButton>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml
index 996b1788d..dd4d2f5d5 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml
@@ -10,17 +10,37 @@
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:RestartingSystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.RestartingSystemViewVM}" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Grid>
-
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <touch:TouchBusyIndicator Width="350" Height="350" IsIndeterminate="{Binding IsVisible}" Foreground="{StaticResource TangoGrayBrush}" />
- <TextBlock Margin="0 40 0 0" TextAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
- <Run>
- Setup completed.
- </Run>
- <LineBreak/>
- <Run>
- Restarting the system for the last time...
- </Run>
+ <Grid Margin="0 100 0 0">
+ <Image Source="/Images/machine.png" Stretch="Uniform" Width="250" RenderOptions.BitmapScalingMode="Fant"></Image>
+ <touch:TouchBusyIndicator Foreground="{StaticResource TangoGrayBrush}" Width="350" Height="350" IsIndeterminate="{Binding IsVisible}" />
+ </Grid>
+
+ <TextBlock FontSize="{StaticResource TangoHeaderFontSize}" Margin="0 100 0 0" HorizontalAlignment="Center" Width="250">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Text" Value="Restarting device"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsVisible}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard x:Name="storyRes">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Text" RepeatBehavior="5x">
+ <DiscreteObjectKeyFrame KeyTime="00:00:0.2" Value="Restarting." />
+ <DiscreteObjectKeyFrame KeyTime="00:00:0.6" Value="Restarting.." />
+ <DiscreteObjectKeyFrame KeyTime="00:00:0.9" Value="Restarting..." />
+ <DiscreteObjectKeyFrame KeyTime="00:00:1.4" Value="Restarting..." />
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <RemoveStoryboard BeginStoryboardName="storyRes" />
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
</TextBlock>
</StackPanel>
</Grid>