aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-07 18:19:55 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-07 18:19:55 +0300
commite051d309be2153f60b32c12022cfd0fe8f2ab913 (patch)
tree0adf3223bb68acc5f88204ceaa3d727b8d067906 /Software/Visual_Studio/PPC
parent7ec6d80f838749faa39fec5eb838a34ebdd3e411 (diff)
downloadTango-e051d309be2153f60b32c12022cfd0fe8f2ab913.tar.gz
Tango-e051d309be2153f60b32c12022cfd0fe8f2ab913.zip
Working on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/MessageBox.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs9
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml52
3 files changed, 51 insertions, 12 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/MessageBox.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/MessageBox.xaml
index 07d3b11ac..b1fe7ddcc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/MessageBox.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/MessageBox.xaml
@@ -15,7 +15,7 @@
<DropShadowEffect BlurRadius="10" />
</Border.Effect>
- <Grid>
+ <Grid ClipToBounds="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="75*"/>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs
index 2af15b1ad..75ef7a2ac 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs
@@ -51,6 +51,8 @@ namespace Tango.PPC.UI.ViewModels
public RelayCommand<DropEventArgs> OnDragAndDropCommand { get; set; }
+ public RelayCommand<Job> RemoveJobCommand { get; set; }
+
private void OnDragAndDropJobs(Job draggedJob, Job droppedJob)
{
Debug.WriteLine(draggedJob.Name + " Dragged on to " + droppedJob.Name);
@@ -92,6 +94,13 @@ namespace Tango.PPC.UI.ViewModels
OnDragAndDropJobs(draggedJob, droppedJob);
});
+
+ RemoveJobCommand = new RelayCommand<Job>(RemoveJob);
+ }
+
+ private void RemoveJob(Job job)
+ {
+ NotificationProvider.ShowQuestion("Are you sure you want to remove " + job.Name);
}
public override void OnApplicationStarted()
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml
index c67d09445..3e54d45f3 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml
@@ -43,12 +43,6 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Height="57" Margin="0 -28 30 0">
- <touch:TouchIconButton Margin="0 0 30 0" Padding="20" Icon="Plus" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
- <touch:TouchIconButton Margin="0 0 30 0" Padding="20" Icon="Copy" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
- <touch:TouchIconButton Padding="20" Icon="Refresh" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
- </StackPanel>
-
<touch:TouchNavigationLinks VerticalAlignment="Bottom" Margin="20" FontSize="{StaticResource TangoNavigationLinksFontSize}">
<sys:String>READY TO DYE</sys:String>
<sys:String>NOT READY</sys:String>
@@ -57,6 +51,16 @@
<Grid Grid.Row="1">
<touch:TouchDataGrid x:Name="dataGridJobs" OnDragAndDropCommand="{Binding OnDragAndDropCommand}" ItemSelectedCommand="{Binding JobSelectedCommand}" ItemsSource="{Binding JobsCollectionView}" Margin="10" EnableDropShadow="True" ShadowColor="#ECECEC" AutoGenerateColumns="False" RowHeight="68" ColumnHeaderHeight="67">
+ <touch:TouchDataGrid.SlideContentTemplate>
+ <DataTemplate>
+ <Grid Height="67">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIconButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveJobCommand}" CommandParameter="{Binding}" RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleCentered="True" RippleFactor="1" EnableDropShadow="False" Icon="TrashOutline" CornerRadius="25" Padding="15" Foreground="DimGray" Margin="5" />
+ <touch:TouchIconButton RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleCentered="True" RippleFactor="1" EnableDropShadow="False" Icon="Copy" CornerRadius="25" Padding="15" Foreground="DimGray" Margin="5" />
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+ </touch:TouchDataGrid.SlideContentTemplate>
<touch:TouchDataGrid.Columns>
<DataGridTemplateColumn>
<DataGridTemplateColumn.Header>
@@ -68,17 +72,41 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
- <DataGridTextColumn Width="90" Header="Status" Binding="{Binding JobStatus,Converter={StaticResource EnumToDescriptionConverter}}"></DataGridTextColumn>
- <DataGridTextColumn Width="240" Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
- <DataGridTextColumn Width="117" Header="Length (m)" Binding="{Binding Length,StringFormat=0.0}"></DataGridTextColumn>
+ <DataGridTemplateColumn Width="90" Header="Status" SortMemberPath="JobStatus">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock IsHitTestVisible="False" Text="{Binding JobStatus,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn Width="240" Header="Name" SortMemberPath="Name">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock IsHitTestVisible="False" Text="{Binding Name}"></TextBlock>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn Width="117" Header="Length (m)" SortMemberPath="Length">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock IsHitTestVisible="False" Text="{Binding Length,StringFormat=0.0}"></TextBlock>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
<DataGridTemplateColumn Header="Colors" SortMemberPath="Segments.Count" Width="85">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
- <ContentControl Content="{Binding Segments,Converter={StaticResource SegmentsToPieConverter}}" Width="23" Height="23" HorizontalAlignment="Left"></ContentControl>
+ <ContentControl IsHitTestVisible="False" Content="{Binding Segments,Converter={StaticResource SegmentsToPieConverter}}" Width="23" Height="23" HorizontalAlignment="Left"></ContentControl>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn Width="100" Header="Updated" SortMemberPath="LastUpdated">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock IsHitTestVisible="False" Text="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
- <DataGridTextColumn Width="100" Header="Updated" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></DataGridTextColumn>
<DataGridTemplateColumn x:Name="userSortColumn" SortMemberPath="JobIndex" SortDirection="{x:Null}" Width="78" CanUserSort="False">
<DataGridTemplateColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
@@ -126,6 +154,8 @@
</touch:TouchDataGrid>
<TextBox VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="100" Width="200" keyboard:KeyboardView.Mode="Alpha"></TextBox>
+
+ <touch:TouchIconButton HorizontalAlignment="Right" Width="100" Height="100" Margin="40" VerticalAlignment="Bottom" Padding="30" Icon="Plus" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
</Grid>
</Grid>
</Grid>