aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy@twine-s.com>2020-12-30 15:11:34 +0000
committerRoy Ben Shabat <Roy@twine-s.com>2020-12-30 15:11:34 +0000
commitd33c19b3ac6803de4b5c8d475832efef131c1a45 (patch)
treeea725abc39def99a755b041c13cba1fe0d594ddc /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs
parent1bdcaa9f51303bbff682507f31fb3b4414692ca4 (diff)
downloadTango-d33c19b3ac6803de4b5c8d475832efef131c1a45.tar.gz
Tango-d33c19b3ac6803de4b5c8d475832efef131c1a45.zip
Revert "Hope it is fine"
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml5
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs319
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml3
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml3
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs12
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml68
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml9
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpgbin0 -> 27097 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpgbin0 -> 10743 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.pngbin0 -> 1171 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.pngbin0 -> 4127 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.pngbin0 -> 6743 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs32
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs108
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs37
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs149
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs186
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs66
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml138
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml321
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs16
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml14
30 files changed, 1220 insertions, 364 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml
index cdc28335d..16c6a42be 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppBarItems/JobProgressAppBarItemView.xaml
@@ -5,11 +5,12 @@
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.Jobs.AppBarItems"
- mc:Ignorable="d" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:JobProgressAppBarItem, IsDesignTimeCreatable=False}">
+ mc:Ignorable="d"
+ d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:JobProgressAppBarItem, IsDesignTimeCreatable=False}">
<Grid>
<touch:TouchButton Style="{StaticResource TangoFlatButton}" Command="{Binding PressedCommand}" Padding="0">
<StackPanel VerticalAlignment="Center">
- <TextBlock Text="{Binding MachineProvider.MachineOperator.RunningJob.Name,FallbackValue='Job Name'}" FontSize="{StaticResource TangoTitleFontSize}"></TextBlock>
+ <TextBlock Text="{Binding MachineProvider.MachineOperator.RunningJob.Name,FallbackValue='Job Name'}" FontSize="{StaticResource TangoTitleFontSize}" TextTrimming="CharacterEllipsis"></TextBlock>
<ProgressBar Maximum="{Binding MachineProvider.MachineOperator.RunningJobStatus.TotalProgressMinusSettingUp}" Value="{Binding MachineProvider.MachineOperator.RunningJobStatus.ProgressMinusSettingUp}" Margin="0 10 0 5" Background="{StaticResource TangoGrayBrush}" Height="5" Foreground="{StaticResource TangoPrimaryAccentBrush}" BorderThickness="0" />
<DockPanel LastChildFill="False">
<TextBlock DockPanel.Dock="Left">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
index 001888c92..4d6050639 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
@@ -15,12 +15,12 @@ namespace Tango.PPC.Jobs.AppButtons
{
op.StatusChanged += Op_StatusChanged;
- Op_StatusChanged(this, op.Status);
+ Op_StatusChanged(op, op.Status);
}
private void Op_StatusChanged(object sender, MachineStatuses status)
{
- IsEnabled = status == MachineStatuses.ReadyToDye;
+ IsEnabled = (sender as IMachineOperator).CanPrint;
}
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs
new file mode 100644
index 000000000..78f8c90a1
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs
@@ -0,0 +1,319 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows.Shapes;
+using Tango.PMR.Printing;
+using Tango.Touch.Controls;
+
+namespace Tango.PPC.Jobs
+{
+ public class JobOutlineControl : Control
+ {
+ #region Members
+
+ private Size _sizeControl = new Size(0, 0);
+ ScrollViewer _parentScrollViewer = null;
+ public struct LevelOffset
+ {
+ public const double level_0 = 0.0;
+ public const double level_1 = 10.0;
+ public const double level_2 = 20.0;
+ public const double level_3 = 37.0;
+ public const double level_4 = 50.0;
+ public const double level_5 = 60.0;
+ public const double level_6 = 77.0;
+ public const double level_7 = 90.0;
+ public const double level_8 = 100.0;
+ }
+ private double _verticalOffset = 0;
+ private double _viewportHeight = 0;
+ private const double HEADER_FONT_HEIGHT = 35;
+ private const double TITLE_FONT_HEIGHT = 22;
+ private const double SUB_TITLE_FONT_HEIGHT = 19;
+ private const double NORMAL_FONT_HEIGHT = 17;
+ private const double WIDTH = 330;
+
+ #endregion members
+
+ public JobOutlineControl() : base()
+ {
+ Unloaded += JobOutlineControl_Unloaded;
+ DataContextChanged += JobOutlineControl_DataContextChanged;
+ Width = WIDTH;
+ }
+
+ private void JobOutlineControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ if (DataContext == null)
+ {
+ return;
+ }
+
+ if (_parentScrollViewer != null)
+ {
+ _parentScrollViewer.ScrollToTop();
+ }
+
+ InvalidateVisual();
+ }
+
+ #region events
+ private void JobOutlineControl_Unloaded(object sender, RoutedEventArgs e)
+ {
+ if (_parentScrollViewer != null)
+ {
+ _parentScrollViewer.ScrollChanged -= ScrollViewer_ScrollChanged;
+ }
+ }
+
+ private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
+ {
+ if (e.VerticalChange == 0.0)
+ return;
+
+ _verticalOffset = _parentScrollViewer.VerticalOffset;
+ _viewportHeight = _parentScrollViewer.ViewportHeight;
+ InvalidateVisual();
+ }
+ #endregion events
+
+ #region render
+ protected override void OnRender(DrawingContext drawingContext)
+ {
+ base.OnRender(drawingContext);
+
+ if (!(DataContext is JobTicket job)) return;
+ if (_parentScrollViewer == null)
+ {
+ _parentScrollViewer = this.FindAncestor<ScrollViewer>();
+ _parentScrollViewer.ScrollChanged += ScrollViewer_ScrollChanged;
+ }
+ else if (_viewportHeight == 0)
+ {
+ _viewportHeight = _parentScrollViewer.ActualHeight;
+ }
+ _sizeControl = new Size();
+ _sizeControl.Height += 10;
+ DrawHeaderText(drawingContext, "JOB OUTLINE", 30, LevelOffset.level_0);
+ _sizeControl.Height += HEADER_FONT_HEIGHT;
+
+ _sizeControl.Height += 20;
+ DrawHeaderText(drawingContext, "BASIC", 17, LevelOffset.level_0);
+ _sizeControl.Height += TITLE_FONT_HEIGHT;
+ _sizeControl.Height += 5.0;
+ var basicProps = GetNameValueList(job);
+ foreach (var prop in basicProps)
+ {
+ DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Pencil);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ //JobTicket.Spool
+ if (job.Spool != null)
+ {
+ _sizeControl.Height += 20;
+ DrawHeaderText(drawingContext, "SPOOL", 17, LevelOffset.level_0);
+ _sizeControl.Height += TITLE_FONT_HEIGHT;
+ _sizeControl.Height += 5.0;
+ basicProps = GetNameValueList(job.Spool);
+ foreach (var prop in basicProps)
+ {
+ DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Pencil);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ }
+ //JobTicket.ProcessParameters
+ if (job.ProcessParameters != null)
+ {
+ _sizeControl.Height += 20;
+ DrawHeaderText(drawingContext, "PROCESS PARAMETERS", 17, LevelOffset.level_0);
+ _sizeControl.Height += TITLE_FONT_HEIGHT;
+ _sizeControl.Height += 5.0;
+ basicProps = GetNameValueList(job.ProcessParameters);
+ foreach (var prop in basicProps)
+ {
+ DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ }
+ //JobTicket.ThreadParameters
+ if (job.ThreadParameters != null)
+ {
+ _sizeControl.Height += 20;
+ DrawHeaderText(drawingContext, "THREAD PARAMETERS", 17, LevelOffset.level_0);
+ _sizeControl.Height += TITLE_FONT_HEIGHT;
+ _sizeControl.Height += 5.0;
+ basicProps = GetNameValueList(job.ThreadParameters);
+ foreach (var prop in basicProps)
+ {
+ DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ }
+ //JobTicket.HeadCleaningParameters
+ if (job.HeadCleaningParameters != null)
+ {
+ _sizeControl.Height += 20;
+ DrawHeaderText(drawingContext, "HEAD CLEANING PARAMETERS", 17, LevelOffset.level_0);
+ _sizeControl.Height += TITLE_FONT_HEIGHT;
+ _sizeControl.Height += 5.0;
+ basicProps = GetNameValueList(job.HeadCleaningParameters);
+ foreach (var prop in basicProps)
+ {
+ DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ }
+ //JobTicket.Segments
+ if (job.Segments != null)
+ {
+ _sizeControl.Height += 20;
+ DrawHeaderText(drawingContext, "SEGMENTS", 17, LevelOffset.level_0);
+ _sizeControl.Height += TITLE_FONT_HEIGHT;
+ _sizeControl.Height += 10.0;
+ int index = 0;
+ foreach (JobSegment seg in job.Segments)
+ {
+ DrawHeaderText(drawingContext, string.Format("#{0} SEGMENT", ++index), 14, LevelOffset.level_1);
+ _sizeControl.Height += SUB_TITLE_FONT_HEIGHT;
+ basicProps = GetNameValueList(seg);
+ foreach (var prop in basicProps)
+ {
+ DrawNameValueText(drawingContext, prop, LevelOffset.level_2, TouchIconKind.Pencil);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ //BrushStops
+ DrawHeaderText(drawingContext, "BRUSH STOPS", 12, LevelOffset.level_3);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ int indexBrush = 0;
+ foreach (JobBrushStop brushstop in seg.BrushStops)
+ {
+ _sizeControl.Height += 5.0;
+ DrawHeaderText(drawingContext, string.Format("#{0} STOP", ++indexBrush), 11, LevelOffset.level_4);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ var brushStops = GetNameValueList(brushstop);
+ foreach (var brushstopprop in brushStops)
+ {
+ DrawNameValueText(drawingContext, brushstopprop, LevelOffset.level_5, TouchIconKind.Pencil);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ DrawHeaderText(drawingContext, "DISPENSERS", 12, LevelOffset.level_6);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ _sizeControl.Height += 5.0;
+ int indexDispenser = 0;
+ foreach (JobDispenser disp in brushstop.Dispensers)
+ {
+ DrawHeaderText(drawingContext, string.Format("#{0} DISPENSER", ++indexDispenser), 11, LevelOffset.level_6);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ var dispProperties = GetNameValueList(disp);
+ foreach (var dispprop in dispProperties)
+ {
+ DrawNameValueText(drawingContext, dispprop, LevelOffset.level_7, TouchIconKind.ArrowRightBoldCircle);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ }
+ }
+ }
+ }
+
+ if (Height != _sizeControl.Height)
+ {
+ Height = _sizeControl.Height;
+ }
+ }
+ public IEnumerable<Tuple<String, String>> GetNameValueList(object value)
+ {
+ if (value != null)
+ {
+ var properties = value.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => (!x.PropertyType.IsClass && !typeof(IEnumerable).IsAssignableFrom(x.PropertyType)) || x.PropertyType == typeof(String)).ToList();
+ return properties.Select(x => new Tuple<string, string>(x.Name, x.GetValue(value).ToString()));
+ }
+ else
+ {
+ return null;
+ }
+ }
+ #endregion render
+
+ #region drawing
+ protected void DrawNameValueText(DrawingContext drawingContext, Tuple<string, string> text, double levelOfOffset, TouchIconKind? icon)
+ {
+ if (IsInViewPort())
+ {
+ FormattedText formattedName = new FormattedText(text.Item1 + ": ", System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal),
+ 12, Foreground);
+ DrawIconTextIfVisible(drawingContext, levelOfOffset, formattedName, icon);
+ double widthOfNameText = formattedName.WidthIncludingTrailingWhitespace + 17 + levelOfOffset;//17 pix for draw icon before text
+
+ FormattedText formattedValue = new FormattedText(text.Item2, System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.SemiBold, FontStretches.Normal),
+ 12, Foreground);
+ DrawIconTextIfVisible(drawingContext, widthOfNameText, formattedValue);
+ _sizeControl.Width = Math.Max(_sizeControl.Width, (widthOfNameText + formattedValue.WidthIncludingTrailingWhitespace));
+ }
+ }
+
+ private bool IsInViewPort()
+ {
+ return (_sizeControl.Height >= _verticalOffset && _sizeControl.Height <= (_verticalOffset + _viewportHeight + 5));
+ }
+
+ protected void DrawHeaderText(DrawingContext drawingContext, string text, int fontSize, double levelOfOffset)
+ {
+ if (IsInViewPort())
+ {
+ FormattedText formattedtext = new FormattedText(text, System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.SemiBold, FontStretches.Normal),
+ fontSize, Foreground);
+ DrawIconTextIfVisible(drawingContext, levelOfOffset, formattedtext);
+ _sizeControl.Width = Math.Max(_sizeControl.Width, (formattedtext.Width + levelOfOffset));
+ }
+ }
+
+ private void DrawIconTextIfVisible(DrawingContext drawingContext, double levelOfOffset, FormattedText formattedText, TouchIconKind? icon = null)
+ {
+ if (icon is TouchIconKind)
+ {
+ DrawIcon(drawingContext, (TouchIconKind)icon, new Point(levelOfOffset, _sizeControl.Height));
+ levelOfOffset += 17;
+ }
+ drawingContext.DrawText(formattedText, new Point(levelOfOffset, _sizeControl.Height));
+ }
+ private void DrawIcon(DrawingContext drawingContext, TouchIconKind kind, Point point)
+ {
+ GeometryGroup group = GetGeometryByIcon(kind);
+ SetGeometryPosition(group, point);
+ drawingContext.DrawGeometry(Foreground, new Pen(Brushes.White, 1), group);
+
+ }
+ private GeometryGroup GetGeometryByIcon(TouchIconKind kind)
+ {
+ Geometry geometry = Geometry.Parse(TouchIcon.Icons[kind]);
+ GeometryGroup group = new GeometryGroup();
+ group.Children.Add(geometry);
+
+ TransformGroup tg = new TransformGroup();
+ tg.Children.Add(new ScaleTransform()
+ {
+ ScaleX = 10d / geometry.Bounds.Width,
+ ScaleY = 10d / geometry.Bounds.Height,
+ });
+ tg.Children.Add(new TranslateTransform() { });
+
+ group.Transform = tg;
+ return group;
+ }
+ private void SetGeometryPosition(GeometryGroup group, Point point)
+ {
+ TransformGroup tg = group.Transform as TransformGroup;
+ (tg.Children[1] as TranslateTransform).X = point.X;
+ (tg.Children[1] as TranslateTransform).Y = point.Y + 1;
+ }
+ #endregion drawing
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml
index ba6c13e91..afe331145 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml
@@ -66,6 +66,9 @@
</RectangleGeometry.Rect>
</RectangleGeometry>
</Border.Clip>
+ <Border.Background>
+ <ImageBrush ImageSource="../Images/JobView/transparent_small.jpg" Stretch="None" TileMode="Tile" AlignmentX="Left" ViewportUnits="Absolute" Viewport="0,0,94,30" />
+ </Border.Background>
<Grid>
<ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments,IsAsync=True}">
<ItemsControl.ItemsPanel>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml
index 97aedcf89..5d3f3f1fc 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/RunningJobViewer.xaml
@@ -57,6 +57,9 @@
</ItemsControl>
<Border Grid.Row="1" x:Name="brush_border" ClipToBounds="False" CornerRadius="10" Margin="0 5 0 0">
+ <Border.Background>
+ <ImageBrush ImageSource="../Images/JobView/transparent_small.jpg" Stretch="None" TileMode="Tile" AlignmentX="Left" ViewportUnits="Absolute" Viewport="0,0,94,30" />
+ </Border.Background>
<Border.Clip>
<RectangleGeometry RadiusX="10" RadiusY="10">
<RectangleGeometry.Rect>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs
index a8ba66eda..b1be93793 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs
@@ -18,9 +18,17 @@ namespace Tango.PPC.Jobs.Converters
if (colorSpace != null)
{
- if (colorSpace.Space == BL.Enumerations.ColorSpaces.Catalog)
+ if (String.IsNullOrWhiteSpace(parameter.ToStringSafe()))
{
- return Visibility.Collapsed;
+ if (colorSpace.Space == BL.Enumerations.ColorSpaces.Catalog)
+ {
+ return Visibility.Collapsed;
+ }
+ }
+ else
+ {
+ String[] spaces = parameter.ToString().Split(',');
+ return spaces.Contains(colorSpace.Space.ToString()) ? Visibility.Visible : Visibility.Collapsed;
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml
index 69eb1fd72..da6989ff6 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml
@@ -19,23 +19,85 @@
</Grid.RowDefinitions>
<Grid>
- <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoMessageBoxTitleFontSize}" Foreground="{StaticResource TangoErrorBrush}">Color is out of range</TextBlock>
+ <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoMessageBoxTitleFontSize}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Text" Value="Color is out of range"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsOutOfGamut}" Value="False">
+ <Setter Property="Text" Value="Closest Alternatives"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="Margin" Value="20 0 0 0"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
<touch:TouchIconButton Command="{Binding CloseCommand}" HorizontalAlignment="Right" Icon="Close" CornerRadius="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" Padding="22" />
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center">
- <Image Source="../Images/JobView/error.png" Stretch="None" />
+ <Image Source="../Images/JobView/error.png" Stretch="None" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}" />
<Ellipse Width="60" Height="60" Margin="20 0 0 0" Fill="{Binding InvalidBrushStop.Brush}" />
<TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoGrayTextBrush}" Margin="20 0 0 0">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding InvalidBrushStop.BrushColorSpace}" Value="RGB">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
<Run Text="{Binding InvalidBrushStop.Red}"></Run><Run>,</Run>
<Run Text="{Binding InvalidBrushStop.Green}"></Run><Run>,</Run>
<Run Text="{Binding InvalidBrushStop.Blue}"></Run>
</TextBlock>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoGrayTextBrush}" Margin="20 0 0 0">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding InvalidBrushStop.BrushColorSpace}" Value="LAB">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ <Run Text="{Binding InvalidBrushStop.L,StringFormat=0.00}"></Run><Run>,</Run>
+ <Run Text="{Binding InvalidBrushStop.A,StringFormat=0.00}"></Run><Run>,</Run>
+ <Run Text="{Binding InvalidBrushStop.B,StringFormat=0.00}"></Run>
+ </TextBlock>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoGrayTextBrush}" Margin="20 0 0 0" Text="{Binding InvalidBrushStop.LiquidVolumesOrderedPigmentedString,Mode=OneWay}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding InvalidBrushStop.BrushColorSpace}" Value="Volume">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
</StackPanel>
<DockPanel Grid.Row="2" Margin="0 0 0 0">
- <TextBlock DockPanel.Dock="Top" Margin="40 0 0 0">Please select the best alternative</TextBlock>
+ <TextBlock DockPanel.Dock="Top" Margin="40 0 0 0">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Text" Value="Please select the best alternative"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsOutOfGamut}" Value="False">
+ <Setter Property="Text" Value="Please select an alternative"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
<hive:HexList Width="330" Height="460" Margin="0 20 0 0" RowCount="6" ColumnCount="5" ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}">
<hive:HexList.ItemContainerStyle>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs
index 887e62dd7..db8573322 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionViewVM.cs
@@ -14,6 +14,6 @@ namespace Tango.PPC.Jobs.Dialogs
/// <seealso cref="Tango.PPC.Jobs.Dialogs.BasicColorCorrectionViewVM" />
public class AdvancedColorCorrectionViewVM : BasicColorCorrectionViewVM
{
-
+ public bool IsOutOfGamut { get; set; }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml
index 4c100c2fc..bd31b88ce 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml
@@ -59,7 +59,7 @@
</StackPanel>
<DockPanel Grid.Row="2" Margin="0 0 0 0">
- <TextBlock DockPanel.Dock="Top" Margin="40 0 0 0">Please select an alternative</TextBlock>
+ <TextBlock DockPanel.Dock="Top" Margin="40 0 0 0">Please use the closest alternative</TextBlock>
<touch:TouchListBox SelectionMode="Single" Style="{StaticResource TangoNoRippleListBox}" ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}" Margin="0 20 0 0">
<touch:TouchListBox.ItemContainerStyle>
@@ -81,7 +81,7 @@
</Setter>
<Setter Property="Effect">
<Setter.Value>
- <DropShadowEffect Color="{StaticResource TangoDarkForegroundColor}" ShadowDepth="0" BlurRadius="10" Opacity="0" />
+ <DropShadowEffect Color="{StaticResource TangoGrayColor}" ShadowDepth="0" BlurRadius="10" Opacity="0" />
</Setter.Value>
</Setter>
<Style.Triggers>
@@ -147,7 +147,10 @@
<DockPanel Grid.Row="3" Margin="40 10 20 0" LastChildFill="False">
<touch:TouchButton Command="{Binding MoreOptionsCommand}" VerticalAlignment="Top" Style="{StaticResource TangoLinkButton}" DockPanel.Dock="Left" Foreground="{StaticResource TangoPrimaryAccentBrush}">
- More Options
+ <StackPanel Orientation="Horizontal">
+ <Image Source="../Images/color-picker.png" Stretch="None" VerticalAlignment="Center" />
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">More Options</TextBlock>
+ </StackPanel>
</touch:TouchButton>
<touch:TouchButton Command="{Binding OKCommand}" CornerRadius="25" Style="{StaticResource TangoHollowButton}" DockPanel.Dock="Right" Width="170" Height="50" VerticalAlignment="Bottom">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml
index ded395e08..128a93548 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/CatalogSelectionView.xaml
@@ -56,7 +56,7 @@
<DataTemplate>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<Image Stretch="Fill" Width="32" Height="32" RenderOptions.BitmapScalingMode="Fant" Source="../Images/NewJob/twine.png"></Image>
- <TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" Text="{Binding Name}"></TextBlock>
+ <TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" TextAlignment="Center" Text="{Binding Name}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"></TextBlock>
</StackPanel>
</DataTemplate>
</touch:TouchStaticListBox.ItemTemplate>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml
index ac27cc00d..da51bba27 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/ImportJobView.xaml
@@ -18,7 +18,7 @@
<TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoHeaderFontSize}">IMPORT JOB</TextBlock>
<TextBlock Margin="20 10" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">A job file has been selected from the storage device. press 'IMPORT' to add the job to your job list.</TextBlock>
- <touch:TouchCheckBox IsChecked="{Binding ImportAndEdit}" Margin="40 50 0 0">Edit this job after import</touch:TouchCheckBox>
+ <touch:TouchCheckBox IsChecked="{Binding ImportAndEdit}" Margin="40 50 0 0" Visibility="Collapsed">Edit this job after import</touch:TouchCheckBox>
</StackPanel>
</DockPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpg b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpg
new file mode 100644
index 000000000..cf1d94d12
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent.jpg
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpg b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpg
new file mode 100644
index 000000000..c682a4c7e
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/transparent_small.jpg
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.png
new file mode 100644
index 000000000..d8d6f8470
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/color-picker.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.png
new file mode 100644
index 000000000..46059c5c0
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png
new file mode 100644
index 000000000..4e46ee447
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/sync_job.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs
new file mode 100644
index 000000000..4e3137e1c
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItem.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PPC.Common.Notifications;
+
+namespace Tango.PPC.Jobs.NotificationItems
+{
+ /// <summary>
+ /// Represents a simple text message notification item which can be inserted into the application notifications panel.
+ /// </summary>
+ /// <seealso cref="Tango.PPC.Common.Notifications.NotificationItem" />
+ public class NewSynchronizardJobsNotificationItem : NotificationItem
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UpdateAvailableNotificationItem"/> class.
+ /// </summary>
+ public NewSynchronizardJobsNotificationItem()
+ {
+ CanClose = true;
+ }
+
+ /// <summary>
+ /// Gets or sets the view type.
+ /// </summary>
+ public override Type ViewType
+ {
+ get { return typeof(NewSynchronizardJobsNotificationItemView); }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml
new file mode 100644
index 000000000..5a57e3db7
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml
@@ -0,0 +1,30 @@
+<UserControl x:Class="Tango.PPC.Jobs.NotificationItems.NewSynchronizardJobsNotificationItemView"
+ 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.Jobs.NotificationItems"
+ xmlns:common="clr-namespace:Tango.PPC.Common.Converters"
+ mc:Ignorable="d"
+ x:Name="MessageNotificationItemControl"
+ d:DesignHeight="60" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:NewSynchronizardJobsNotificationItem, IsDesignTimeCreatable=False}" MinHeight="90" Height="90" MaxHeight="150" Background="White">
+
+ <UserControl.Resources>
+ <BitmapImage x:Key="icon" UriSource="../Images/sync_job.png" />
+ </UserControl.Resources>
+
+ <Grid>
+ <Border BorderThickness="0 0 0 2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Padding="15">
+ <DockPanel>
+ <Image Source="{StaticResource icon}" MaxHeight="50" />
+
+ <Grid>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">
+ New job definitions were synchronized with your machine. Tap to refresh your job list.
+ </TextBlock>
+ </Grid>
+ </DockPanel>
+ </Border>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs
new file mode 100644
index 000000000..33db09386
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NotificationItems/NewSynchronizardJobsNotificationItemView.xaml.cs
@@ -0,0 +1,30 @@
+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.Jobs.NotificationItems
+{
+ /// <summary>
+ /// Represents the <see cref="UpdateAvailableNotificationItemView"/> view.
+ /// </summary>
+ /// <seealso cref="System.Windows.Controls.UserControl" />
+ /// <seealso cref="System.Windows.Markup.IComponentConnector" />
+ public partial class NewSynchronizardJobsNotificationItemView : UserControl
+ {
+ public NewSynchronizardJobsNotificationItemView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
index aedf09ce7..33b9de808 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
@@ -124,6 +124,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="NotificationItems\NewSynchronizardJobsNotificationItemView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Resources\Styles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -163,6 +167,7 @@
</Compile>
<Compile Include="AppButtons\StartPrintingButton.cs" />
<Compile Include="AppButtons\StopPrintingButton.cs" />
+ <Compile Include="Controls\JobOutlineControl.cs" />
<Compile Include="Controls\RunningJobViewer.xaml.cs">
<DependentUpon>RunningJobViewer.xaml</DependentUpon>
</Compile>
@@ -227,6 +232,10 @@
<Compile Include="NavigationObjects\JobNavigationObject.cs" />
<Compile Include="NavigationObjects\JobSummeryNavigationObject.cs" />
<Compile Include="NavigationObjects\TwineCatalogNavigationObject.cs" />
+ <Compile Include="NotificationItems\NewSynchronizardJobsNotificationItem.cs" />
+ <Compile Include="NotificationItems\NewSynchronizardJobsNotificationItemView.xaml.cs">
+ <DependentUpon>NewSynchronizardJobsNotificationItemView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@@ -482,10 +491,25 @@
<Resource Include="Images\small-cards-view - blue.png" />
<Resource Include="Images\small-cards-view.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\color-picker.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\sync.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\JobView\transparent.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\JobView\transparent_small.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\sync_job.png" />
+ </ItemGroup>
<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.Jobs/ViewModels/JobProgressViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs
index 103a10b28..8d5bd284d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs
@@ -6,8 +6,10 @@ using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.Core.Commands;
using Tango.Integration.Operation;
+using Tango.PMR.Printing;
using Tango.PPC.Common;
using Tango.PPC.Common.Navigation;
+using Tango.PPC.Common.Notifications;
using Tango.PPC.Jobs.AppBarItems;
using Tango.PPC.Jobs.AppButtons;
using Tango.PPC.Jobs.Dialogs;
@@ -47,6 +49,26 @@ namespace Tango.PPC.Jobs.ViewModels
set { _runningJobStatus = value; RaisePropertyChangedAuto(); }
}
+ private bool _isDisplayJobOutline;
+ /// <summary>
+ /// Gets or sets a value indicating whether to display the job outline.
+ /// </summary>
+ public bool IsDisplayJobOutline
+ {
+ get { return _isDisplayJobOutline; }
+ set { _isDisplayJobOutline = value; RaisePropertyChangedAuto(); }
+ }
+
+ private JobTicket _jobOutlineTicket;
+ /// <summary>
+ /// Gets or sets the job outline ticket.
+ /// </summary>
+ public JobTicket JobOutlineTicket
+ {
+ get { return _jobOutlineTicket; }
+ set { _jobOutlineTicket = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -59,6 +81,16 @@ namespace Tango.PPC.Jobs.ViewModels
/// </value>
public RelayCommand GoToJobCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the display job outline command.
+ /// </summary>
+ public RelayCommand DisplayJobOutlineCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the hide job outline command.
+ /// </summary>
+ public RelayCommand HideJobOutlineCommand { get; set; }
+
#endregion
public JobProgressViewVM()
@@ -67,14 +99,21 @@ namespace Tango.PPC.Jobs.ViewModels
_stop_job_btn.Pressed += _stop_job_btn_Pressed;
GoToJobCommand = new RelayCommand(GoToJob);
+ DisplayJobOutlineCommand = new RelayCommand(DisplayJobOutline);
+ HideJobOutlineCommand = new RelayCommand(HideJobOutline);
}
- private void _stop_job_btn_Pressed()
+ #region Private Methods
+
+ private void HideJobOutline()
{
- if (_handler != null)
- {
- _handler.Cancel();
- }
+ IsDisplayJobOutline = false;
+ }
+
+ private void DisplayJobOutline()
+ {
+ JobOutlineTicket = _handler.JobTicket;
+ IsDisplayJobOutline = true;
}
private void GoToJob()
@@ -83,6 +122,8 @@ namespace Tango.PPC.Jobs.ViewModels
NavigationManager.ClearHistoryExcept<JobsView>();
}
+ #endregion
+
#region Override Methods
/// <summary>
@@ -94,41 +135,32 @@ namespace Tango.PPC.Jobs.ViewModels
}
/// <summary>
- /// Called when the navigation system has navigated from this VM view.
- /// </summary>
- public override void OnNavigatedFrom()
- {
- base.OnNavigatedFrom();
-
- if (MachineProvider.MachineOperator.IsPrinting && _handler != null && !_handler.IsCanceled)
- {
- NotificationProvider.PushAppBarItem<JobProgressAppBarItem>().Pressed += (_, __) =>
- {
- NotificationProvider.CurrentAppBarItem.Close();
- NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
- };
- }
- }
-
- /// <summary>
/// Called when the navigation system has navigated to this VM view.
/// </summary>
public override void OnNavigatedTo()
{
base.OnNavigatedTo();
- if (NotificationProvider.HasAppBarItem && NotificationProvider.CurrentAppBarItem is JobProgressAppBarItem)
+ IsDisplayJobOutline = false;
+
+ if (_handler != null && !_handler.Status.IsFailed)
{
- NotificationProvider.CurrentAppBarItem.Close();
+ _stop_job_btn.Push();
}
-
- _stop_job_btn.Push();
}
#endregion
#region Event Handlers
+ private void _stop_job_btn_Pressed()
+ {
+ if (_handler != null)
+ {
+ _handler.Cancel();
+ }
+ }
+
/// <summary>
/// Handles the PrintingStarted event of the MachineOperator.
/// </summary>
@@ -141,8 +173,10 @@ namespace Tango.PPC.Jobs.ViewModels
e.JobHandler.StatusChanged += JobHandler_StatusChanged;
e.JobHandler.SpoolChangeRequired += JobHandler_SpoolChangeRequired;
e.JobHandler.Stopped += JobHandler_Stopped;
+ e.JobHandler.CanCancelChanged += JobHandler_CanCancelChanged;
_stop_job_btn.Push();
+ _stop_job_btn.IsEnabled = true;
}
/// <summary>
@@ -172,12 +206,18 @@ namespace Tango.PPC.Jobs.ViewModels
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void JobHandler_Stopped(object sender, EventArgs e)
{
- if (NotificationProvider.HasAppBarItem && NotificationProvider.CurrentAppBarItem is JobProgressAppBarItem)
+ if (_stop_job_btn != null)
{
- NotificationProvider.CurrentAppBarItem.Close();
+ _stop_job_btn.Pop();
}
- _stop_job_btn.Pop();
+ if (_handler != null)
+ {
+ _handler.StatusChanged -= JobHandler_StatusChanged;
+ _handler.SpoolChangeRequired -= JobHandler_SpoolChangeRequired;
+ _handler.Stopped -= JobHandler_Stopped;
+ _handler.CanCancelChanged -= JobHandler_CanCancelChanged;
+ }
}
/// <summary>
@@ -193,6 +233,16 @@ namespace Tango.PPC.Jobs.ViewModels
});
}
+ /// <summary>
+ /// Handles the CanCancelChanged event of the JobHandler control.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
+ private void JobHandler_CanCancelChanged(object sender, EventArgs e)
+ {
+ _stop_job_btn.IsEnabled = _handler.CanCancel;
+ }
+
#endregion
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
index bff6beff5..a2acf5893 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
@@ -26,6 +26,7 @@ namespace Tango.PPC.Jobs.ViewModels
{
private ObservablesContext _context;
private bool _canStartJob;
+ private bool _startingJob;
private bool _isPreparingJob;
/// <summary>
@@ -59,7 +60,6 @@ namespace Tango.PPC.Jobs.ViewModels
set { _estimatedDuration = value; RaisePropertyChangedAuto(); }
}
-
/// <summary>
/// Gets or sets the dye command.
/// </summary>
@@ -96,12 +96,20 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
private async void StartJob()
{
+ if (_startingJob) return;
+
+ _startingJob = true;
+ _canStartJob = false;
+ InvalidateRelayCommands();
+ NavigationManager.IsBackEnabled = false;
+
try
{
LogManager.Log("Start job command pressed. Starting job and navigating to job progress view...");
await PrintingManager.Print(Job, _context);
await NavigationManager.NavigateTo<JobsModule>(false, nameof(JobProgressView));
+ _startingJob = false;
}
catch (InsufficientLiquidQuantityException)
{
@@ -112,6 +120,13 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log(ex, "Could not start the current job.");
await NotificationProvider.ShowError($"{ex.Message}");
}
+ finally
+ {
+ _startingJob = false;
+ _canStartJob = true;
+ NavigationManager.IsBackEnabled = true;
+ InvalidateRelayCommands();
+ }
}
/// <summary>
@@ -130,16 +145,6 @@ namespace Tango.PPC.Jobs.ViewModels
_context = obj.Context;
Job = obj.Job;
- if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog)
- {
- if (_context.ColorCatalogs.SingleOrDefault(x => x.Guid == Job.ColorCatalogGuid) == null)
- {
- await NotificationProvider.ShowError("The selected color catalog for this job could not be found.\nCannot load job.");
- await NavigationManager.NavigateBack();
- return;
- }
- }
-
IsPreparingJob = true;
Job = await new JobBuilder(_context).Set(Job.Guid)
@@ -150,7 +155,15 @@ namespace Tango.PPC.Jobs.ViewModels
.WithBrushStops()
.BuildAsync();
- await Task.Delay(2000);
+ if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog)
+ {
+ if (_context.ColorCatalogs.SingleOrDefault(x => x.Guid == Job.ColorCatalogGuid) == null)
+ {
+ await NotificationProvider.ShowError("The selected color catalog for this job could not be found.\nCannot load job.");
+ await NavigationManager.NavigateBack();
+ return;
+ }
+ }
await Task.Factory.StartNew(() =>
{
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
index 4e1e58dba..5e90d3b5b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
@@ -56,6 +56,7 @@ namespace Tango.PPC.Jobs.ViewModels
private ActionTimer _volumeConversionTimer;
private IColorConverter _converter;
private string _current_job_string;
+ private bool startingJob = false;
#region Properties
@@ -412,7 +413,7 @@ namespace Tango.PPC.Jobs.ViewModels
RepeatSampleDyeCommand = new RelayCommand(RepeatSampleDye);
AnotherSampleCommand = new RelayCommand(DyeAnotherSample);
InvokeFineTuningPaletteCommand = new RelayCommand<FineTuneItem>(InvokeFineTuningPalette);
- ResetFineTuningCommand = new RelayCommand(ResetFineTuning);
+ ResetFineTuningCommand = new RelayCommand(() => ResetFineTuning(true));
StartFineTuningCommand = new RelayCommand(StartFineTuning, () => FineTuneItems.Any(x => x.IsSelected) && CanStartJob());
RepeatFineTuningCommand = new RelayCommand(RepeatFineTuning);
ApproveFineTuningCommand = new RelayCommand(ApproveFineTuning);
@@ -468,7 +469,7 @@ namespace Tango.PPC.Jobs.ViewModels
Job.ValidateOnPropertyChanged = true;
LogManager.Log("Loading RMLS...");
- Rmls = (await new RmlsCollectionBuilder(_db).SetAll().WithActiveParametersGroup().WithCAT(Job.MachineGuid).WithCCT().WithLiquidFactors().BuildAsync()).ToList();
+ Rmls = (await new RmlsCollectionBuilder(_db).SetAll().WithActiveParametersGroup().WithCAT(Job.MachineGuid).WithCCT().WithLiquidFactors().WithSpools().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync()).ToList();
LogManager.Log("Loading Color Spaces...");
ColorSpaces = await _db.ColorSpaces.ToListAsync();
LogManager.Log("Loading Spool Types...");
@@ -478,7 +479,7 @@ namespace Tango.PPC.Jobs.ViewModels
if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog)
{
- SelectedCatalog = await new ColorCatalogBuilder(_db).Set(Job.ColorCatalogGuid).WithGroups().WithItems().BuildAsync();
+ SelectedCatalog = await new CatalogBuilder(_db).Set(Job.ColorCatalogGuid).WithGroups().WithItems().BuildAsync();
if (SelectedCatalog != null)
{
@@ -545,18 +546,15 @@ namespace Tango.PPC.Jobs.ViewModels
}
catch (Exception ex)
{
- LogManager.Log(ex, $"Error loading job '{_job_to_load.Name}'");
+ IsFree = true;
+ LogManager.Log(ex, $"Error loading job '{(_job_to_load != null ? _job_to_load.Name : "null")}'");
await NotificationProvider.ShowError("An error occurred while trying to load the selected job.");
_can_navigate_back = true;
await NavigationManager.NavigateBack();
}
finally
{
- InvokeUI(() =>
- {
- IsFree = true;
- //NotificationProvider.ReleaseGlobalBusyMessage();
- });
+ IsFree = true;
}
}
@@ -593,7 +591,9 @@ namespace Tango.PPC.Jobs.ViewModels
}
Job.LastUpdated = DateTime.UtcNow;
+ Job.IsSynchronized = false;
Job.JobStatus = BL.Enumerations.JobStatuses.Draft;
+ Job.MarkModified(_db);
await _db.SaveChangesAsync();
_current_job_string = Job.ToJobFileWhenLoaded().ToString();
@@ -645,11 +645,16 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
private async void StartJob()
{
+ if (startingJob) return;
+
try
{
+ Debug.WriteLine("Job Starting...");
+ startingJob = true;
LogManager.Log("Start job command pressed. Starting job and navigating to job progress view...");
- await PrintingManager.Print(Job, _db);
+ var handler = await PrintingManager.Print(Job, _db);
await NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
+ startingJob = false;
}
catch (InsufficientLiquidQuantityException)
{
@@ -660,6 +665,10 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log(ex, "Could not start the current job.");
await NotificationProvider.ShowError($"{ex.Message}.");
}
+ finally
+ {
+ startingJob = false;
+ }
}
/// <summary>
@@ -668,8 +677,7 @@ namespace Tango.PPC.Jobs.ViewModels
private bool CanStartJob()
{
return
- Job != null && Job.Validate(_db) &&
- !Job.Segments.SelectMany(x => x.BrushStops).ToList().Exists(x => x.IsOutOfGamut);
+ Job != null && Job.Validate(_db) && !Job.Segments.SelectMany(x => x.BrushStops).Where(x => !x.IsTransparent && !x.IsWhite).ToList().Exists(x => x.IsOutOfGamut || x.IsLiquidVolumesOutOfRange);
}
#endregion
@@ -709,7 +717,7 @@ namespace Tango.PPC.Jobs.ViewModels
try
{
LogManager.Log("Adding new solid segment...");
- var s = Job.AddSolidSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10);
+ var s = Job.AddSolidSegment(Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 10);
SetSegmentLiquidVolumesIfVolume(s);
return s;
}
@@ -729,7 +737,7 @@ namespace Tango.PPC.Jobs.ViewModels
try
{
LogManager.Log("Adding new gradient segment...");
- var s = Job.AddGradientSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10);
+ var s = Job.AddGradientSegment(Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 10);
SetSegmentLiquidVolumesIfVolume(s);
return s;
}
@@ -759,14 +767,7 @@ namespace Tango.PPC.Jobs.ViewModels
draggedSegment.SegmentIndex = droppedSegment.SegmentIndex + 1;
}
- int index = 1;
-
- foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex))
- {
- segment.SegmentIndex = index++;
- }
-
- SegmentsCollectionView.Refresh();
+ ArrangeSegmentsIndices();
}
/// <summary>
@@ -829,10 +830,14 @@ namespace Tango.PPC.Jobs.ViewModels
private void ArrangeSegmentsIndices()
{
- for (int i = 0; i < Job.Segments.Count; i++)
+ int index = 1;
+
+ foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex))
{
- Job.Segments[i].SegmentIndex = i + 1;
+ segment.SegmentIndex = index++;
}
+
+ SegmentsCollectionView.Refresh();
}
#endregion
@@ -880,23 +885,55 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log($"Invoking triplet color adjustment dialog for brush stop {brushStop.StopIndex} at segment {brushStop.Segment.SegmentIndex}.");
LogManager.Log("Retrieving color conversion suggestions for brush stop...");
- var conversionOutput = _converter.Convert(brushStop, true);
+ PMR.ColorLab.ConversionOutput conversionOutput = null;
+
+ if (brushStop.IsOutOfGamut)
+ {
+ conversionOutput = _converter.Convert(brushStop, false);
+ }
BasicColorCorrectionViewVM vm = null;
+ List<ColorConversionSuggestion> suggestions = null;
- vm = await NotificationProvider.ShowDialog<BasicColorCorrectionViewVM>(new BasicColorCorrectionViewVM()
+ if (brushStop.IsOutOfGamut)
{
- InvalidBrushStop = brushStop,
- Suggestions = conversionOutput.CreateTrippletSuggestions(),
- });
+ vm = await NotificationProvider.ShowDialog<BasicColorCorrectionViewVM>(new BasicColorCorrectionViewVM()
+ {
+ InvalidBrushStop = brushStop,
+ Suggestions = new List<ColorConversionSuggestion>() { new ColorConversionSuggestion(conversionOutput.SingleCoordinates, 0, 0) },
+ });
+ }
- if (vm.Result == BasicColorCorrectionViewVM.ColorCorrectionDialogResult.MoreOptions)
+ if (vm == null || vm.Result == BasicColorCorrectionViewVM.ColorCorrectionDialogResult.MoreOptions)
{
+ NotificationProvider.SetGlobalBusyMessage("Generating color hive...");
+
+ await Task.Factory.StartNew(() =>
+ {
+ conversionOutput = _converter.Convert(brushStop, true);
+
+ suggestions = conversionOutput.CreateHiveSuggestions();
+
+ if (vm == null)
+ {
+ var center = suggestions.GetCenterSuggestion();
+ center.Coordinates.Red = brushStop.Red;
+ center.Coordinates.Green = brushStop.Green;
+ center.Coordinates.Blue = brushStop.Blue;
+
+ center.Coordinates.L = brushStop.L;
+ center.Coordinates.A = brushStop.A;
+ center.Coordinates.B = brushStop.B;
+ }
+ });
+
+ NotificationProvider.ReleaseGlobalBusyMessage();
LogManager.Log("Invoking hive color conversion dialog...");
vm = await NotificationProvider.ShowDialog<AdvancedColorCorrectionViewVM>(new AdvancedColorCorrectionViewVM()
{
InvalidBrushStop = brushStop,
- Suggestions = conversionOutput.CreateHiveSuggestions(),
+ Suggestions = suggestions,
+ IsOutOfGamut = brushStop.IsOutOfGamut,
});
}
@@ -916,6 +953,13 @@ namespace Tango.PPC.Jobs.ViewModels
brushStop.A = vm.SelectedSuggestion.Coordinates.A;
brushStop.B = vm.SelectedSuggestion.Coordinates.B;
}
+ else if (brushStop.BrushColorSpace == BL.Enumerations.ColorSpaces.Volume)
+ {
+ if (vm.SelectedSuggestion != suggestions.GetCenterSuggestion())
+ {
+ vm.SelectedSuggestion.ApplyOnBrushStop(brushStop);
+ }
+ }
brushStop.Corrected = true;
brushStop.IsOutOfGamut = false;
@@ -927,6 +971,11 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log(ex, "Error while invoking color adjustment dialog.");
await NotificationProvider.ShowError("An error occurred while trying to convert the selected color.");
}
+ finally
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ DyeCommand.RaiseCanExecuteChanged();
+ }
}
/// <summary>
@@ -936,7 +985,7 @@ namespace Tango.PPC.Jobs.ViewModels
[HandleProcessCorruptedStateExceptions]
public void OnBrushStopFieldValueChanged(BrushStop stop)
{
- if (stop != null)
+ if (stop != null && stop.ColorSpace != null)
{
stop.Corrected = false;
stop.OutOfGamutChecked = false;
@@ -954,6 +1003,11 @@ namespace Tango.PPC.Jobs.ViewModels
stop.Blue = output.SingleCoordinates.Blue;
stop.Corrected = true;
stop.IsOutOfGamut = false;
+
+ InvokeUI(() =>
+ {
+ DyeCommand.RaiseCanExecuteChanged();
+ });
}
catch (Exception ex)
{
@@ -1074,7 +1128,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Synchronizes the fine tune items to brush stops.
/// </summary>
- private void SyncFineTuneItemsToBrushStops()
+ private async void SyncFineTuneItemsToBrushStops(bool displayBusy = false)
{
try
{
@@ -1086,18 +1140,27 @@ namespace Tango.PPC.Jobs.ViewModels
}
else
{
+ if (displayBusy)
+ {
+ NotificationProvider.SetGlobalBusyMessage("Generating suggestions...");
+ }
+
FineTuneItems.Clear();
- foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorSpace.Space == BL.Enumerations.ColorSpaces.RGB || x.ColorSpace.Space == BL.Enumerations.ColorSpaces.LAB).DistinctBy(x => x.Color))
+ foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => !x.IsTransparent).Where(x => x.ColorSpace.Space == BL.Enumerations.ColorSpaces.RGB || x.ColorSpace.Space == BL.Enumerations.ColorSpaces.LAB).DistinctBy(x => x.Color))
{
- FineTuneItem item = new FineTuneItem(_converter.Convert(stop, true));
+ var conversionoutput = await _converter.ConvertAsync(stop, true);
+ FineTuneItem item = new FineTuneItem(conversionoutput);
+ item.BrushStop = stop;
item.BrushStops = Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.Color == stop.Color).ToList();
- item.SelectedSuggestion = item.Suggestions[item.Suggestions.Count / 2];
+ item.SelectedSuggestion = item.Suggestions.GetCenterSuggestion();
item.SelectedChanged += () => StartFineTuningCommand.RaiseCanExecuteChanged();
FineTuneItems.Add(item);
}
_jobs_fine_tune_items[Job.Guid] = FineTuneItems.ToList();
+
+ NotificationProvider.ReleaseGlobalBusyMessage();
}
ApprovalFineTuneItems = FineTuneItems.Where(x => x.IsSelected).ToObservableCollection();
@@ -1109,6 +1172,10 @@ namespace Tango.PPC.Jobs.ViewModels
{
LogManager.Log(ex, "Error while trying to synchronize fine tuning items with brush stops.");
}
+ finally
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ }
}
/// <summary>
@@ -1135,19 +1202,23 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log(ex, "Error invoking the fine tunning palette");
await NotificationProvider.ShowError("An error occurred while trying to display the fine tunning palette.");
}
+ finally
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ }
}
/// <summary>
/// Resets the fine tuning.
/// </summary>
- private void ResetFineTuning()
+ private void ResetFineTuning(bool displayBusy = false)
{
if (Job != null && _jobs_fine_tune_items.ContainsKey(Job.Guid))
{
_jobs_fine_tune_items.Remove(Job.Guid);
}
- SyncFineTuneItemsToBrushStops();
+ SyncFineTuneItemsToBrushStops(displayBusy);
}
/// <summary>
@@ -1357,6 +1428,8 @@ namespace Tango.PPC.Jobs.ViewModels
{
bool result = true;
+ if (!IsFree) return false;
+
if (!_can_navigate_back)
{
bool jobChainged = false;
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
index a7b06f6eb..64931cbe3 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
@@ -36,6 +36,9 @@ using System.Windows.Media.Imaging;
using Tango.Touch.Components;
using Tango.PPC.Jobs.ViewContracts;
using Tango.Core.ExtensionMethods;
+using Tango.PPC.Common.Synchronization;
+using Tango.PPC.Jobs.NotificationItems;
+using Tango.PPC.Storage.Models;
namespace Tango.PPC.Jobs.ViewModels
{
@@ -46,7 +49,10 @@ namespace Tango.PPC.Jobs.ViewModels
public class JobsViewVM : PPCViewModel<IJobsView>
{
private ObservablesContext _db; //Holds the db context for the job list.
- private ObservableCollection<ColorCatalog> _catalogs; //Holds the available color catalogs.
+ private ObservableCollection<ColorCatalog> _catalogs; //Holds the available color catalogs for the site.
+ private ObservableCollection<Rml> _rmls; //Holds the available RML for the site.
+ private List<ColorSpace> _colorSpaces; //Holds the available color spaces.
+ private bool _isJobsSynchronizationNotificationActive;
public enum JobsCategory
{
@@ -318,7 +324,7 @@ namespace Tango.PPC.Jobs.ViewModels
RaiseMessage(new JobSelectedMessage() { Job = job, Context = _db });
- if (!directlyToEdit && MachineProvider.MachineOperator.Status == Integration.Operation.MachineStatuses.ReadyToDye)
+ if (!directlyToEdit && MachineProvider.MachineOperator.CanPrint)
{
await NavigationManager.NavigateWithObject<JobsModule, JobSummeryView, JobSummeryNavigationObject>(new JobSummeryNavigationObject()
{
@@ -349,6 +355,8 @@ namespace Tango.PPC.Jobs.ViewModels
_db = ObservablesContext.CreateDefault();
+ _colorSpaces = _db.ColorSpaces.ToList();
+
var jobs = new JobsCollectionBuilder(_db).Set(x => x.MachineGuid == MachineProvider.Machine.Guid).WithSegments().WithBrushStops().WithCustomer().WithColorSpace().Build();
InvokeUI(() =>
@@ -407,10 +415,15 @@ namespace Tango.PPC.Jobs.ViewModels
var machine = MachineProvider.Machine;
JobCreationViewVM vm = new JobCreationViewVM(
- machine.SupportedJobTypes.Count > 0 ? machine.SupportedJobTypes : Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToList(),
- machine.SupportedColorSpaces.Count > 0 ? machine.SupportedColorSpaces : Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace() || (ApplicationManager.IsInTechnicianMode && x == ColorSpaces.Volume)).ToList()
+ Settings.SupportedJobTypes.Count > 0 ? Settings.SupportedJobTypes : Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToList(),
+ Settings.SupportedColorSpaces.Count > 0 ? Settings.SupportedColorSpaces : Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace() || (ApplicationManager.IsInTechnicianMode && x == ColorSpaces.Volume)).ToList()
);
+ if (_catalogs.Count == 0)
+ {
+ vm.SupportedColorSpaces.Remove(ColorSpaces.Catalog);
+ }
+
CatalogSelectionViewVM catalogVM = new CatalogSelectionViewVM(_catalogs.ToList(), _catalogs.ToList().SingleOrDefault(x => x.Guid == settings.LastSelectedCatalogGuid));
if (settings.LastJobType != null)
@@ -419,7 +432,7 @@ namespace Tango.PPC.Jobs.ViewModels
}
else
{
- vm.SelectedJobType = machine.SupportedJobTypes.FirstOrDefault();
+ vm.SelectedJobType = Settings.SupportedJobTypes.FirstOrDefault();
}
if (settings.LastJobColorSpace != null)
@@ -428,7 +441,7 @@ namespace Tango.PPC.Jobs.ViewModels
}
else
{
- var space = machine.SupportedColorSpaces.FirstOrDefault();
+ var space = Settings.SupportedColorSpaces.FirstOrDefault();
vm.SelectedColorSpace = space.IsUserSpace() ? space : ColorSpaces.Catalog;
}
@@ -446,7 +459,7 @@ namespace Tango.PPC.Jobs.ViewModels
if (twnFile == null)
{
- if (machine.SupportedJobTypes.Count != 1 || machine.SupportedColorSpaces.Count != 1)
+ if (Settings.SupportedJobTypes.Count != 1 || Settings.SupportedColorSpaces.Count != 1)
{
vm = await NotificationProvider.ShowDialog<JobCreationViewVM>(vm);
if (!vm.DialogResult) return;
@@ -476,14 +489,14 @@ namespace Tango.PPC.Jobs.ViewModels
}
else
{
- vm.SelectedJobType = machine.SupportedJobTypes.First();
- vm.SelectedColorSpace = machine.SupportedColorSpaces.First();
+ vm.SelectedJobType = Settings.SupportedJobTypes.First();
+ vm.SelectedColorSpace = Settings.SupportedColorSpaces.First();
}
}
settings.LastJobType = vm.SelectedJobType;
settings.LastJobColorSpace = vm.SelectedColorSpace;
-
+
if (vm.SelectedColorSpace == ColorSpaces.Catalog)
{
settings.LastSelectedCatalogGuid = catalogVM.SelectedCatalog.Guid;
@@ -492,6 +505,8 @@ namespace Tango.PPC.Jobs.ViewModels
settings.Save();
Job job = new Job();
+ job.LastUpdated = DateTime.UtcNow;
+ job.JobSource = JobSource.Local;
job.Name = "untitled";
job.NumberOfHeads = 1;
job.NumberOfUnits = 1;
@@ -501,11 +516,12 @@ namespace Tango.PPC.Jobs.ViewModels
job.JobType = vm.SelectedJobType;
job.EnableLubrication = true;
job.ColorSpaceGuid = Adapter.ColorSpaces.FirstOrDefault(x => x.Code == vm.SelectedColorSpace.ToInt32()).Guid;
+ job.ColorSpace = _colorSpaces.SingleOrDefault(x => x.Guid == job.ColorSpaceGuid);
job.MachineGuid = MachineProvider.Machine.Guid;
- job.UserGuid = AuthenticationProvider.CurrentUser.Guid;
- job.RmlGuid = machine.DefaultRml != null ? machine.DefaultRmlGuid : Adapter.Rmls.FirstOrDefault().Guid;
+ job.UserGuid = null;
+ job.RmlGuid = (Settings.DefaultRmlGuid != null && _rmls.Select(x => x.Guid).Contains(Settings.DefaultRmlGuid)) ? Settings.DefaultRmlGuid : _rmls.FirstOrDefault().Guid;
job.WindingMethodGuid = Adapter.WindingMethods.FirstOrDefault().Guid;
- job.SpoolTypeGuid = machine.DefaultSpoolType != null ? machine.DefaultSpoolTypeGuid : Adapter.SpoolTypes.FirstOrDefault().Guid;
+ job.SpoolTypeGuid = Settings.DefaultSpoolTypeGuid != null ? Settings.DefaultSpoolTypeGuid : Adapter.SpoolTypes.FirstOrDefault().Guid;
if (vm.SelectedColorSpace == ColorSpaces.Catalog)
{
@@ -519,11 +535,11 @@ namespace Tango.PPC.Jobs.ViewModels
if (colorProfile == null)
{
- job.AddSolidSegment(machine.DefaultSegmentLength > 0 ? machine.DefaultSegmentLength : 100);
+ job.AddSolidSegment(Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 100);
}
else
{
- job.AddSolidSegment(colorProfile.Value, machine.DefaultSegmentLength > 0 ? machine.DefaultSegmentLength : 100);
+ job.AddSolidSegment(colorProfile.Value, Settings.DefaultSegmentLength > 0 ? Settings.DefaultSegmentLength : 100);
job.Name = $"SnapMatch {colorProfile.Value.R}, {colorProfile.Value.G}, {colorProfile.Value.B}";
}
@@ -724,10 +740,13 @@ namespace Tango.PPC.Jobs.ViewModels
StorageProvider.RegisterFileHandler(ExplorerFileDefinition.Pulse.Extension, HandlePulseFileLoaded);
//Load catalogs.
- using (ObservablesContext c = ObservablesContext.CreateDefault())
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
{
- _catalogs = (await c.ColorCatalogs.ToListAsync()).ToObservableCollection();
+ _catalogs = await new CatalogsCollectionBuilder(db).SetAll().ForSite(MachineProvider.Machine.SiteGuid).BuildAsync();
+ _rmls = await new RmlsCollectionBuilder(db).SetAll().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync();
}
+
+ MachineDataSynchronizer.SynchronizationEnded += MachineDataSynchronizer_SynchronizationEnded;
}
public override void OnNavigatedTo()
@@ -745,37 +764,64 @@ namespace Tango.PPC.Jobs.ViewModels
var selected_job = SelectedJobs.FirstOrDefault();
if (selected_job == null) return;
+ var selectedJobs = SelectedJobs.ToList();
+
ClearSelection();
var result = await NavigationManager.
NavigateForResult<StorageModule,
Storage.Views.MainView, ExplorerFileItem,
- Storage.Models.StorageNavigationRequest>(
- new Storage.Models.StorageNavigationRequest()
+ StorageNavigationRequest>(
+ new StorageNavigationRequest()
{
- Intent = Storage.Models.StorageNavigationIntent.SaveFile,
+ Intent = selectedJobs.Count == 1 ? StorageNavigationIntent.SaveFile : StorageNavigationIntent.SaveFiles,
DefaultFileName = selected_job.Name,
Filter = ExplorerFileDefinition.Job.Extension,
- Title = "Save Job File",
+ Title = selectedJobs.Count == 1 ? "Save Job File" : "Save Job Files",
});
if (result != null)
{
- try
+ if (selectedJobs.Count == 1)
{
- var jobFile = await selected_job.ToJobFile();
+ try
+ {
+ var jobFile = await selected_job.ToJobFile();
- using (FileStream fs = new FileStream(result.Path + ExplorerFileDefinition.Job.Extension, FileMode.Create))
+ using (FileStream fs = new FileStream(result.Path + ExplorerFileDefinition.Job.Extension, FileMode.Create))
+ {
+ jobFile.WriteTo(fs);
+ }
+
+ await NotificationProvider.ShowSuccess("Job saved successfully.");
+ }
+ catch (Exception ex)
{
- jobFile.WriteTo(fs);
+ LogManager.Log(ex, $"Error saving job {selected_job.Name} to file.");
+ await NotificationProvider.ShowError($"An error occurred while trying to save the job.\n{ex.Message}");
}
-
- await NotificationProvider.ShowSuccess("Job saved successfully.");
}
- catch (Exception ex)
+ else
{
- LogManager.Log(ex, $"Error saving job {selected_job.Name} to file.");
- await NotificationProvider.ShowError($"An error occurred while trying to save the job.\n{ex.Message}");
+ foreach (var job in selectedJobs)
+ {
+ try
+ {
+ var jobFile = await job.ToJobFile();
+
+ using (FileStream fs = new FileStream(Path.Combine(result.Path, jobFile.Name.ToValidFileName()) + ExplorerFileDefinition.Job.Extension, FileMode.Create))
+ {
+ jobFile.WriteTo(fs);
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error saving job {job.Name} to file.");
+ await NotificationProvider.ShowError($"An error occurred while trying to save the job.\n{ex.Message}");
+ }
+ }
+
+ await NotificationProvider.ShowSuccess("Jobs saved successfully.");
}
}
}
@@ -784,7 +830,7 @@ namespace Tango.PPC.Jobs.ViewModels
#region Handle Job File Loading From Storage
- private async void HandleJobFileLoaded(ExplorerFileItem jobFile)
+ private async void HandleJobFileLoaded(List<ExplorerFileItem> jobFiles)
{
var vm = await NotificationProvider.ShowDialog<ImportJobViewVM>();
@@ -792,29 +838,35 @@ namespace Tango.PPC.Jobs.ViewModels
{
using (ObservablesContext jobContext = ObservablesContext.CreateDefault())
{
- try
+ foreach (var jobFile in jobFiles)
{
- JobFile jFile = JobFile.Parser.ParseFrom(File.ReadAllBytes(jobFile.Path));
- var job = await Job.FromJobFile(jFile, MachineProvider.Machine.Guid, AuthenticationProvider.CurrentUser.Guid);
- jobContext.Jobs.Add(job);
- await jobContext.SaveChangesAsync();
- LoadJobs(() =>
+ try
{
- if (vm.ImportAndEdit)
- {
- var postJob = Jobs.SingleOrDefault(x => x.Guid == job.Guid);
- if (postJob != null)
- {
- SelectJob(postJob, true);
- }
- }
- });
+ JobFile jFile = JobFile.Parser.ParseFrom(File.ReadAllBytes(jobFile.Path));
+ var job = await Job.FromJobFile(jFile, MachineProvider.Machine.Guid, null);
+ job.JobSource = JobSource.Local;
+ jobContext.Jobs.Add(job);
+ await jobContext.SaveChangesAsync();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error occurred while trying to import job from file {jobFile.Path}.");
+ await NotificationProvider.ShowError($"An error occurred while trying to import the selected job file.\n{ex.Message}");
+ }
}
- catch (Exception ex)
+
+ LoadJobs(() =>
{
- LogManager.Log(ex, $"Error occurred while trying to import job from file {jobFile.Path}.");
- await NotificationProvider.ShowError($"An error occurred while trying to import the selected job file.\n{ex.Message}");
- }
+ //Editing of a job is currently deprecated due to enabling multiple job imports.
+ //if (vm.ImportAndEdit)
+ //{
+ // var postJob = Jobs.SingleOrDefault(x => x.Guid == job.Guid);
+ // if (postJob != null)
+ // {
+ // SelectJob(postJob, true);
+ // }
+ //}
+ });
}
}
}
@@ -823,8 +875,10 @@ namespace Tango.PPC.Jobs.ViewModels
#region Handle TCC File Loading From Storage
- private async void HandleColorProfileFileLoaded(ExplorerFileItem tccFile)
+ private async void HandleColorProfileFileLoaded(List<ExplorerFileItem> tccFiles)
{
+ var tccFile = tccFiles.FirstOrDefault();
+
try
{
DetectionColorFile tcc = DetectionColorFile.Parser.ParseFrom(File.ReadAllBytes(tccFile.Path));
@@ -853,8 +907,10 @@ namespace Tango.PPC.Jobs.ViewModels
#region Handle Pulse TWN Loading From Storage
- private async void HandlePulseFileLoaded(ExplorerFileItem twnFile)
+ private async void HandlePulseFileLoaded(List<ExplorerFileItem> twnFiles)
{
+ var twnFile = twnFiles.FirstOrDefault();
+
TwnFile twn = TwnFile.FromFile(twnFile.Path);
BitmapSource preview = twn.Thumbnail.ToBitmapSource();
@@ -871,6 +927,32 @@ namespace Tango.PPC.Jobs.ViewModels
#endregion
+ #region Handle New Synchronized Jobs
+
+ private void MachineDataSynchronizer_SynchronizationEnded(object sender, SynchronizationEndedEventArgs e)
+ {
+ if (e.NewChangedJobs > 0 && !_isJobsSynchronizationNotificationActive)
+ {
+ _isJobsSynchronizationNotificationActive = true;
+
+ var item = NotificationProvider.PushNotification<NewSynchronizardJobsNotificationItem>();
+ item.Pressed += (_, __) =>
+ {
+ _isJobsSynchronizationNotificationActive = false;
+ LoadJobs(() =>
+ {
+ NotificationProvider.ShowSuccess("Your job list is now synchronized.");
+ });
+ };
+ item.Closed += (_, __) =>
+ {
+ _isJobsSynchronizationNotificationActive = false;
+ };
+ }
+ }
+
+ #endregion
+
#region Color Profile Request
private void ExternalBridgeService_ColorProfileRequest(object sender, ColorProfileRequestEventArgs e)
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs
index ed1e28f55..579e1e2f7 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs
@@ -11,6 +11,7 @@ using Tango.Integration.Operation;
using Tango.PPC.Common;
using Tango.PPC.Common.Notifications;
using Tango.PPC.Common.Notifications.NotificationItems;
+using Tango.PPC.Jobs.AppBarItems;
using Tango.PPC.Jobs.Messages;
using Tango.PPC.Jobs.NavigationObjects;
using Tango.PPC.Jobs.Views;
@@ -24,6 +25,9 @@ namespace Tango.PPC.Jobs.ViewModels
public class MainViewVM : PPCViewModel
{
private NotificationItem _last_failed_job_notification;
+ private JobHandler _handler;
+ private bool resuming;
+ private JobProgressAppBarItem _appBarItem;
/// <summary>
/// Called when the application has been started.
@@ -33,23 +37,42 @@ namespace Tango.PPC.Jobs.ViewModels
MachineProvider.MachineOperator.PrintingCompleted += MachineOperator_PrintingCompleted;
MachineProvider.MachineOperator.PrintingFailed += MachineOperator_PrintingFailed;
MachineProvider.MachineOperator.ResumingJob += MachineOperator_ResumingJob;
+ MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted;
+ MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded;
+ NavigationManager.CurrentVMChanged += NavigationManager_CurrentVMChanged;
}
- private async void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e)
+ private void MachineOperator_PrintingEnded(object sender, PrintingEventArgs e)
{
- LogManager.Log($"Trying to resume job '{e.JobGuid}'...");
+ _appBarItem?.Close();
+ _appBarItem = null;
+ }
- try
+ private void NavigationManager_CurrentVMChanged(object sender, PPCViewModel vm)
+ {
+ if (vm.GetType() == typeof(JobProgressViewVM))
{
- var job = await new JobBuilder(ObservablesContext.CreateDefault()).Set(e.JobGuid)
- .WithConfiguration()
- .WithRML()
- .WithUser()
- .WithSegments()
- .WithBrushStops()
- .BuildAsync();
+ _appBarItem?.Close();
+ _appBarItem = null;
+ }
+ else if (vm.GetType() != typeof(JobSummeryViewVM) && _appBarItem == null && MachineProvider.MachineOperator.IsPrinting && _handler != null && !_handler.IsCanceled)
+ {
+ _appBarItem = NotificationProvider.PushAppBarItem<JobProgressAppBarItem>();
+ _appBarItem.Pressed += (_, __) =>
+ {
+ _appBarItem?.Close();
+ NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
+ };
+ }
+ }
- e.Approve(job);
+ private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e)
+ {
+ _handler = e.JobHandler;
+
+ if (resuming)
+ {
+ resuming = false;
InvokeUI(() =>
{
@@ -62,6 +85,17 @@ namespace Tango.PPC.Jobs.ViewModels
}
});
}
+ }
+
+ private void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e)
+ {
+ LogManager.Log($"Job resume request '{e.JobGuid}' approving...");
+
+ try
+ {
+ e.Approve();
+ resuming = true;
+ }
catch (Exception ex)
{
LogManager.Log(ex, "An error occurred while trying to resume the job.");
@@ -79,13 +113,15 @@ namespace Tango.PPC.Jobs.ViewModels
/// <param name="e">The <see cref="Integration.Operation.PrintingFailedEventArgs"/> instance containing the event data.</param>
private void MachineOperator_PrintingFailed(object sender, PrintingFailedEventArgs e)
{
+ String message = $"{e.Exception.FlattenMessage()}";
+
_last_failed_job_notification = NotificationProvider.PushNotification(new MessageNotificationItem(
- String.Format("'{0}' failed.", e.Job.Name),
- String.Format("The job '{1}' has failed due to unexpected error.{0}{2}{0}{0}Tap to view this job details.", Environment.NewLine, e.Job.Name, e.Exception), MessageNotificationItem.MessageNotificationItemTypes.Error, () =>
+ $"'{e.Job.Name}' failed at position {e.JobHandler.Status.ProgressMinusSettingUp.ToString("0.0")} out of {e.JobHandler.Status.TotalProgressMinusSettingUp.ToString("0.0")} meters.",
+ message, MessageNotificationItem.MessageNotificationItemTypes.Error, () =>
{
NavigationManager.NavigateWithObject<JobsModule, JobView, Job>(e.Job);
NavigationManager.ClearHistoryExcept<JobsView>();
- }));
+ }, NotificationItem.NotificationPriority.VeryHigh));
}
/// <summary>
@@ -119,7 +155,7 @@ namespace Tango.PPC.Jobs.ViewModels
{
NavigationManager.NavigateWithObject<JobsModule, JobView, JobNavigationObject>(new JobNavigationObject() { Job = e.Job });
NavigationManager.ClearHistoryExcept<JobsView>();
- }));
+ }, NotificationItem.NotificationPriority.VeryHigh));
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml
index 3b92581bc..40cfc40f9 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml
@@ -19,7 +19,7 @@
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 100 0 0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <TextBlock FontSize="{StaticResource TangoHeaderFontSize}" Text="{Binding Job.Name,FallbackValue='Job Name'}"></TextBlock>
+ <TextBlock FontSize="{StaticResource TangoHeaderFontSize}" Text="{Binding Job.Name,FallbackValue='Job Name'}" TextWrapping="Wrap" MaxWidth="700"></TextBlock>
<TextBlock FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Center" Margin="10 0 0 0" Visibility="{Binding Job.Designation,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='SampleDye'}">(Sample)</TextBlock>
<TextBlock FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Center" Margin="10 0 0 0" Visibility="{Binding Job.Designation,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='FineTuning'}">(Fine Tuning)</TextBlock>
</StackPanel>
@@ -38,6 +38,8 @@
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True">
+ <Setter Property="Maximum" Value="100"></Setter>
+ <Setter Property="Value" Value="99.9999999"></Setter>
<Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True">
@@ -98,7 +100,7 @@
<StackPanel Height="90" Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Image Source="../Images/JobProgressView/drop.png" Stretch="None" />
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Getting ready...</TextBlock>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Getting Ready...</TextBlock>
</StackPanel>
</StackPanel>
@@ -117,8 +119,8 @@
</Grid>
<Grid Margin="0 150 0 0">
- <StackPanel>
- <Canvas Height="80" Margin="5 0">
+ <StackPanel MaxWidth="600">
+ <Canvas Height="80" Margin="0">
<StackPanel>
<StackPanel.Style>
<Style TargetType="StackPanel">
@@ -138,64 +140,58 @@
</Style.Triggers>
</Style>
</StackPanel.Style>
- <StackPanel Margin="-50 0 0 0">
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Text" Value="now dyeing"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True">
- <Setter Property="Text" Value="getting ready"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- </TextBlock>
- <touch:TouchIcon Margin="0 8 0 0" HorizontalAlignment="Center" Icon="Water" Angle="180" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="40" Height="40" />
- </StackPanel>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">job canceled</TextBlock>
- <touch:TouchIcon Margin="0 8 0 0" HorizontalAlignment="Center" Icon="Alert" Foreground="{StaticResource TangoWarningBrush}" Width="40" Height="40" />
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">job failed</TextBlock>
- <touch:TouchIcon Margin="0 8 0 0" HorizontalAlignment="Center" Icon="AlertOctagon" Foreground="{StaticResource TangoErrorBrush}" Width="40" Height="40" />
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">job completed</TextBlock>
- <touch:TouchIcon Margin="0 8 0 0" HorizontalAlignment="Center" Icon="Check" Foreground="{StaticResource TangoSuccessBrush}" Width="40" Height="40" />
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
+ <StackPanel Margin="-20 20 0 0">
+ <StackPanel>
+ <Canvas HorizontalAlignment="Center">
+ <TextBlock Margin="0 -25 0 0" Canvas.Left="{Binding RelativeSource={RelativeSource Mode=Self},Path=ActualWidth,Converter={StaticResource MathOperatorConverter},ConverterParameter='*-0.5'}" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Text" Value="Now Dyeing"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True">
+ <Setter Property="Text" Value="Getting Ready"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True">
+ <Setter Property="Text" Value="Job Canceled"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True">
+ <Setter Property="Text" Value="Job Failed"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True">
+ <Setter Property="Text" Value="Job Completed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </Canvas>
+ <touch:TouchIcon Margin="0 8 0 0" HorizontalAlignment="Center" Width="40" Height="40">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
+ <Setter Property="Angle" Value="180"></Setter>
+ <Setter Property="Icon" Value="Water"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True">
+ <Setter Property="Angle" Value="0"></Setter>
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True">
+ <Setter Property="Angle" Value="0"></Setter>
+ <Setter Property="Icon" Value="AlertOctagon"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True">
+ <Setter Property="Angle" Value="0"></Setter>
+ <Setter Property="Icon" Value="Check"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ </StackPanel>
</StackPanel>
</StackPanel>
</Canvas>
@@ -214,5 +210,23 @@
Go to job
</touch:TouchButton>
</StackPanel>
+
+ <touch:TouchButton Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Bottom" Margin="0 100 0 0" Command="{Binding DisplayJobOutlineCommand}" Style="{StaticResource TangoLinkButton}" Height="60" FontSize="{StaticResource TangoTitleFontSize}">
+ Display Job Outline
+ </touch:TouchButton>
+
+ <Grid Visibility="{Binding IsDisplayJobOutline,Converter={StaticResource BooleanToVisibilityConverter}}" Background="{StaticResource TangoPrimaryBackgroundBrush}" Opacity="0.8"/>
+
+ <Grid Margin="0 -10 0 0" Visibility="{Binding IsDisplayJobOutline,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <Grid>
+ <touch:TouchScrollViewer BorderThickness="0" Padding="10" Margin="0 0 0 100">
+ <global:JobOutlineControl BorderThickness="0" Margin="20" DataContext="{Binding JobOutlineTicket}" HorizontalAlignment="Left" />
+ </touch:TouchScrollViewer>
+ </Grid>
+
+ <touch:TouchButton Background="{StaticResource TangoPrimaryBackgroundBrush}" VerticalAlignment="Bottom" Margin="0 100 0 0" Command="{Binding HideJobOutlineCommand}" Style="{StaticResource TangoLinkButton}" Height="60" FontSize="{StaticResource TangoTitleFontSize}">
+ Hide Job Outline
+ </touch:TouchButton>
+ </Grid>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml
index 80a427714..4785805a6 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml
@@ -54,7 +54,7 @@
<RowDefinition Height="300*"/>
</Grid.RowDefinitions>
- <TextBlock FontSize="{StaticResource TangoHeaderFontSize}" Text="{Binding Job.Name}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
+ <TextBlock FontSize="{StaticResource TangoHeaderFontSize}" Text="{Binding Job.Name}" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap"></TextBlock>
<Grid Grid.Row="1" Width="360" Height="360">
<touch:TouchBusyIndicator Opacity="0.6" IsIndeterminate="False" Foreground="{StaticResource TangoGrayBrush}" StrokeThickness="10" Minimum="0" Maximum="100" Value="99.999" Width="Auto" Height="Auto">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
index 57101569a..6a94034db 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
@@ -26,6 +26,8 @@
<BitmapImage x:Key="Image_Out_Of_Gamut" UriSource="../Images/JobView/error.png" />
<BitmapImage x:Key="Image_Replace_Color" UriSource="../Images/JobView/replace-color.png" />
<BitmapImage x:Key="Image_Color_Picker" UriSource="../Images/JobView/color-picker.png" />
+ <BitmapImage x:Key="Image_Transparent" UriSource="../Images/JobView/transparent.jpg" />
+ <BitmapImage x:Key="Image_TransparentSmall" UriSource="../Images/JobView/transparent_small.jpg" />
<Style TargetType="FrameworkElement" x:Key="Level1Container">
@@ -111,9 +113,24 @@
<StackPanel>
<StackPanel Orientation="Horizontal">
<Border Width="48" Height="48" CornerRadius="5" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
- <Border.Background>
- <SolidColorBrush Color="{Binding Color,IsAsync=True}"></SolidColorBrush>
- </Border.Background>
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Background">
+ <Setter.Value>
+ <SolidColorBrush Color="{Binding Color,IsAsync=True}" />
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsTransparent,IsAsync=True}" Value="True" >
+ <Setter Property="Background">
+ <Setter.Value>
+ <ImageBrush ImageSource="{StaticResource Image_TransparentSmall}" Stretch="None" />
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
</Border>
<TextBlock Margin="30 0 0 0" FontSize="{StaticResource TangoTitleFontSize}">
@@ -147,6 +164,17 @@
<DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Volume">
<Setter Property="ContentTemplate" Value="{StaticResource Volume_Template}" />
</DataTrigger>
+ <DataTrigger Binding="{Binding IsTransparent,IsAsync=True}" Value="True">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <Grid Height="40">
+ <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayBrush}">Transparent</TextBlock>
+ </Grid>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
@@ -172,7 +200,10 @@
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 0 -130 0" HorizontalAlignment="Right" VerticalAlignment="Top">
- <touch:TouchImageButton Command="{Binding ElementName=view,Path=DataContext.ReplaceBrushStopCommand,IsAsync=True}" CommandParameter="{Binding}" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}" Width="50" Height="50" Padding="10" Image="{StaticResource Image_Replace_Color}" CornerRadius="30"></touch:TouchImageButton>
+ <StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,IsAsync=True,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
+ <!--<touch:TouchToggleIconButton Padding="15" Width="60" Height="60" CornerRadius="30" Icon="EyeOutline" CheckedIcon="EyeOffOutline" Foreground="{StaticResource TangoGrayBrush}" CheckedForeground="{StaticResource TangoGrayBrush}" IsChecked="{Binding IsTransparent,IsAsync=True}"></touch:TouchToggleIconButton>-->
+ <touch:TouchImageButton Command="{Binding ElementName=view,Path=DataContext.ReplaceBrushStopCommand,IsAsync=True}" CommandParameter="{Binding}" Visibility="{Binding ColorSpace,Converter={StaticResource ColorSpaceToVisibilityConverter},IsAsync=True}" Width="50" Height="50" Padding="10" Image="{StaticResource Image_Replace_Color}" CornerRadius="30"></touch:TouchImageButton>
+ </StackPanel>
<touch:TouchIconButton Margin="0 0 50 0" Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding ElementName=view,Path=DataContext.RemoveBrushStopCommand,IsAsync=True}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
</StackPanel>
</Grid>
@@ -214,7 +245,11 @@
</Style.Triggers>
</Style>
</DockPanel.Style>
- <Border DockPanel.Dock="Left" Background="{Binding SegmentBrush}" BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoLightBorderBrush}">
+
+ <Border DockPanel.Dock="Left" BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoLightBorderBrush}">
+ <Border.Background>
+ <ImageBrush ImageSource="{StaticResource Image_Transparent}" Stretch="None" />
+ </Border.Background>
<Border.Style>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="8 0 0 8"></Setter>
@@ -233,6 +268,26 @@
</Style.Triggers>
</Style>
</Border.Style>
+ <Border Background="{Binding SegmentBrush}">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="CornerRadius" Value="8 0 0 8"></Setter>
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,IsAsync=True}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked,IsAsync=True}" Value="True">
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='*2',IsAsync=True}"></Setter>
+ </DataTrigger>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="True"></Condition>
+ <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked,IsAsync=True}" Value="True"></Condition>
+ </MultiDataTrigger.Conditions>
+ <Setter Property="CornerRadius" Value="8 0 0 0"></Setter>
+ </MultiDataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ </Border>
</Border>
<Grid>
@@ -247,77 +302,90 @@
</TextBlock>
</StackPanel>
- <StackPanel Margin="0 30 0 0" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="300" Visibility="{Binding ElementName=toggle_large_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}">
- <DockPanel LastChildFill="False">
- <DockPanel.Style>
- <Style TargetType="DockPanel">
- <Setter Property="Visibility" Value="Visible"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="True">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </DockPanel.Style>
- <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Color code:"></TextBlock>
+ <Grid>
+ <StackPanel Margin="0 30 0 0" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="300" Visibility="{Binding ElementName=toggle_large_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}">
+ <DockPanel LastChildFill="False">
+ <DockPanel.Style>
+ <Style TargetType="DockPanel">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="True">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </DockPanel.Style>
+ <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Color code:"></TextBlock>
- <Grid DockPanel.Dock="Right" DataContext="{Binding BrushStops[0],IsAsync=True}">
- <StackPanel>
- <ContentControl Focusable="False" FocusVisualStyle="{x:Null}" d:DataContext="{d:DesignInstance Type=entities:BrushStop, IsDesignTimeCreatable=False}" Content="{Binding}" Width="180">
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
+ <Grid DockPanel.Dock="Right" DataContext="{Binding BrushStops[0],IsAsync=True}">
+ <StackPanel>
+ <ContentControl Focusable="False" FocusVisualStyle="{x:Null}" d:DataContext="{d:DesignInstance Type=entities:BrushStop, IsDesignTimeCreatable=False}" Content="{Binding}" Width="180">
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="RGB">
- <Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="CMYK">
- <Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="LAB">
- <Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Catalog">
- <Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Volume">
- <Setter Property="ContentTemplate" Value="{StaticResource Volume_Template}" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
- </StackPanel>
- </Grid>
- </DockPanel>
- <Canvas>
- <Canvas.Style>
- <Style TargetType="Canvas">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="False" />
- <Condition Binding="{Binding BrushStops[0].IsOutOfGamut,IsAsync=True}" Value="True" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Visibility" Value="Visible"></Setter>
- </MultiDataTrigger>
- </Style.Triggers>
- </Style>
- </Canvas.Style>
- <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock>
- </Canvas>
- <DockPanel LastChildFill="False" Margin="0 20 0 0">
- <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):"></TextBlock>
- <touch:TouchNumericTextBox Width="180" DockPanel.Dock="Right" Value="{Binding Length}" StringFormat="0.0" AutoCalculateJogStep="False" HasDecimalPoint="True" Minimum="1" Maximum="100000" KeyboardContainer="{Binding ElementName=Container}" />
- </DockPanel>
- </StackPanel>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="RGB">
+ <Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="CMYK">
+ <Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="LAB">
+ <Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Catalog">
+ <Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Volume">
+ <Setter Property="ContentTemplate" Value="{StaticResource Volume_Template}" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsTransparent,IsAsync=True}" Value="True">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <Grid Height="40">
+ <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayBrush}">Transparent</TextBlock>
+ </Grid>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </StackPanel>
+ </Grid>
+ </DockPanel>
+ <Canvas>
+ <Canvas.Style>
+ <Style TargetType="Canvas">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="False" />
+ <Condition Binding="{Binding BrushStops[0].IsOutOfGamut,IsAsync=True}" Value="True" />
+ </MultiDataTrigger.Conditions>
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </MultiDataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Canvas.Style>
+ <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock>
+ </Canvas>
+ <DockPanel LastChildFill="False" Margin="0 20 0 0">
+ <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):"></TextBlock>
+ <touch:TouchNumericTextBox Width="180" DockPanel.Dock="Right" Value="{Binding Length}" StringFormat="0.0" AutoCalculateJogStep="False" HasDecimalPoint="True" Minimum="1" Maximum="100000" KeyboardContainer="{Binding ElementName=Container}" />
+ </DockPanel>
+ </StackPanel>
+ </Grid>
</DockPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 10 10 0">
@@ -334,23 +402,27 @@
</TextBlock.Style>
</TextBlock>
- <touch:TouchImageButton Command="{Binding ElementName=view,Path=DataContext.ReplaceBrushStopCommand}" CommandParameter="{Binding BrushStops[0]}" Width="50" Height="50" Padding="10" Image="{StaticResource Image_Replace_Color}" CornerRadius="30">
- <touch:TouchImageButton.Style>
- <Style TargetType="{x:Type touch:TouchImageButton}" BasedOn="{StaticResource {x:Type touch:TouchImageButton}}">
+ <StackPanel Orientation="Horizontal">
+ <StackPanel.Style>
+ <Style TargetType="StackPanel">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding ElementName=toggleEdit,Path=IsChecked,IsAsync=True}" Value="False" />
<Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked,IsAsync=True}" Value="True" />
<Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="False" />
- <Condition Binding="{Binding BrushStops[0].IsOutOfGamut,IsAsync=True}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Visible"></Setter>
</MultiDataTrigger>
</Style.Triggers>
</Style>
- </touch:TouchImageButton.Style>
- </touch:TouchImageButton>
+ </StackPanel.Style>
+
+ <!--<touch:TouchToggleIconButton Padding="15" Width="60" Height="60" CornerRadius="30" Icon="EyeOutline" CheckedIcon="EyeOffOutline" Foreground="{StaticResource TangoGrayBrush}" CheckedForeground="{StaticResource TangoGrayBrush}" IsChecked="{Binding BrushStops[0].IsTransparent,IsAsync=True}"></touch:TouchToggleIconButton>-->
+
+ <touch:TouchImageButton Visibility="{Binding BrushStops[0].ColorSpace,Converter={StaticResource ColorSpaceToVisibilityConverter},IsAsync=True}" Command="{Binding ElementName=view,Path=DataContext.ReplaceBrushStopCommand}" CommandParameter="{Binding BrushStops[0]}" Width="50" Height="50" Padding="10" Image="{StaticResource Image_Replace_Color}" CornerRadius="30"></touch:TouchImageButton>
+ </StackPanel>
<StackPanel Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}" Orientation="Horizontal">
@@ -454,9 +526,9 @@
<touch:TouchComboBox ItemsSource="{Binding Rmls}" SelectedItem="{Binding Job.Rml}" DisplayMemberPath="Name" Title="Select Thread" />
<TextBlock>Comment:</TextBlock>
- <TextBox Margin="20 0 0 -42" Text="{Binding Job.Description}" FocusVisualStyle="{x:Null}" BorderBrush="{StaticResource TangoDividerBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" AcceptsReturn="True" TextWrapping="Wrap" Height="60" Padding="5" keyboard:KeyboardView.Container="{Binding ElementName=Container}" keyboard:KeyboardView.Mode="AlphaNumeric">
+ <touch:TouchMultiLineTextBox Margin="20 0 0 -42" Text="{Binding Job.Description}" Height="60" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
- </TextBox>
+ </touch:TouchMultiLineTextBox>
</controls:TableGrid>
<Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
@@ -559,7 +631,6 @@
<touch:TouchToggleImageButton x:Name="toggleEdit" UncheckedImage="../Images/pencil-gray.png"
CheckedImage="../Images/pencil-blue.png"
DockPanel.Dock="Right"
- IsChecked="{Binding IsSelected}"
Padding="8" CornerRadius="30" Width="40" Height="40">
</touch:TouchToggleImageButton>
<!--<touch:TouchToggleIconButton x:Name="toggleEdit" DockPanel.Dock="Right" Icon="Pencil" CheckedIcon="Pencil" Padding="8" CornerRadius="20" />-->
@@ -647,63 +718,61 @@
</touch:TouchDropShadowBorder>
</touch:TouchVirtualizedContentControl>
- <touch:TouchVirtualizedContentControl Margin="0 20 0 0" >
- <touch:TouchDropShadowBorder Padding="0 0 0 50">
- <StackPanel>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
- <Image Source="../Images/JobView/job-summary.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Summary</TextBlock>
- </StackPanel>
+ <touch:TouchDropShadowBorder Padding="0 20 0 50" Margin="0 0 0 15">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/JobView/job-summary.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Summary</TextBlock>
+ </StackPanel>
- <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
- <Grid>
- <localControls:JobSummeryViewer DataContext="{Binding Job,IsAsync=True}" Height="40"/>
- </Grid>
+ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
+ <Grid>
+ <localControls:JobSummeryViewer DataContext="{Binding Job,IsAsync=True}" Height="40"/>
+ </Grid>
- <DockPanel Margin="0 30 0 0" LastChildFill="False">
+ <DockPanel Margin="0 30 0 0" LastChildFill="False">
- <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center">
- <TextBlock>
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center">
+ <TextBlock>
<Run Text="Job length (m):"></Run>
<Run Text="{Binding Job.Length,Mode=OneWay}"></Run>
- </TextBlock>
- <TextBlock Foreground="{StaticResource TangoGrayTextBrush}">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.LengthPercentageFactor,Converter={StaticResource GreaterThanToBooleanConverter},ConverterParameter=0}" Value="True">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
+ </TextBlock>
+ <TextBlock Foreground="{StaticResource TangoGrayTextBrush}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.LengthPercentageFactor,Converter={StaticResource GreaterThanToBooleanConverter},ConverterParameter=0}" Value="True">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
<Run>(</Run><Run Text="{Binding Job.Length,Mode=OneWay}"></Run><Run>+</Run><Run Text="{Binding Job.LengthPercentageFactor,Mode=OneWay}"></Run><Run>%</Run><Run>)</Run>
- </TextBlock>
- </StackPanel>
+ </TextBlock>
+ </StackPanel>
- <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0">
- <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Bottom">
+ <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0">
+ <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Bottom">
<Run Text="Factor: +"></Run>
- </TextBlock>
+ </TextBlock>
- <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Maximum="100" Minimum="0" Value="{Binding Job.LengthPercentageFactor}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
+ <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Maximum="100" Minimum="0" Value="{Binding Job.LengthPercentageFactor}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
- <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayTextBrush}">%</TextBlock>
+ <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayTextBrush}">%</TextBlock>
- <Image Margin="10 0 0 0" Source="../Images/JobView/settings.png" VerticalAlignment="Bottom" />
- </StackPanel>
- </DockPanel>
- </StackPanel>
+ <Image Margin="10 0 0 0" Source="../Images/JobView/settings.png" VerticalAlignment="Bottom" />
+ </StackPanel>
+ </DockPanel>
</StackPanel>
- </touch:TouchDropShadowBorder>
- </touch:TouchVirtualizedContentControl>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
- <StackPanel HorizontalAlignment="Center" Margin="20 40 0 40" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <StackPanel Visibility="Collapsed" HorizontalAlignment="Center" Margin="20 40 0 40" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Additional Tools</TextBlock>
</StackPanel>
- <touch:TouchVirtualizedContentControl>
+ <!--<touch:TouchVirtualizedContentControl>
<touch:TouchExpander x:Name="expander_sample_dye" Margin="0 0 0 0" Padding="20 15">
<touch:TouchExpander.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
@@ -871,7 +940,7 @@
</touch:TouchVirtualizedContentControl>
<touch:TouchVirtualizedContentControl>
- <touch:TouchExpander x:Name="expander_fine_tuning" Margin="0 20 0 120" Padding="20 15" IsExpanded="{Binding IsFineTuneExpanded,Mode=TwoWay}" Visibility="{Binding Job.ColorSpace,Converter={StaticResource ColorSpaceToVisibilityConverter}}">
+ <touch:TouchExpander x:Name="expander_fine_tuning" Margin="0 20 0 120" Padding="20 15" IsExpanded="{Binding IsFineTuneExpanded,Mode=TwoWay}" Visibility="{Binding Job.ColorSpace,Converter={StaticResource ColorSpaceToVisibilityConverter},ConverterParameter='RGB,LAB'}">
<touch:TouchExpander.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
<Image Source="../Images/JobView/color-fine-tuning.png" Width="39" />
@@ -1102,7 +1171,7 @@
</ContentControl>
</StackPanel>
</touch:TouchExpander>
- </touch:TouchVirtualizedContentControl>
+ </touch:TouchVirtualizedContentControl>-->
</StackPanel>
</StackPanel>
</touch:LightTouchScrollViewer>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs
index 880aa8a3a..86a8d2a37 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs
@@ -54,16 +54,16 @@ namespace Tango.PPC.Jobs.Views
public async void DisplaySampleDye()
{
- expander_sample_dye.IsExpanded = true;
- await Task.Delay(500);
- scrollViewer.ScrollToElement(expander_sample_dye);
+ //expander_sample_dye.IsExpanded = true;
+ //await Task.Delay(500);
+ //scrollViewer.ScrollToElement(expander_sample_dye);
}
public async void DisplayFineTuning()
{
- expander_fine_tuning.IsExpanded = true;
- await Task.Delay(500);
- scrollViewer.ScrollToElement(expander_fine_tuning);
+ //expander_fine_tuning.IsExpanded = true;
+ //await Task.Delay(500);
+ //scrollViewer.ScrollToElement(expander_fine_tuning);
}
public void OnNavigatedFrom()
@@ -94,6 +94,10 @@ namespace Tango.PPC.Jobs.Views
borderEditDock.Visibility = Visibility.Collapsed;
}
}
+ else if (_is_edit_docked)
+ {
+ FloatEditing();
+ }
}
private void DockEditing()
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml
index c615583bc..94abe6b83 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml
@@ -214,14 +214,14 @@
<touch:LightTouchDataGridColumn Width="1*" Header="Name" SortMember="Name" HorizontalContentAlignment="Left">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <controls:FastTextBlock IsHitTestVisible="False" Text="{Binding Name,IsAsync=True}"></controls:FastTextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding Name,Converter={StaticResource StringEllipsisConverter},ConverterParameter='40'}"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
<touch:LightTouchDataGridColumn Width="117" Header="Length (m)" SortMember="Length">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <controls:FastTextBlock IsHitTestVisible="False" Text="{Binding Length,StringFormat=0.0,IsAsync=True}"></controls:FastTextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding Length,StringFormat=0.0}"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
@@ -235,7 +235,7 @@
<touch:LightTouchDataGridColumn Width="100" Header="Updated" SortMember="LastUpdated">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <controls:FastTextBlock IsHitTestVisible="False" Text="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter},IsAsync=True}"></controls:FastTextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
@@ -314,21 +314,21 @@
<touch:LightTouchDataGridColumn Width="100" Header="Status" SortMember="JobStatus" HorizontalContentAlignment="Left">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <controls:FastTextBlock IsHitTestVisible="False" Text="{Binding JobStatus,Converter={StaticResource EnumToDescriptionConverter},IsAsync=True}" HorizontalAlignment="Left" VerticalAlignment="Center"></controls:FastTextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding JobStatus,Converter={StaticResource EnumToDescriptionConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
<touch:LightTouchDataGridColumn Width="1*" Header="Name" SortMember="Name" HorizontalContentAlignment="Left">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <controls:FastTextBlock IsHitTestVisible="False" Text="{Binding Name,IsAsync=True}" HorizontalAlignment="Left" VerticalAlignment="Center"></controls:FastTextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding Name,Converter={StaticResource StringEllipsisConverter},ConverterParameter='40'}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
<touch:LightTouchDataGridColumn Width="117" Header="Length (m)" SortMember="Length">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <controls:FastTextBlock IsHitTestVisible="False" Text="{Binding Length,StringFormat=0.0,IsAsync=True}"></controls:FastTextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding Length,StringFormat=0.0}"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
@@ -342,7 +342,7 @@
<touch:LightTouchDataGridColumn Width="100" Header="Updated" SortMember="LastUpdated">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <controls:FastTextBlock IsHitTestVisible="False" Text="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter},IsAsync=True}"></controls:FastTextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>