aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 03:59:31 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 03:59:31 +0200
commitd1d28d68564d0a76021944ba1e2993ffb3eaba61 (patch)
treec0068878c600b48edccca9e824d6b9c41674cbee /Software/Visual_Studio
parentdff40538d054551a74034b473f9f0e0c3590bcd0 (diff)
downloadTango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.tar.gz
Tango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.zip
Bit completed except updated BIT types.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs3
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs50
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj9
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs8
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Bit/IBitManager.cs13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.SchemaSynchronizer.CLI/Program.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Bit/DefaultBitManager.cs28
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml108
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs61
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj11
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/BitType.cs8
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs19
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/BitResultComposition.cs38
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs6
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs46
-rw-r--r--Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj3
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs45
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/BitResultStatus.cs48
-rw-r--r--Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj1
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml6
28 files changed, 553 insertions, 35 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs
index 56d7149d3..5198498a3 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Converters/MachineEventToViewConverter.cs
@@ -29,6 +29,9 @@ namespace Tango.PPC.Events.Converters
_eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER, typeof(ThreadBreakView));
_eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER, typeof(ThreadBreakView));
_eventViews.Add(EventTypes.THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER, typeof(ThreadBreakView));
+
+ //BIT Failed
+ _eventViews.Add(EventTypes.POWER_UP_BIT_FAILURE, typeof(BitFailedView));
}
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml
new file mode 100644
index 000000000..9700eb5c4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml
@@ -0,0 +1,26 @@
+<UserControl x:Class="Tango.PPC.Events.EventsViews.BitFailedView"
+ 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:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:local="clr-namespace:Tango.PPC.Events.EventsViews"
+ mc:Ignorable="d"
+ d:DesignHeight="220" d:DesignWidth="750" d:DataContext="{d:DesignInstance Type=entities:MachinesEvent, IsDesignTimeCreatable=False}">
+ <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
+ <DockPanel>
+ <Image Stretch="None" Margin="20" DockPanel.Dock="Right" Source="../Images/machine_small.png" RenderOptions.BitmapScalingMode="Fant" />
+ <DockPanel Margin="35 20 20 20">
+ <TextBlock FontSize="{StaticResource TangoTitleFontSize}" FontWeight="SemiBold" DockPanel.Dock="Top" Text="{Binding EventType.Title,FallbackValue='Unknown Event'}"></TextBlock>
+
+ <StackPanel Margin="0 30 0 0">
+ <TextBlock TextWrapping="Wrap" FontWeight="SemiBold" Text="{Binding EventType.Description,FallbackValue='No Description'}"></TextBlock>
+ <Rectangle Margin="0 5 0 10" StrokeThickness="2" Stroke="{StaticResource TangoDividerBrush}" />
+
+ <touch:TouchButton x:Name="btnViewBitResult" Margin="0 10 0 0" Height="55" Style="{StaticResource TangoHollowButton}" Width="280" HorizontalAlignment="Left">VIEW BIT RESULTS</touch:TouchButton>
+ </StackPanel>
+ </DockPanel>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs
new file mode 100644
index 000000000..412755205
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/BitFailedView.xaml.cs
@@ -0,0 +1,50 @@
+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.Core.DI;
+using Tango.PPC.Common.Bit;
+using Tango.PPC.Common.ThreadLoading;
+
+namespace Tango.PPC.Events.EventsViews
+{
+ /// <summary>
+ /// Interaction logic for ThreadBreakView.xaml
+ /// </summary>
+ public partial class BitFailedView : UserControl
+ {
+ public BitFailedView()
+ {
+ InitializeComponent();
+
+ btnViewBitResult.Click += BtnViewBitResult_Click;
+ }
+
+ private void BtnViewBitResult_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ var bitManager = TangoIOC.Default.GetInstance<IBitManager>();
+
+ if (bitManager != null)
+ {
+ bitManager.ShowBitResultsDialog();
+ }
+ }
+ catch (Exception ex)
+ {
+ Logging.LogManager.Default.Log(ex, "Error loading the thread break wizard.");
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
index 61485b00b..540c33e1c 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
@@ -76,6 +76,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="EventsViews\BitFailedView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="EventsViews\ThreadBreakView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -102,6 +106,9 @@
<Compile Include="EventsViews\JobEventView.xaml.cs">
<DependentUpon>JobEventView.xaml</DependentUpon>
</Compile>
+ <Compile Include="EventsViews\BitFailedView.xaml.cs">
+ <DependentUpon>BitFailedView.xaml</DependentUpon>
+ </Compile>
<Compile Include="EventsViews\ThreadBreakView.xaml.cs">
<DependentUpon>ThreadBreakView.xaml</DependentUpon>
</Compile>
@@ -187,7 +194,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
index ae08f7f19..6e1d76d9d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
@@ -117,6 +117,8 @@ namespace Tango.PPC.Maintenance.ViewModels
public RelayCommand DispenseCleanerLiquidCommand { get; set; }
+ public RelayCommand ViewBitResultsCommand { get; set; }
+
public MaintenanceViewVM()
{
Guides = new ObservableCollection<GuideBase>(GuideHelper.CreateAllGuides());
@@ -132,6 +134,7 @@ namespace Tango.PPC.Maintenance.ViewModels
HeadCleaningCommand = new RelayCommand(PerformHeadCleaning, () => MachineProvider.MachineOperator.CanPrint);
StartThreadLoadingCommand = new RelayCommand(StartThreadLoadingWizard, () => MachineProvider.MachineOperator.CanPrint);
StartThreadBreakCommand = new RelayCommand(StartThreadBreakWizard, () => MachineProvider.MachineOperator.CanPrint);
+ ViewBitResultsCommand = new RelayCommand(ViewBitResult, () => MachineProvider.MachineOperator.IsConnected);
WasteStates = new List<WasteStateModel>()
{
@@ -377,5 +380,10 @@ namespace Tango.PPC.Maintenance.ViewModels
}
}
}
+
+ private async void ViewBitResult()
+ {
+ await BitManager.ShowBitResultsDialog();
+ }
}
}
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 bf0128149..25dc08f7e 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,10 @@
<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: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>
+
</UniformGrid>
</StackPanel>
</StackPanel>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Bit/IBitManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Bit/IBitManager.cs
new file mode 100644
index 000000000..a89340d08
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Bit/IBitManager.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.PPC.Common.Bit
+{
+ public interface IBitManager
+ {
+ Task ShowBitResultsDialog();
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
index 98eef6883..a192f4d92 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
@@ -7,6 +7,7 @@ using Tango.BL;
using Tango.Core.DI;
using Tango.PPC.Common.Application;
using Tango.PPC.Common.Authentication;
+using Tango.PPC.Common.Bit;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.Connectivity;
using Tango.PPC.Common.EventLogging;
@@ -130,6 +131,12 @@ namespace Tango.PPC.Common
[TangoInject]
public IThreadLoadingService ThreadLoadingService { get; set; }
+ /// <summary>
+ /// Gets or sets the bit manager.
+ /// </summary>
+ [TangoInject]
+ public IBitManager BitManager { get; set; }
+
private PPCSettings _settings;
/// <summary>
/// Gets the main PPC settings.
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
index 736fd321c..9312f7819 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
@@ -133,6 +133,7 @@
<Compile Include="BackupRestore\IBackupManager.cs" />
<Compile Include="BackupRestore\RestoreResult.cs" />
<Compile Include="BackupRestore\RestoreSettings.cs" />
+ <Compile Include="Bit\IBitManager.cs" />
<Compile Include="Connection\DefaultMachineProvider.cs" />
<Compile Include="Connection\IMachineProvider.cs" />
<Compile Include="Connection\MachineOperatorChangedEventArgs.cs" />
@@ -524,7 +525,7 @@
</Target>
<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.DataSynchronizer.CLI/Program.cs b/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs
index 7c9473569..8a67d57fb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
using Tango.BL;
using Tango.SQLExaminer;
-namespace Tango.PPC.DataSynchronizer.CLI
+namespace Tango.PPC.DataSynchronizer.CLI
{
class Program
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.SchemaSynchronizer.CLI/Program.cs b/Software/Visual_Studio/PPC/Tango.PPC.SchemaSynchronizer.CLI/Program.cs
index d77192de2..8098647d4 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.SchemaSynchronizer.CLI/Program.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.SchemaSynchronizer.CLI/Program.cs
@@ -9,7 +9,7 @@ using Tango.SQLExaminer;
namespace Tango.PPC.SchemaSynchronizer.CLI
{
- class Program
+ class Program
{
static void Main(string[] args)
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Bit/DefaultBitManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Bit/DefaultBitManager.cs
new file mode 100644
index 000000000..bc132335e
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Bit/DefaultBitManager.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.DI;
+using Tango.PPC.Common.Bit;
+using Tango.PPC.Common.Notifications;
+using Tango.PPC.UI.Dialogs;
+
+namespace Tango.PPC.UI.Bit
+{
+ public class DefaultBitManager : IBitManager
+ {
+ private bool _isShowing;
+
+ [TangoInject]
+ public INotificationProvider NotificationProvider { get; set; }
+
+ public async Task ShowBitResultsDialog()
+ {
+ if (_isShowing) return;
+ _isShowing = true;
+ await NotificationProvider.ShowDialog<BitResultsViewVM>();
+ _isShowing = false;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml
new file mode 100644
index 000000000..d6c6a9b0f
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml
@@ -0,0 +1,108 @@
+<UserControl x:Class="Tango.PPC.UI.Dialogs.BitResultsView"
+ 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:local="clr-namespace:Tango.PPC.UI.Dialogs"
+ mc:Ignorable="d"
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="700" Height="1000" d:DataContext="{d:DesignInstance Type=local:BitResultsViewVM, IsDesignTimeCreatable=False}">
+ <Grid Margin="20">
+ <DockPanel>
+
+ <Grid DockPanel.Dock="Bottom" Margin="0 20 0 0">
+ <touch:TouchButton HorizontalAlignment="Center" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="180" Height="50" VerticalAlignment="Bottom">CLOSE</touch:TouchButton>
+ </Grid>
+
+ <StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center">
+ <Image Source="../Images/machine.png" Stretch="Uniform" Width="100" RenderOptions.BitmapScalingMode="Fant" />
+ <TextBlock VerticalAlignment="Center" Margin="0 10 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Machine BIT Results</TextBlock>
+ </StackPanel>
+
+ <Grid>
+ <touch:TouchSimpleDataGrid FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoDarkForegroundBrush}" Visibility="{Binding IsFree,Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0 20 0 0" IsReadOnly="True" ItemsSource="{Binding Results}" Background="{StaticResource TangoPrimaryBackgroundBrush}" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}" HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" CanUserSortColumns="False" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="40" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled">
+ <DataGrid.Resources>
+ <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="{x:Type DataGridColumnHeader}">
+ <Setter Property="Background" Value="{StaticResource TangoDarkForegroundBrush}" />
+ <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}" />
+ <Setter Property="Padding" Value="5"></Setter>
+ </Style>
+ </DataGrid.Resources>
+ <DataGrid.CellStyle>
+ <Style TargetType="{x:Type DataGridCell}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type DataGridCell}">
+ <Grid Background="{TemplateBinding Background}">
+ <ContentPresenter VerticalAlignment="Center" />
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.RowStyle>
+ <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
+ <Style.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" />
+ </Trigger>
+ <Trigger Property="IsFocused" Value="True">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </DataGrid.RowStyle>
+ <DataGrid.Columns>
+ <DataGridTemplateColumn Header="" Width="40">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <touch:TouchIcon Width="16">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
+ <Setter Property="Icon" Value="TimerSand"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding BitResult.Status}" Value="Passed">
+ <Setter Property="Icon" Value="Check"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding BitResult.Status}" Value="Failed">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding BitResult.Status}" Value="Warning">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTextColumn Header="Test" Width="250" Binding="{Binding BitType.Name}" />
+ <DataGridTextColumn Header="Subject" Width="100" Binding="{Binding BitType.Subject}" />
+ <DataGridTextColumn Header="Description" Width="1*" Binding="{Binding BitResult.Description}" />
+ </DataGrid.Columns>
+ </touch:TouchSimpleDataGrid>
+
+ <Grid Visibility="{Binding IsFree,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
+ <StackPanel VerticalAlignment="Center">
+ <touch:TouchBusyIndicator Width="100" Height="100" IsIndeterminate="True" Foreground="{StaticResource TangoGrayBrush}" StrokeThickness="3" />
+ <TextBlock HorizontalAlignment="Center" Margin="0 15 0 0" FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">Fetching BIT results, please wait...</TextBlock>
+ </StackPanel>
+ </Grid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml.cs
new file mode 100644
index 000000000..19f7185c4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml.cs
@@ -0,0 +1,28 @@
+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;
+
+namespace Tango.PPC.UI.Dialogs
+{
+ /// <summary>
+ /// Interaction logic for BitResultsView.xaml
+ /// </summary>
+ public partial class BitResultsView : UserControl
+ {
+ public BitResultsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs
new file mode 100644
index 000000000..a28bd0c39
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsViewVM.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Data.Entity;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL;
+using Tango.Core.DI;
+using Tango.Integration.Operation;
+using Tango.PMR.Diagnostics;
+using Tango.PPC.Common;
+using Tango.PPC.Common.Connection;
+using Tango.PPC.Common.Notifications;
+using Tango.SharedUI;
+
+namespace Tango.PPC.UI.Dialogs
+{
+ public class BitResultsViewVM : DialogViewVM
+ {
+ private List<BitResultComposition> _results;
+ public List<BitResultComposition> Results
+ {
+ get { return _results; }
+ set { _results = value; RaisePropertyChangedAuto(); }
+ }
+
+ [TangoInject]
+ public IMachineProvider MachineProvider { get; set; }
+
+ [TangoInject]
+ public INotificationProvider NotificationProvider { get; set; }
+
+ public BitResultsViewVM()
+ {
+ TangoIOC.Default.Inject(this);
+ Results = new List<BitResultComposition>();
+ IsFree = false;
+ }
+
+ public async override void OnShow()
+ {
+ base.OnShow();
+
+ try
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ var bitTypes = await db.BitTypes.ToListAsync();
+ Results = await MachineProvider.MachineOperator.GetBitResults(bitTypes);
+ IsFree = true;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error fetching BIT results.");
+ Cancel();
+ await NotificationProvider.ShowError($"Error fetching BIT results.\n{ex.FlattenMessage()}");
+ }
+ }
+ }
+}
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 081d79f3e..9e4256738 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
@@ -123,6 +123,7 @@
<DependentUpon>PowerOffAppBarItemView.xaml</DependentUpon>
</Compile>
<Compile Include="Authentication\DefaultAuthenticationProvider.cs" />
+ <Compile Include="Bit\DefaultBitManager.cs" />
<Compile Include="Connectivity\DefaultConnectivityProvider.cs" />
<Compile Include="Connectivity\WiFiAuthenticationView.xaml.cs">
<DependentUpon>WiFiAuthenticationView.xaml</DependentUpon>
@@ -133,6 +134,10 @@
</Compile>
<Compile Include="Converters\AppBarItemConverter.cs" />
<Compile Include="Converters\ItemBaseConverter.cs" />
+ <Compile Include="Dialogs\BitResultsView.xaml.cs">
+ <DependentUpon>BitResultsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Dialogs\BitResultsViewVM.cs" />
<Compile Include="Dialogs\CartridgeValidationView.xaml.cs">
<DependentUpon>CartridgeValidationView.xaml</DependentUpon>
</Compile>
@@ -264,6 +269,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Dialogs\BitResultsView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Dialogs\CartridgeValidationView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -774,7 +783,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/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
index 222d3a1e8..6ce738c24 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
@@ -7,6 +7,7 @@ using Tango.Logging;
using Tango.PPC.Common.Application;
using Tango.PPC.Common.Authentication;
using Tango.PPC.Common.BackupRestore;
+using Tango.PPC.Common.Bit;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.Connectivity;
using Tango.PPC.Common.Console;
@@ -39,6 +40,7 @@ using Tango.PPC.Common.UpdatePackages;
using Tango.PPC.Common.UWF;
using Tango.PPC.Common.Web;
using Tango.PPC.UI.Authentication;
+using Tango.PPC.UI.Bit;
using Tango.PPC.UI.Connectivity;
using Tango.PPC.UI.Modules;
using Tango.PPC.UI.Navigation;
@@ -102,6 +104,7 @@ namespace Tango.PPC.UI
TangoIOC.Default.Unregister<IRemoteActionsService>();
TangoIOC.Default.Unregister<IThreadLoadingService>();
TangoIOC.Default.Unregister<IDataStoreService>();
+ TangoIOC.Default.Unregister<IBitManager>();
if (App.StartupArgs != null && App.StartupArgs.Contains("-webDebug"))
{
@@ -146,6 +149,7 @@ namespace Tango.PPC.UI
TangoIOC.Default.Register<IRemoteActionsService, DefaultRemoteActionsService>();
TangoIOC.Default.Register<IThreadLoadingService, DefaultThreadLoadingService>();
TangoIOC.Default.Register<IDataStoreService, DefaultDataStoreService>();
+ TangoIOC.Default.Register<IBitManager, DefaultBitManager>();
TangoIOC.Default.Register<LoadingViewVM>();
TangoIOC.Default.Register<MainViewVM>();
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>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BitType.cs b/Software/Visual_Studio/Tango.BL/Entities/BitType.cs
index f91cf8751..dafb8f461 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/BitType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/BitType.cs
@@ -20,11 +20,17 @@ using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;
+using Tango.BL.Enumerations;
namespace Tango.BL.Entities
{
public class BitType : BitTypeBase
{
-
+ [NotMapped]
+ [JsonIgnore]
+ public BitTypes Type
+ {
+ get { return (BitTypes)Code; }
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 1c64933b2..1f8c34358 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -1803,12 +1803,27 @@ namespace Tango.Emulations.Emulators
{
BitResult result = new BitResult();
result.BitType = bitType;
- result.Passed = _rnd.Next(0, 100) > 50;
- if (!result.Passed)
+ var rnd = _rnd.Next(0, 100);
+
+ if (rnd < 25)
+ {
+ result.Status = BitResultStatus.Pending;
+ }
+ else if (rnd >= 25 && rnd < 50)
{
+ result.Status = BitResultStatus.Passed;
+ }
+ else if (rnd >= 50 && rnd < 75)
+ {
+ result.Status = BitResultStatus.Failed;
result.Description = "Emulator error message";
}
+ else if (rnd >= 75)
+ {
+ result.Status = BitResultStatus.Warning;
+ result.Description = "Emulator warning message";
+ }
response.Results.Add(result);
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/BitResultComposition.cs b/Software/Visual_Studio/Tango.Integration/Operation/BitResultComposition.cs
new file mode 100644
index 000000000..cbe6e5fa3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Operation/BitResultComposition.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.PMR.Diagnostics;
+
+namespace Tango.Integration.Operation
+{
+ public class BitResultComposition
+ {
+ public BL.Entities.BitType BitType { get; set; }
+ public BitResult BitResult { get; set; }
+
+ public int Priority
+ {
+ get { return GetBitStatusPriority(BitResult.Status); }
+ }
+
+ public static int GetBitStatusPriority(BitResultStatus status)
+ {
+ switch (status)
+ {
+ case BitResultStatus.Passed:
+ return 3;
+ case BitResultStatus.Pending:
+ return 2;
+ case BitResultStatus.Warning:
+ return 1;
+ case BitResultStatus.Failed:
+ return 0;
+ }
+
+ return 0;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
index 5ac394ade..ac7bc75c5 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
@@ -558,5 +558,11 @@ namespace Tango.Integration.Operation
/// <param name="ev">Type of the event.</param>
/// <param name="timeout">The timeout.</param>
void PushEmulatedEvent(Event ev, TimeSpan timeout);
+
+ /// <summary>
+ /// Gets the last machine built-in test results.
+ /// </summary>
+ /// <returns></returns>
+ Task<List<BitResultComposition>> GetBitResults(List<BL.Entities.BitType> bitTypes);
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 740fcb3c0..3bbbd2efe 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -86,6 +86,7 @@ namespace Tango.Integration.Operation
private DateTime? _jobHeatingStartDate;
private DateTime? _jobActualStartDate;
private List<Event> _emulatedEvents;
+ private List<BitResultComposition> _bitResults;
public static String EmbeddedLogsFolder { get; private set; }
public static String EmbeddedLogsTag { get; private set; }
@@ -135,6 +136,7 @@ namespace Tango.Integration.Operation
/// </summary>
public MachineOperator() : base()
{
+ _bitResults = new List<BitResultComposition>();
_emulatedEvents = new List<Event>();
ComponentName = $"Machine Operator {_component_counter++}";
DeviceInformation = new DeviceInformation();
@@ -1478,6 +1480,8 @@ namespace Tango.Integration.Operation
_debugSent = false;
_machineStatusSent = false;
+ _bitResults = null;
+
OnEnableDiagnosticsChanged(EnableDiagnostics);
OnEnableEmbeddedDebuggingChanged(EnableEmbeddedDebugging);
OnEnableEventsNotification(EnableEventsNotification);
@@ -4178,6 +4182,48 @@ namespace Tango.Integration.Operation
}
}
+ /// <summary>
+ /// Gets the last machine built-in test results.
+ /// </summary>
+ /// <returns></returns>
+ public async Task<List<BitResultComposition>> GetBitResults(List<BL.Entities.BitType> bitTypes)
+ {
+ if (_bitResults == null)
+ {
+ var response = await SendRequest<BitResultsRequest, BitResultsResponse>(new BitResultsRequest(), new TransportRequestConfig()
+ {
+ ShouldLog = true,
+ Timeout = TimeSpan.FromMinutes(1.5)
+ });
+
+ var compositions = new List<BitResultComposition>();
+
+ foreach (var bitType in bitTypes)
+ {
+ BitResultComposition composition = new BitResultComposition();
+ composition.BitType = bitType;
+ composition.BitResult = new BitResult() { BitType = (PMR.Diagnostics.BitType)bitType.Code };
+ compositions.Add(composition);
+ }
+
+ foreach (var bitResult in response.Message.Results)
+ {
+ var composition = compositions.SingleOrDefault(x => x.BitType.Code == bitResult.BitType.ToInt32());
+
+ if (composition != null)
+ {
+ composition.BitResult = bitResult;
+ }
+ }
+
+ compositions = compositions.OrderBy(x => x.Priority).ToList();
+
+ _bitResults = compositions;
+ }
+
+ return _bitResults;
+ }
+
#endregion
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
index c8771416a..7769a0433 100644
--- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
+++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
@@ -113,6 +113,7 @@
<Compile Include="JobRuns\IJobRunsLogger.cs" />
<Compile Include="Logging\EmbeddedLogFileParser.cs" />
<Compile Include="Operation\AdditionalJobConfiguration.cs" />
+ <Compile Include="Operation\BitResultComposition.cs" />
<Compile Include="Operation\CachedJobOperation.cs" />
<Compile Include="Operation\CartridgeValidationEventArgs.cs" />
<Compile Include="Operation\DefaultMachineEventsStateProvider.cs" />
@@ -222,7 +223,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<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/Tango.PMR/Diagnostics/BitResult.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs
index b0e0ce5e7..5660696df 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs
@@ -23,14 +23,15 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cg9CaXRSZXN1bHQucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGljcxoNQml0",
- "VHlwZS5wcm90byJhCglCaXRSZXN1bHQSLwoHQml0VHlwZRgBIAEoDjIeLlRh",
- "bmdvLlBNUi5EaWFnbm9zdGljcy5CaXRUeXBlEg4KBlBhc3NlZBgCIAEoCBIT",
- "CgtEZXNjcmlwdGlvbhgDIAEoCUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRp",
- "YWdub3N0aWNzYgZwcm90bzM="));
+ "VHlwZS5wcm90bxoVQml0UmVzdWx0U3RhdHVzLnByb3RvIokBCglCaXRSZXN1",
+ "bHQSLwoHQml0VHlwZRgBIAEoDjIeLlRhbmdvLlBNUi5EaWFnbm9zdGljcy5C",
+ "aXRUeXBlEjYKBlN0YXR1cxgCIAEoDjImLlRhbmdvLlBNUi5EaWFnbm9zdGlj",
+ "cy5CaXRSZXN1bHRTdGF0dXMSEwoLRGVzY3JpcHRpb24YAyABKAlCIQofY29t",
+ "LnR3aW5lLnRhbmdvLnBtci5kaWFnbm9zdGljc2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.BitTypeReflection.Descriptor, },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.BitTypeReflection.Descriptor, global::Tango.PMR.Diagnostics.BitResultStatusReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.BitResult), global::Tango.PMR.Diagnostics.BitResult.Parser, new[]{ "BitType", "Passed", "Description" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.BitResult), global::Tango.PMR.Diagnostics.BitResult.Parser, new[]{ "BitType", "Status", "Description" }, null, null, null)
}));
}
#endregion
@@ -62,7 +63,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public BitResult(BitResult other) : this() {
bitType_ = other.bitType_;
- passed_ = other.passed_;
+ status_ = other.status_;
description_ = other.description_;
}
@@ -82,14 +83,14 @@ namespace Tango.PMR.Diagnostics {
}
}
- /// <summary>Field number for the "Passed" field.</summary>
- public const int PassedFieldNumber = 2;
- private bool passed_;
+ /// <summary>Field number for the "Status" field.</summary>
+ public const int StatusFieldNumber = 2;
+ private global::Tango.PMR.Diagnostics.BitResultStatus status_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Passed {
- get { return passed_; }
+ public global::Tango.PMR.Diagnostics.BitResultStatus Status {
+ get { return status_; }
set {
- passed_ = value;
+ status_ = value;
}
}
@@ -118,7 +119,7 @@ namespace Tango.PMR.Diagnostics {
return true;
}
if (BitType != other.BitType) return false;
- if (Passed != other.Passed) return false;
+ if (Status != other.Status) return false;
if (Description != other.Description) return false;
return true;
}
@@ -127,7 +128,7 @@ namespace Tango.PMR.Diagnostics {
public override int GetHashCode() {
int hash = 1;
if (BitType != 0) hash ^= BitType.GetHashCode();
- if (Passed != false) hash ^= Passed.GetHashCode();
+ if (Status != 0) hash ^= Status.GetHashCode();
if (Description.Length != 0) hash ^= Description.GetHashCode();
return hash;
}
@@ -143,9 +144,9 @@ namespace Tango.PMR.Diagnostics {
output.WriteRawTag(8);
output.WriteEnum((int) BitType);
}
- if (Passed != false) {
+ if (Status != 0) {
output.WriteRawTag(16);
- output.WriteBool(Passed);
+ output.WriteEnum((int) Status);
}
if (Description.Length != 0) {
output.WriteRawTag(26);
@@ -159,8 +160,8 @@ namespace Tango.PMR.Diagnostics {
if (BitType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) BitType);
}
- if (Passed != false) {
- size += 1 + 1;
+ if (Status != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
}
if (Description.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
@@ -176,8 +177,8 @@ namespace Tango.PMR.Diagnostics {
if (other.BitType != 0) {
BitType = other.BitType;
}
- if (other.Passed != false) {
- Passed = other.Passed;
+ if (other.Status != 0) {
+ Status = other.Status;
}
if (other.Description.Length != 0) {
Description = other.Description;
@@ -197,7 +198,7 @@ namespace Tango.PMR.Diagnostics {
break;
}
case 16: {
- Passed = input.ReadBool();
+ status_ = (global::Tango.PMR.Diagnostics.BitResultStatus) input.ReadEnum();
break;
}
case 26: {
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResultStatus.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResultStatus.cs
new file mode 100644
index 000000000..2abeab630
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResultStatus.cs
@@ -0,0 +1,48 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: BitResultStatus.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Diagnostics {
+
+ /// <summary>Holder for reflection information generated from BitResultStatus.proto</summary>
+ public static partial class BitResultStatusReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for BitResultStatus.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static BitResultStatusReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChVCaXRSZXN1bHRTdGF0dXMucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGlj",
+ "cypDCg9CaXRSZXN1bHRTdGF0dXMSCwoHUGVuZGluZxAAEgoKBlBhc3NlZBAB",
+ "EgoKBkZhaWxlZBACEgsKB1dhcm5pbmcQA0IhCh9jb20udHdpbmUudGFuZ28u",
+ "cG1yLmRpYWdub3N0aWNzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Diagnostics.BitResultStatus), }, null));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum BitResultStatus {
+ [pbr::OriginalName("Pending")] Pending = 0,
+ [pbr::OriginalName("Passed")] Passed = 1,
+ [pbr::OriginalName("Failed")] Failed = 2,
+ [pbr::OriginalName("Warning")] Warning = 3,
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
index f54e0aa49..ec9e31f76 100644
--- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
+++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
@@ -107,6 +107,7 @@
<Compile Include="Diagnostics\BitResult.cs" />
<Compile Include="Diagnostics\BitResultsRequest.cs" />
<Compile Include="Diagnostics\BitResultsResponse.cs" />
+ <Compile Include="Diagnostics\BitResultStatus.cs" />
<Compile Include="Diagnostics\BitType.cs" />
<Compile Include="Diagnostics\Cartridge.cs" />
<Compile Include="Diagnostics\CartridgeAction.cs" />
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml
index eda50f8d6..60740cdfe 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchScrollViewer.xaml
@@ -68,10 +68,10 @@
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" Duration="00:00:01" FillBehavior="Stop">
+ <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" Duration="00:00:03" FillBehavior="Stop">
<EasingDoubleKeyFrame KeyTime="00:00:0.2" Value="1"></EasingDoubleKeyFrame>
- <DiscreteDoubleKeyFrame KeyTime="00:00:0.2" Value="1"></DiscreteDoubleKeyFrame>
- <EasingDoubleKeyFrame KeyTime="00:00:01" Value="0"></EasingDoubleKeyFrame>
+ <DiscreteDoubleKeyFrame KeyTime="00:00:2.5" Value="1"></DiscreteDoubleKeyFrame>
+ <EasingDoubleKeyFrame KeyTime="00:00:03" Value="0"></EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>