aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-04-07 14:23:01 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-04-07 14:23:01 +0300
commit2993243d50ab08ebff7dbbb773a313e1e152f8c6 (patch)
tree4c30f667ec1878570bf9f63aaf20f68a853068b6 /Software/Visual_Studio
parentc87a2063a2951e433195a960d16e8b1de7748fb0 (diff)
downloadTango-2993243d50ab08ebff7dbbb773a313e1e152f8c6.tar.gz
Tango-2993243d50ab08ebff7dbbb773a313e1e152f8c6.zip
Refactored Bit Results Dialog.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs24
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
4 files changed, 32 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
index 25dc08f7e..4f93f9b31 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
@@ -259,7 +259,7 @@
<touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ExportLogsCommand}" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}">EXPORT SYSTEM LOGS</touch:TouchButton>
- <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ViewBitResultsCommand}" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}">VIEW BIT RESULTS</touch:TouchButton>
+ <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ViewBitResultsCommand}">VIEW BIT RESULTS</touch:TouchButton>
<touch:TouchToggleButton EnableDropShadow="False" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Margin="20" CornerRadius="25" Height="50" FontSize="18" IsChecked="{Binding IsInkAutoFillingDisabled}" IsEnabled="{Binding MachineProvider.IsConnected}" Content="DISABLE AUTO INK FILLING" CheckedContent="ENABLE AUTO INK FILLING" Foreground="{StaticResource TangoPrimaryAccentBrush}"></touch:TouchToggleButton>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml
index c9618d594..59bff14eb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml
@@ -102,6 +102,13 @@
<TextBlock HorizontalAlignment="Center" Margin="0 15 0 0" FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">Fetching BIT results, please wait...</TextBlock>
</StackPanel>
</Grid>
+
+ <Grid Visibility="{Binding BitSuccessful,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel VerticalAlignment="Center">
+ <touch:TouchIcon Icon="Check" Width="100" Height="100" Foreground="{StaticResource TangoSuccessBrush}" />
+ <TextBlock HorizontalAlignment="Center" Margin="0 15 0 0" FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">All tests passed successfully</TextBlock>
+ </StackPanel>
+ </Grid>
</Grid>
</DockPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs
index a28bd0c39..6a9630c21 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs
@@ -9,6 +9,7 @@ using Tango.Core.DI;
using Tango.Integration.Operation;
using Tango.PMR.Diagnostics;
using Tango.PPC.Common;
+using Tango.PPC.Common.Application;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.Notifications;
using Tango.SharedUI;
@@ -30,6 +31,16 @@ namespace Tango.PPC.UI.Dialogs
[TangoInject]
public INotificationProvider NotificationProvider { get; set; }
+ [TangoInject]
+ public IPPCApplicationManager ApplicationManager { get; set; }
+
+ private bool _bitSuccessful;
+ public bool BitSuccessful
+ {
+ get { return _bitSuccessful; }
+ set { _bitSuccessful = value; RaisePropertyChangedAuto(); }
+ }
+
public BitResultsViewVM()
{
TangoIOC.Default.Inject(this);
@@ -46,7 +57,18 @@ namespace Tango.PPC.UI.Dialogs
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
var bitTypes = await db.BitTypes.ToListAsync();
- Results = await MachineProvider.MachineOperator.GetBitResults(bitTypes);
+ var results = await MachineProvider.MachineOperator.GetBitResults(bitTypes);
+
+ if (ApplicationManager.IsInTechnicianMode)
+ {
+ Results = results;
+ }
+ else
+ {
+ Results = results.Where(x => x.BitResult.Status == BitResultStatus.Failed || x.BitResult.Status == BitResultStatus.Warning).ToList();
+ BitSuccessful = Results.Count == 0;
+ }
+
IsFree = true;
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>