aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-12-17 15:18:56 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-12-17 15:18:56 +0200
commit2d148c9f0de61bc09fbab89341dc05b82e45f78a (patch)
tree459d49f94ce69a894630bed01e78089edcfa7076 /Software/Visual_Studio
parentb98fb311b28c8e36b7b44775c641083d501ef92a (diff)
downloadTango-2d148c9f0de61bc09fbab89341dc05b82e45f78a.tar.gz
Tango-2d148c9f0de61bc09fbab89341dc05b82e45f78a.zip
Implemented PPC DataGrid Tech style.
Changed auto update icon. Changed Backup and Restore module name. Implemented Updates & Synchronization Details View.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml74
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs22
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml84
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs21
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj16
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs32
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml245
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs17
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml88
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml65
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.pngbin2573 -> 2856 bytes
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs10
17 files changed, 472 insertions, 266 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs
index 0524e2f16..25cdfbb27 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs
@@ -25,7 +25,7 @@ namespace Tango.PPC.BackupRestore
{
get
{
- return "Backup/Restore";
+ return "Backup & Restore";
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml
new file mode 100644
index 000000000..37fa8b05c
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml
@@ -0,0 +1,74 @@
+<UserControl x:Class="Tango.PPC.Technician.Dialogs.SynchronizationDetailsView"
+ 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.Technician.Dialogs"
+ xmlns:converters="clr-namespace:Tango.PPC.Technician.Converters"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="560" Height="700" d:DataContext="{d:DesignInstance Type=local:SynchronizationDetailsViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid Margin="5">
+ <Grid Grid.RowSpan="2">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="60"/>
+ <RowDefinition Height="31*"/>
+ <RowDefinition Height="60"/>
+ </Grid.RowDefinitions>
+
+ <StackPanel Orientation="Horizontal" DataContext="{Binding Status}">
+ <touch:TouchIcon Width="42" Height="42" VerticalAlignment="Center">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon">
+ <Setter Property="Icon" Value="Information"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding State}" Value="Pending">
+ <Setter Property="Icon" Value="Pause"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding State}" Value="Synchronizing">
+ <Setter Property="Icon" Value="CloudSync"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding State}" Value="Failed">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding State}" Value="Completed">
+ <Setter Property="Icon" Value="Check"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoGreenBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ <TextBlock VerticalAlignment="Center" Text="{Binding Message}" TextWrapping="NoWrap" Height="22" TextTrimming="CharacterEllipsis" Width="500" Margin="10 0 0 0" FontSize="16"></TextBlock>
+ </StackPanel>
+
+ <Grid Grid.Row="1">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <controls:TableGrid RowHeight="30">
+ <TextBlock Text="Status:" FontWeight="SemiBold" />
+ <TextBlock Text="{Binding Status.State,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
+ <TextBlock Text="Start Time:" FontWeight="SemiBold" />
+ <TextBlock Text="{Binding Status.StartDateTime,Converter={StaticResource DateTimeUTCToStringConverter},ConverterParameter='MM/dd/yyyy HH:mm:ss'}"></TextBlock>
+ <TextBlock Text="Duration:" FontWeight="SemiBold" />
+ <TextBlock Text="{Binding Status.Duration,StringFormat='hh\\:mm\\:ss\\.fff'}"></TextBlock>
+ </controls:TableGrid>
+ </Grid>
+
+ <Border Padding="5" BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}">
+ <TextBox BorderThickness="0" Text="{Binding Status.ErrorReason,TargetNullValue='No further Information available.'}" Style="{x:Null}" TextWrapping="Wrap" IsReadOnly="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden" Background="Transparent" />
+ </Border>
+ </DockPanel>
+ </Grid>
+
+ <Grid Grid.Row="2">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" HorizontalAlignment="Right" Width="170" VerticalAlignment="Bottom" CornerRadius="25" Height="50" Command="{Binding CloseCommand}">CLOSE</touch:TouchButton>
+ </Grid>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs
new file mode 100644
index 000000000..40f7a536c
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.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.Technician.Dialogs
+{
+ /// <summary>
+ /// Interaction logic for LogItemDetailsView.xaml
+ /// </summary>
+ public partial class SynchronizationDetailsView : UserControl
+ {
+ public SynchronizationDetailsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs
new file mode 100644
index 000000000..392c8dd3a
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.Logging;
+using Tango.PPC.Common.Synchronization;
+using Tango.SharedUI;
+
+namespace Tango.PPC.Technician.Dialogs
+{
+ public class SynchronizationDetailsViewVM : DialogViewVM
+ {
+ private SynchronizationStatus _status;
+ public SynchronizationStatus Status
+ {
+ get { return _status; }
+ set { _status = value; RaisePropertyChangedAuto(); }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml
new file mode 100644
index 000000000..1f0f57be0
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml
@@ -0,0 +1,84 @@
+<UserControl x:Class="Tango.PPC.Technician.Dialogs.UpdateDetailsView"
+ 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.Technician.Dialogs"
+ xmlns:converters="clr-namespace:Tango.PPC.Technician.Converters"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="560" Height="700" d:DataContext="{d:DesignInstance Type=local:UpdateDetailsViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid Margin="5">
+ <Grid Grid.RowSpan="2">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="60"/>
+ <RowDefinition Height="31*"/>
+ <RowDefinition Height="60"/>
+ </Grid.RowDefinitions>
+
+ <StackPanel Orientation="Horizontal" DataContext="{Binding Update}">
+ <touch:TouchIcon Width="42" Height="42" VerticalAlignment="Center">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon">
+ <Setter Property="Icon" Value="Information"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSetup}" Value="True">
+ <Setter Property="Icon" Value="Settings"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsUpdate}" Value="True">
+ <Setter Property="Icon" Value="CloudDownload"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsDataBase}" Value="True">
+ <Setter Property="Icon" Value="Database"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsSynchronization}" Value="True">
+ <Setter Property="Icon" Value="Sync"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsOfflineUpdate}" Value="True">
+ <Setter Property="Icon" Value="Sd"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsStarted}" Value="True">
+ <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsCompleted}" Value="True">
+ <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsFailed}" Value="True">
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ <TextBlock VerticalAlignment="Center" Text="{Binding UpdateStatus,Converter={StaticResource EnumToDescriptionConverter}}" TextWrapping="NoWrap" Height="22" TextTrimming="CharacterEllipsis" Width="500" Margin="10 0 0 0" FontSize="16"></TextBlock>
+ </StackPanel>
+
+ <Grid Grid.Row="1">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <controls:TableGrid RowHeight="30">
+ <TextBlock Text="Started On:" FontWeight="SemiBold" />
+ <TextBlock Text="{Binding Update.StartDate,Converter={StaticResource DateTimeUTCToStringConverter},ConverterParameter='MM/dd/yyyy HH:mm:ss'}"></TextBlock>
+ <TextBlock Text="Application:" FontWeight="SemiBold" />
+ <TextBlock Text="{Binding Update.ApplicationVersion}"></TextBlock>
+ <TextBlock Text="Firmware:" FontWeight="SemiBold" />
+ <TextBlock Text="{Binding Update.FirmwareVersion}"></TextBlock>
+ <TextBlock Text="Ended:" FontWeight="SemiBold" />
+ <TextBlock Text="{Binding Update.EndDate,TargetNullValue='Never',FallbackValue='Never',Converter={StaticResource DateTimeUTCToStringConverter},ConverterParameter='MM/dd/yyyy HH:mm:ss'}"></TextBlock>
+ </controls:TableGrid>
+ </Grid>
+
+ <Border Padding="5" BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}">
+ <TextBox BorderThickness="0" Text="{Binding Update.FailedLog,TargetNullValue='No further Information available.'}" Style="{x:Null}" TextWrapping="Wrap" IsReadOnly="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden" Background="Transparent" />
+ </Border>
+ </DockPanel>
+ </Grid>
+
+ <Grid Grid.Row="2">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" HorizontalAlignment="Right" Width="170" VerticalAlignment="Bottom" CornerRadius="25" Height="50" Command="{Binding CloseCommand}">CLOSE</touch:TouchButton>
+ </Grid>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs
new file mode 100644
index 000000000..f2a06aedf
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.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.Technician.Dialogs
+{
+ /// <summary>
+ /// Interaction logic for LogItemDetailsView.xaml
+ /// </summary>
+ public partial class UpdateDetailsView : UserControl
+ {
+ public UpdateDetailsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs
new file mode 100644
index 000000000..36c0fc6d7
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.Logging;
+using Tango.SharedUI;
+
+namespace Tango.PPC.Technician.Dialogs
+{
+ public class UpdateDetailsViewVM : DialogViewVM
+ {
+ private TangoUpdate _update;
+ public TangoUpdate Update
+ {
+ get { return _update; }
+ set { _update = value; RaisePropertyChangedAuto(); }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj
index b6502e417..bdbc5992c 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj
@@ -72,10 +72,18 @@
<Compile Include="Dialogs\EmbeddedLogItemDetailsView.xaml.cs">
<DependentUpon>EmbeddedLogItemDetailsView.xaml</DependentUpon>
</Compile>
+ <Compile Include="Dialogs\SynchronizationDetailsView.xaml.cs">
+ <DependentUpon>SynchronizationDetailsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Dialogs\UpdateDetailsView.xaml.cs">
+ <DependentUpon>UpdateDetailsView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Dialogs\LogItemDetailsView.xaml.cs">
<DependentUpon>LogItemDetailsView.xaml</DependentUpon>
</Compile>
<Compile Include="Dialogs\EmbeddedLogItemDetailsViewVM.cs" />
+ <Compile Include="Dialogs\SynchronizationDetailsViewVM.cs" />
+ <Compile Include="Dialogs\UpdateDetailsViewVM.cs" />
<Compile Include="Dialogs\LogItemDetailsViewVM.cs" />
<Compile Include="Models\DispenserController.cs" />
<Compile Include="TechnicianModule.cs" />
@@ -191,6 +199,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Dialogs\SynchronizationDetailsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Dialogs\UpdateDetailsView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Dialogs\LogItemDetailsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs
index b7634ff95..89ac7e87b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs
@@ -210,8 +210,6 @@ namespace Tango.PPC.Technician.ViewModels
Log = SelectedLog,
});
}
-
- SelectedLog = null;
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs
index 91bbcba0e..3f4232252 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs
@@ -10,6 +10,8 @@ using Tango.BL.Enumerations;
using Tango.Core.Commands;
using Tango.PPC.Common;
using System.Data.Entity;
+using Tango.PPC.Technician.Dialogs;
+using Tango.PPC.Common.Synchronization;
namespace Tango.PPC.Technician.ViewModels
{
@@ -24,6 +26,20 @@ namespace Tango.PPC.Technician.ViewModels
set { _updates = value; RaisePropertyChangedAuto(); }
}
+ private TangoUpdate _selectedUpdate;
+ public TangoUpdate SelectedUpdate
+ {
+ get { return _selectedUpdate; }
+ set { _selectedUpdate = value; OnSelectedUpdateChanged(); }
+ }
+
+ private SynchronizationStatus _selectedSynchronization;
+ public SynchronizationStatus SelectedSynchronization
+ {
+ get { return _selectedSynchronization; }
+ set { _selectedSynchronization = value; OnSelectedSynchronizationChanged(); }
+ }
+
public UpdatesViewVM()
{
Updates = new List<TangoUpdate>();
@@ -71,5 +87,21 @@ namespace Tango.PPC.Technician.ViewModels
LogManager.Log(ex, "Error loading update history.");
}
}
+
+ private async void OnSelectedUpdateChanged()
+ {
+ if (SelectedUpdate != null)
+ {
+ await NotificationProvider.ShowDialog<UpdateDetailsViewVM>(new UpdateDetailsViewVM() { Update = SelectedUpdate });
+ }
+ }
+
+ private async void OnSelectedSynchronizationChanged()
+ {
+ if (SelectedSynchronization != null)
+ {
+ await NotificationProvider.ShowDialog<SynchronizationDetailsViewVM>(new SynchronizationDetailsViewVM() { Status = SelectedSynchronization });
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml
index a48c80a52..0eab521e1 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml
@@ -97,9 +97,9 @@
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="../Images/sync.png" Width="80" Height="80" />
<StackPanel Margin="10 0 0 0">
- <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Updates</TextBlock>
+ <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Updates &amp; Synchronization</TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580">
- View the current status and history of update operations.
+ View the current status and history of update and synchronization operations.
</TextBlock>
</StackPanel>
</StackPanel>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml
index 600bcfc98..07db49909 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml
@@ -34,7 +34,7 @@
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<StackPanel Orientation="Horizontal">
- <touch:TouchNavigationLinks x:Name="nav" Margin="20" FontSize="{StaticResource TangoNavigationLinksFontSize}" SelectionChanged="TouchNavigationLinks_SelectionChanged">
+ <touch:TouchNavigationLinks x:Name="nav" Margin="20" FontSize="{StaticResource TangoNavigationLinksFontSize}">
<sys:String>Application</sys:String>
<sys:String>Embedded</sys:String>
</touch:TouchNavigationLinks>
@@ -53,165 +53,90 @@
</DockPanel>
<Grid Margin="20">
- <touch:TouchSimpleDataGrid x:Name="gridApplication" 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" IsReadOnly="True" ItemsSource="{Binding ApplicationLogsViewSource}" SelectedItem="{Binding SelectedLog}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" 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.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.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 TangoPrimaryAccentBrush}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.CellStyle>
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="" Width="50">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <touch:TouchIcon Width="16">
- <touch:TouchIcon.Style>
- <Style TargetType="touch:TouchIcon">
- <Setter Property="Icon" Value="InformationOutline"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Category}" Value="Warning">
- <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter>
- <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Error">
- <Setter Property="Icon" Value="Alert"></Setter>
- <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Critical">
- <Setter Property="Icon" Value="Alert"></Setter>
- <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </touch:TouchIcon.Style>
- </touch:TouchIcon>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" />
- <DataGridTemplateColumn Header="Message" Width="1*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </touch:TouchSimpleDataGrid>
-
- <touch:TouchSimpleDataGrid x:Name="gridEmbedded" Visibility="Hidden" 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" IsReadOnly="True" ItemsSource="{Binding EmbeddedLogsViewSource}" SelectedItem="{Binding SelectedLog}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" 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.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.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 TangoPrimaryAccentBrush}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.CellStyle>
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="" Width="50">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <touch:TouchIcon Width="16">
- <touch:TouchIcon.Style>
- <Style TargetType="touch:TouchIcon">
- <Setter Property="Icon" Value="InformationOutline"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Category}" Value="Warning">
- <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter>
- <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Error">
- <Setter Property="Icon" Value="Alert"></Setter>
- <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Critical">
- <Setter Property="Icon" Value="Alert"></Setter>
- <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </touch:TouchIcon.Style>
- </touch:TouchIcon>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" />
- <DataGridTemplateColumn Header="Message" Width="1*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </touch:TouchSimpleDataGrid>
+ <TabControl Padding="0" BorderThickness="0" Margin="0 10 0 0" Background="Transparent" SelectedIndex="{Binding ElementName=nav,Path=SelectedIndex,Mode=OneWay}">
+ <TabItem Header="Application" Visibility="Collapsed">
+ <touch:TouchSimpleDataGrid x:Name="gridApplication" Style="{StaticResource TechGrid}" ItemsSource="{Binding ApplicationLogsViewSource}" SelectedItem="{Binding SelectedLog}">
+ <DataGrid.Columns>
+ <DataGridTemplateColumn Header="" Width="50">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <touch:TouchIcon Width="16">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon">
+ <Setter Property="Icon" Value="InformationOutline"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Category}" Value="Warning">
+ <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Category}" Value="Error">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Category}" Value="Critical">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" />
+ <DataGridTemplateColumn Header="Message" Width="1*">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ </DataGrid.Columns>
+ </touch:TouchSimpleDataGrid>
+ </TabItem>
+ <TabItem Header="Embedded" Visibility="Collapsed">
+ <touch:TouchSimpleDataGrid x:Name="gridEmbedded" Style="{StaticResource TechGrid}" ItemsSource="{Binding EmbeddedLogsViewSource}" SelectedItem="{Binding SelectedLog}">
+ <DataGrid.Columns>
+ <DataGridTemplateColumn Header="" Width="50">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <touch:TouchIcon Width="16">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon">
+ <Setter Property="Icon" Value="InformationOutline"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Category}" Value="Warning">
+ <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Category}" Value="Error">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Category}" Value="Critical">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" />
+ <DataGridTemplateColumn Header="Message" Width="1*">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ </DataGrid.Columns>
+ </touch:TouchSimpleDataGrid>
+ </TabItem>
+ </TabControl>
</Grid>
</DockPanel>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs
index a8a807590..9c12f7f13 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs
@@ -24,22 +24,5 @@ namespace Tango.PPC.Technician.Views
{
InitializeComponent();
}
-
- private void TouchNavigationLinks_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (IsLoaded)
- {
- if (nav.SelectedIndex == 0)
- {
- gridApplication.Visibility = Visibility.Visible;
- gridEmbedded.Visibility = Visibility.Hidden;
- }
- else
- {
- gridApplication.Visibility = Visibility.Hidden;
- gridEmbedded.Visibility = Visibility.Visible;
- }
- }
- }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml
index fa5db97e9..df2e2d65f 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml
@@ -26,59 +26,19 @@
<Border.Effect>
<DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
</Border.Effect>
- <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Updates</TextBlock>
+ <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Updates &amp; Synchronization</TextBlock>
</Border>
<Grid Grid.Row="1" Margin="15">
<DockPanel>
<touch:TouchNavigationLinks x:Name="nav" DockPanel.Dock="Top" FontSize="{StaticResource TangoTitleFontSize}">
- <sys:String>Software Updates</sys:String>
+ <sys:String>Updates</sys:String>
<sys:String>Synchronization</sys:String>
</touch:TouchNavigationLinks>
<TabControl Padding="0" BorderThickness="0" Margin="0 10 0 0" Background="Transparent" SelectedIndex="{Binding ElementName=nav,Path=SelectedIndex,Mode=OneWay}">
<TabItem Visibility="Collapsed" Header="Software Updates">
- <touch:TouchSimpleDataGrid 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" IsReadOnly="True" ItemsSource="{Binding Updates}" SelectedItem="{Binding SelectedUpdate}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" 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.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.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 TangoPrimaryAccentBrush}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.CellStyle>
+ <touch:TouchSimpleDataGrid Style="{StaticResource TechGrid}" ItemsSource="{Binding Updates}" SelectedItem="{Binding SelectedUpdate}">
<DataGrid.Columns>
<DataGridTemplateColumn Header="" Width="50">
<DataGridTemplateColumn.CellTemplate>
@@ -142,47 +102,7 @@
</DockPanel>
<Grid>
- <touch:TouchSimpleDataGrid 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" IsReadOnly="True" ItemsSource="{Binding MachineDataSynchronizer.StatusHistory}" SelectedItem="{Binding SelectedStatus}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" 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.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.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 TangoPrimaryAccentBrush}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.CellStyle>
+ <touch:TouchSimpleDataGrid Style="{StaticResource TechGrid}" ItemsSource="{Binding MachineDataSynchronizer.StatusHistory}" SelectedItem="{Binding SelectedSynchronization}">
<DataGrid.Columns>
<DataGridTemplateColumn Header="" Width="50">
<DataGridTemplateColumn.CellTemplate>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml
index 426372688..317b2f13f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml
@@ -44,4 +44,69 @@
<Setter Property="ItemContainerStyle" Value="{StaticResource BlankListBoxItem}"></Setter>
</Style>
+ <Style TargetType="touch:TouchSimpleDataGrid" x:Key="TechGrid" BasedOn="{StaticResource {x:Type touch:TouchSimpleDataGrid}}">
+ <Style.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>
+ </Style.Resources>
+ <Setter Property="RowStyle">
+ <Setter.Value>
+ <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>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="CellStyle">
+ <Setter.Value>
+ <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 TangoPrimaryAccentBrush}" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Setter.Value>
+ </Setter>
+
+ <Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter>
+ <Setter Property="AutoGenerateColumns" Value="False"></Setter>
+ <Setter Property="SelectionUnit" Value="FullRow"></Setter>
+ <Setter Property="SelectionMode" Value="Single"></Setter>
+ <Setter Property="BorderBrush" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+ <Setter Property="HeadersVisibility" Value="Column"></Setter>
+ <Setter Property="CanUserAddRows" Value="True"></Setter>
+ <Setter Property="CanUserDeleteRows" Value="False"></Setter>
+ <Setter Property="CanUserReorderColumns" Value="False"></Setter>
+ <Setter Property="CanUserResizeColumns" Value="False"></Setter>
+ <Setter Property="CanUserSortColumns" Value="False"></Setter>
+ <Setter Property="IsReadOnly" Value="True"></Setter>
+ <Setter Property="VerticalGridLinesBrush" Value="{x:Null}"></Setter>
+ <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource TangoGrayBrush}"></Setter>
+ <Setter Property="RowHeight" Value="50"></Setter>
+ <Setter Property="VerticalScrollBarVisibility" Value="Visible"></Setter>
+ <Setter Property="HorizontalScrollBarVisibility" Value="Disabled"></Setter>
+ </Style>
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png
index cafcf1d83..c95dfa015 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png
Binary files differ
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs
index 7cc2f3d2a..c0b455a55 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs
@@ -14,5 +14,15 @@ namespace Tango.Touch.Controls
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchSimpleDataGrid), new FrameworkPropertyMetadata(typeof(TouchSimpleDataGrid)));
}
+
+ public TouchSimpleDataGrid()
+ {
+ SelectionChanged += TouchSimpleDataGrid_SelectionChanged;
+ }
+
+ private void TouchSimpleDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ SelectedItem = null;
+ }
}
}