aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-28 19:38:01 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-28 19:38:01 +0300
commit61f41a507e70fe0dfd30c46fd9ad04ce490df2c4 (patch)
treeaf7a6c5b613280a7e42080e5cc7f3f1e8af8ec0d /Software/Visual_Studio/PPC/Modules
parent3bed1b881037c06d160573583be4d85dc186d3a7 (diff)
parent363603ac89278995f8c7730c6fc92a8e19ed1f92 (diff)
downloadTango-61f41a507e70fe0dfd30c46fd9ad04ce490df2c4.tar.gz
Tango-61f41a507e70fe0dfd30c46fd9ad04ce490df2c4.zip
merged
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/GeneralView.xaml25
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/machine_small.pngbin0 -> 37734 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj5
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml14
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml5
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.pngbin0 -> 1857 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/JobSummeryNavigationObject.cs16
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs54
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs106
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs17
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs44
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml1179
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml.cs11
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs27
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml25
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs11
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml26
23 files changed, 975 insertions, 632 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/GeneralView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/GeneralView.xaml
index edec8cb55..8ba021afb 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/GeneralView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsViews/GeneralView.xaml
@@ -3,10 +3,29 @@
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:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.PPC.Events.EventsViews"
mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <Grid>
- <Image Source="../Images/event_demo.png" RenderOptions.BitmapScalingMode="Fant" />
+ d:DesignHeight="220" d:DesignWidth="750" d:DataContext="{d:DesignInstance Type=entities:MachinesEvent, IsDesignTimeCreatable=False}">
+ <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
+ <DockPanel>
+ <Image Stretch="None" Margin="20" DockPanel.Dock="Right" Source="../Images/machine_small.png" RenderOptions.BitmapScalingMode="Fant" />
+ <DockPanel Margin="35 20 20 20">
+ <TextBlock FontSize="{StaticResource TangoTitleFontSize}" FontWeight="SemiBold" DockPanel.Dock="Top" Text="{Binding EventType.Title,FallbackValue='Unknown Event'}"></TextBlock>
+
+ <StackPanel Margin="0 30 0 0">
+ <TextBlock TextWrapping="Wrap" FontWeight="SemiBold" Text="{Binding EventType.Description,FallbackValue='No Description'}"></TextBlock>
+ <Rectangle Margin="0 5 0 10" StrokeThickness="2" Stroke="{StaticResource TangoDividerBrush}" />
+
+ <ItemsControl ItemsSource="{Binding EventType.Guidance,Converter={StaticResource StringToLinesConverter}}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Margin="0 10 0 0" Text="{Binding}" TextWrapping="Wrap"></TextBlock>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+ </DockPanel>
+ </DockPanel>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/machine_small.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/machine_small.png
new file mode 100644
index 000000000..8b86bfe25
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/machine_small.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
index 815223834..e446e3812 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj
@@ -167,10 +167,13 @@
<ItemGroup>
<Resource Include="Images\events.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\machine_small.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.Events/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
index 9ee24ad38..49e0763d9 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
@@ -132,7 +132,7 @@ namespace Tango.PPC.Events.ViewModels
var notificationItem = new MessageNotificationItem();
notificationItem.CanClose = false;
notificationItem.Message = ev.EventType.Title;
- notificationItem.ExpandedMessage = ev.Description;
+ notificationItem.ExpandedMessage = ev.EventType.Description;
notificationItem.Pressed += async (_, __) =>
{
SelectedEventsSource = EventsSource.CURRENT;
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml
index 3477a5349..af42a5576 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Views/MainView.xaml
@@ -83,7 +83,7 @@
<touch:LightTouchDataGridColumn Width="1*" Header="Title" SortMember="Name" HorizontalContentAlignment="Left">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <TextBlock IsHitTestVisible="False" Text="{Binding Name,Mode=OneWay}"></TextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding EventType.Title,Mode=OneWay}"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
@@ -168,7 +168,7 @@
<touch:LightTouchDataGridColumn Width="1*" Header="Title" SortMember="Name" HorizontalContentAlignment="Left">
<touch:LightTouchDataGridColumn.CellTemplate>
<DataTemplate>
- <TextBlock IsHitTestVisible="False" Text="{Binding Name,Mode=OneWay}"></TextBlock>
+ <TextBlock IsHitTestVisible="False" Text="{Binding EventType.Title,Mode=OneWay}"></TextBlock>
</DataTemplate>
</touch:LightTouchDataGridColumn.CellTemplate>
</touch:LightTouchDataGridColumn>
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 e7a416623..fd0a63456 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
@@ -7,7 +7,7 @@
xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.PPC.Jobs.Controls"
mc:Ignorable="d"
- d:DesignHeight="60" d:DesignWidth="500" Height="38" d:DataContext="{d:DesignInstance Type=entities:Job, IsDesignTimeCreatable=False}">
+ d:DesignHeight="60" d:DesignWidth="500" Height="38" d:DataContext="{d:DesignInstance Type=entities:Job, IsDesignTimeCreatable=False}" x:Name="control">
<Grid>
<Grid.ColumnDefinitions>
@@ -20,7 +20,7 @@
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
- <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayMarkers,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments,IsAsync=True}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayMarkers,Converter={StaticResource BooleanToVisibilityConverter}}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
@@ -28,7 +28,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
- <Grid>
+ <Grid x:Name="grid">
<Grid.Width>
<MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}">
<Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.Length"></Binding>
@@ -42,13 +42,13 @@
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth,Converter={StaticResource SmallerThanToBooleanConverter},ConverterParameter=20}" Value="True">
+ <DataTrigger Binding="{Binding ElementName=grid,Path=ActualWidth,Converter={StaticResource SmallerThanToBooleanConverter},ConverterParameter=20}" Value="True">
<Setter Property="Visibility" Value="Collapsed"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
- <Run Text="{Binding LengthWithFactor,Mode=OneWay,StringFormat=N0}"></Run><Run Text="m"></Run>
+ <Run Text="{Binding LengthWithFactor,Mode=OneWay,StringFormat=N0,IsAsync=True}"></Run><Run Text="m"></Run>
</TextBlock>
</Grid>
</DataTemplate>
@@ -67,7 +67,7 @@
</RectangleGeometry>
</Border.Clip>
<Grid>
- <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments}">
+ <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments,IsAsync=True}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
@@ -102,7 +102,7 @@
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}" />
- <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=IsActive}" Value="False" />
+ <Condition Binding="{Binding ElementName=control,Path=IsActive}" Value="False" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Visible"></Setter>
</MultiDataTrigger>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs
index a74a87d28..c2790ee6d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs
@@ -26,6 +26,8 @@ namespace Tango.PPC.Jobs.Converters
return ResourceHelper.GetImageFromResources("Images/NewJob/lab.png");
case ColorSpaces.Twine:
return ResourceHelper.GetImageFromResources("Images/NewJob/twine.png");
+ case ColorSpaces.Volume:
+ return ResourceHelper.GetImageFromResources("Images/NewJob/volume.png");
default:
return ResourceHelper.GetImageFromResources("Images/NewJob/coats.png");
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml
index 0e4f6e38c..cecdf813c 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml
@@ -65,7 +65,9 @@
<Grid>
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="70 0" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" />
- <touch:TouchStaticListBox Margin="0 -40 0 0" VerticalAlignment="Center" Width="440" ItemsSource="{Binding SupportedColorSpaces}" SelectedItem="{Binding SelectedColorSpace,Mode=TwoWay}">
+
+ <Grid Margin="-20 -40 -20 0">
+ <touch:TouchStaticListBox VerticalAlignment="Center" ItemsSource="{Binding SupportedColorSpaces}" SelectedItem="{Binding SelectedColorSpace,Mode=TwoWay}">
<touch:TouchStaticListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1" />
@@ -96,6 +98,7 @@
</DataTemplate>
</touch:TouchStaticListBox.ItemTemplate>
</touch:TouchStaticListBox>
+ </Grid>
</Grid>
</UniformGrid>
</DockPanel>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.png
new file mode 100644
index 000000000..434e704ca
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/volume.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/JobSummeryNavigationObject.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/JobSummeryNavigationObject.cs
new file mode 100644
index 000000000..912b42683
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/JobSummeryNavigationObject.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL;
+using Tango.BL.Entities;
+
+namespace Tango.PPC.Jobs.NavigationObjects
+{
+ public class JobSummeryNavigationObject
+ {
+ public ObservablesContext Context { get; set; }
+ public Job Job { get; set; }
+ }
+}
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 0aac423b8..6e61e9330 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
@@ -190,6 +190,7 @@
<Compile Include="Messages\JobSelectedMessage.cs" />
<Compile Include="Messages\NavigatedToJobsModuleMessage.cs" />
<Compile Include="NavigationObjects\JobNavigationObject.cs" />
+ <Compile Include="NavigationObjects\JobSummeryNavigationObject.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@@ -405,6 +406,9 @@
<ItemGroup>
<Resource Include="Images\jobs.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\NewJob\volume.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
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 264f41131..103a10b28 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
@@ -4,12 +4,14 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
+using Tango.Core.Commands;
using Tango.Integration.Operation;
using Tango.PPC.Common;
using Tango.PPC.Common.Navigation;
using Tango.PPC.Jobs.AppBarItems;
using Tango.PPC.Jobs.AppButtons;
using Tango.PPC.Jobs.Dialogs;
+using Tango.PPC.Jobs.NavigationObjects;
using Tango.PPC.Jobs.Views;
namespace Tango.PPC.Jobs.ViewModels
@@ -47,10 +49,24 @@ namespace Tango.PPC.Jobs.ViewModels
#endregion
+ #region Commands
+
+ /// <summary>
+ /// Gets or sets the go to job command.
+ /// </summary>
+ /// <value>
+ /// The go to job command.
+ /// </value>
+ public RelayCommand GoToJobCommand { get; set; }
+
+ #endregion
+
public JobProgressViewVM()
{
_stop_job_btn = new StopPrintingButton();
_stop_job_btn.Pressed += _stop_job_btn_Pressed;
+
+ GoToJobCommand = new RelayCommand(GoToJob);
}
private void _stop_job_btn_Pressed()
@@ -61,6 +77,12 @@ namespace Tango.PPC.Jobs.ViewModels
}
}
+ private void GoToJob()
+ {
+ NavigationManager.NavigateWithObject<JobsModule, JobView, JobNavigationObject>(new JobNavigationObject() { Job = _handler.Job });
+ NavigationManager.ClearHistoryExcept<JobsView>();
+ }
+
#region Override Methods
/// <summary>
@@ -78,7 +100,7 @@ namespace Tango.PPC.Jobs.ViewModels
{
base.OnNavigatedFrom();
- if (MachineProvider.MachineOperator.IsPrinting)
+ if (MachineProvider.MachineOperator.IsPrinting && _handler != null && !_handler.IsCanceled)
{
NotificationProvider.PushAppBarItem<JobProgressAppBarItem>().Pressed += (_, __) =>
{
@@ -119,6 +141,8 @@ namespace Tango.PPC.Jobs.ViewModels
e.JobHandler.StatusChanged += JobHandler_StatusChanged;
e.JobHandler.SpoolChangeRequired += JobHandler_SpoolChangeRequired;
e.JobHandler.Stopped += JobHandler_Stopped;
+
+ _stop_job_btn.Push();
}
/// <summary>
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 cd7308afb..1a980fc4a 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
@@ -9,7 +9,9 @@ using Tango.BL.Entities;
using Tango.Core.Commands;
using Tango.PPC.Common;
using Tango.PPC.Common.Messages;
+using Tango.PPC.Common.Navigation;
using Tango.PPC.Jobs.Messages;
+using Tango.PPC.Jobs.NavigationObjects;
using Tango.PPC.Jobs.Views;
namespace Tango.PPC.Jobs.ViewModels
@@ -18,7 +20,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// Represents the job summary view model.
/// </summary>
/// <seealso cref="Tango.PPC.Common.PPCViewModel" />
- public class JobSummeryViewVM : PPCViewModel
+ public class JobSummeryViewVM : PPCViewModel, INavigationObjectReceiver<JobSummeryNavigationObject>
{
private ObservablesContext _context;
@@ -59,38 +61,11 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
public JobSummeryViewVM()
{
- RegisterForMessage<JobSelectedMessage>(HandleJobSelectedMessage);
-
DyeCommand = new RelayCommand(StartJob);
EditCommand = new RelayCommand(EditJob);
}
/// <summary>
- /// Handles the job selected message.
- /// </summary>
- /// <param name="message">The message.</param>
- private async void HandleJobSelectedMessage(JobSelectedMessage message)
- {
- _context = message.Context;
- Job = message.Job;
-
- Job = await new JobBuilder(_context).Set(Job.Guid)
- .WithConfiguration()
- .WithRML()
- .WithUser()
- .WithSegments()
- .WithBrushStops()
- .BuildAsync();
-
-
- try
- {
- EstimatedDuration = await Job.GetEstimatedDuration();
- }
- catch { }
- }
-
- /// <summary>
/// Edits the job.
/// </summary>
private void EditJob()
@@ -108,7 +83,7 @@ namespace Tango.PPC.Jobs.ViewModels
{
LogManager.Log("Start job command pressed. Starting job and navigating to job progress view...");
- PrintingManager.Print(Job, _context);
+ await PrintingManager.Print(Job, _context);
await NavigationManager.NavigateTo<JobsModule>(false, nameof(JobProgressView));
}
catch (Exception ex)
@@ -125,5 +100,26 @@ namespace Tango.PPC.Jobs.ViewModels
{
}
+
+ public async void OnNavigatedToWithObject(JobSummeryNavigationObject obj)
+ {
+ _context = obj.Context;
+ Job = obj.Job;
+
+ Job = await new JobBuilder(_context).Set(Job.Guid)
+ .WithConfiguration()
+ .WithRML()
+ .WithUser()
+ .WithSegments()
+ .WithBrushStops()
+ .BuildAsync();
+
+
+ try
+ {
+ EstimatedDuration = await Job.GetEstimatedDuration();
+ }
+ catch { }
+ }
}
}
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 f0cf87079..713dfce42 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
@@ -31,6 +31,9 @@ using Tango.Logging;
using Tango.PPC.Common.Messages;
using Tango.BL.Builders;
using Tango.PPC.Jobs.AppButtons;
+using Tango.Core.Threading;
+using System.Diagnostics;
+using System.Runtime.ExceptionServices;
namespace Tango.PPC.Jobs.ViewModels
{
@@ -47,6 +50,7 @@ namespace Tango.PPC.Jobs.ViewModels
private JobNavigationIntent _job_to_load_intent;
private static Dictionary<String, List<FineTuneItem>> _jobs_fine_tune_items;
private StartPrintingButton _start_printing_btn;
+ private ActionTimer _volumeConversionTimer;
#region Properties
@@ -319,6 +323,8 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
public JobViewVM()
{
+ _volumeConversionTimer = new ActionTimer(TimeSpan.FromMilliseconds(50));
+
RegisterForMessage<JobSelectedMessage>(HandleJobSelectedMessage);
FineTuneItems = new ObservableCollection<FineTuneItem>();
@@ -396,7 +402,8 @@ namespace Tango.PPC.Jobs.ViewModels
{
LogManager.Log($"Loading selected job '{_job_to_load.Name}'...");
- NotificationProvider.SetGlobalBusyMessage("Loading job details...");
+ //NotificationProvider.SetGlobalBusyMessage("Loading job details...");
+ IsFree = false;
_can_navigate_back = false;
@@ -425,6 +432,11 @@ namespace Tango.PPC.Jobs.ViewModels
Customers = await _db.Customers.Where(x => x.OrganizationGuid == MachineProvider.Machine.OrganizationGuid).ToListAsync();
TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == Job.Rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync();
+ foreach (var segment in Job.Segments)
+ {
+ SetSegmentLiquidVolumesIfVolume(segment);
+ }
+
if (!_check_gamut_thread.IsAlive)
{
_check_gamut_thread.Start();
@@ -433,10 +445,6 @@ namespace Tango.PPC.Jobs.ViewModels
SegmentsCollectionView = CollectionViewSource.GetDefaultView(Job.Segments);
SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Segment.SegmentIndex), ListSortDirection.Ascending));
- InvokeUIOnIdle(() =>
- {
- NotificationProvider.ReleaseGlobalBusyMessage();
- });
_job_to_load = null;
}
@@ -471,10 +479,16 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log(ex, $"Error loading job '{_job_to_load.Name}'");
await NotificationProvider.ShowError("An error occurred while trying to load the selected job.");
}
+ finally
+ {
+ InvokeUIOnIdle(() =>
+ {
+ IsFree = true;
+ //NotificationProvider.ReleaseGlobalBusyMessage();
+ });
+ }
}
-
-
/// <summary>
/// Saves the job.
/// </summary>
@@ -545,18 +559,18 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Starts the job.
/// </summary>
- private void StartJob()
+ private async void StartJob()
{
try
{
LogManager.Log("Start job command pressed. Starting job and navigating to job progress view...");
- PrintingManager.Print(Job, _db);
- NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
+ await PrintingManager.Print(Job, _db);
+ await NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
}
catch (Exception ex)
{
LogManager.Log(ex, "Could not start the current job.");
- NotificationProvider.ShowError($"Cannot start job.\n{ex.Message}.");
+ await NotificationProvider.ShowError($"Cannot start job.\n{ex.Message}.");
}
}
@@ -598,7 +612,9 @@ namespace Tango.PPC.Jobs.ViewModels
try
{
LogManager.Log("Adding new solid segment...");
- return Job.AddSolidSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10);
+ var s = Job.AddSolidSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10);
+ SetSegmentLiquidVolumesIfVolume(s);
+ return s;
}
catch (Exception ex)
{
@@ -616,7 +632,9 @@ namespace Tango.PPC.Jobs.ViewModels
try
{
LogManager.Log("Adding new gradient segment...");
- return Job.AddGradientSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10);
+ var s = Job.AddGradientSegment(MachineProvider.Machine.DefaultSegmentLength > 0 ? MachineProvider.Machine.DefaultSegmentLength : 10);
+ SetSegmentLiquidVolumesIfVolume(s);
+ return s;
}
catch (Exception ex)
{
@@ -680,6 +698,18 @@ namespace Tango.PPC.Jobs.ViewModels
}
}
+ /// <summary>
+ /// Sets the segment liquid volumes.
+ /// </summary>
+ /// <param name="segment">The segment.</param>
+ private void SetSegmentLiquidVolumesIfVolume(Segment segment)
+ {
+ if (Job.ColorSpace.Code == BL.Enumerations.ColorSpaces.Volume.ToInt32())
+ {
+ segment.BrushStops.ToList().ForEach(x => x.SetLiquidVolumes(Job.Machine.Configuration, Job.Rml, Job.Rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault()));
+ }
+ }
+
#endregion
#region Brush Stops Management
@@ -692,6 +722,7 @@ namespace Tango.PPC.Jobs.ViewModels
{
LogManager.Log($"Adding new brush stop to segment {segment.SegmentIndex}.");
segment.AddBrushStop();
+ SetSegmentLiquidVolumesIfVolume(segment);
}
/// <summary>
@@ -761,11 +792,36 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Called when the brush stop field value has been changed (This called from the view!).
/// </summary>
- /// <param name="brushStop">The brush stop.</param>
- public void OnBrushStopFieldValueChanged(BrushStop brushStop)
+ /// <param name="stop">The brush stop.</param>
+ [HandleProcessCorruptedStateExceptions]
+ public void OnBrushStopFieldValueChanged(BrushStop stop)
{
- brushStop.Corrected = false;
- brushStop.OutOfGamutChecked = false;
+ if (stop != null)
+ {
+ stop.Corrected = false;
+ stop.OutOfGamutChecked = false;
+
+ if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.Volume)
+ {
+ _volumeConversionTimer.ResetReplace(() =>
+ {
+ try
+ {
+ var output = TangoColorConverter.GetSuggestions(stop);
+
+ stop.Red = output.SingleCoordinates.Red;
+ stop.Green = output.SingleCoordinates.Green;
+ stop.Blue = output.SingleCoordinates.Blue;
+ stop.Corrected = true;
+ stop.IsOutOfGamut = false;
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "An error occurred while trying to get volume => RGB from conversion engine.");
+ }
+ });
+ }
+ }
}
/// <summary>
@@ -802,20 +858,20 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Starts a sample dye.
/// </summary>
- private void StartSampleDye()
+ private async void StartSampleDye()
{
try
{
LogManager.Log("Sample dye command pressed...");
- PrintingManager.PrintSample(Job, _db);
+ await PrintingManager.PrintSample(Job, _db);
- NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
+ await NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
}
catch (Exception ex)
{
LogManager.Log(ex, $"Error executing sample dye for job {Job.Name}.");
- NotificationProvider.ShowError("An error occurred while trying to execute the sample dye.");
+ await NotificationProvider.ShowError("An error occurred while trying to execute the sample dye.");
}
}
@@ -940,7 +996,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Starts the fine tuning.
/// </summary>
- private void StartFineTuning()
+ private async void StartFineTuning()
{
try
{
@@ -948,14 +1004,14 @@ namespace Tango.PPC.Jobs.ViewModels
_jobs_fine_tune_items[Job.Guid] = FineTuneItems.ToList();
- PrintingManager.PrintFineTuning(Job, _db, FineTuneItems);
+ await PrintingManager.PrintFineTuning(Job, _db, FineTuneItems);
- NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
+ await NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
}
catch (Exception ex)
{
LogManager.Log(ex, "Error executing fine tuning job.");
- NotificationProvider.ShowError("An error occurred while trying to start the fine tuning job.");
+ await NotificationProvider.ShowError("An error occurred while trying to start the fine tuning job.");
}
}
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 aef6dd549..bd6f95d44 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
@@ -272,15 +272,20 @@ namespace Tango.PPC.Jobs.ViewModels
{
LogManager.Log($"Job '{job.Name}' selected.");
+ RaiseMessage(new JobSelectedMessage() { Job = job, Context = _db });
+
if (!directlyToEdit && MachineProvider.MachineOperator.Status == Integration.Operation.MachineStatuses.ReadyToDye)
{
- await NavigationManager.NavigateTo<JobsModule>(nameof(JobSummeryView));
+ await NavigationManager.NavigateWithObject<JobsModule, JobSummeryView, JobSummeryNavigationObject>(new JobSummeryNavigationObject()
+ {
+ Context = _db,
+ Job = job,
+ });
}
else
{
await NavigationManager.NavigateTo<JobsModule>(nameof(JobView));
}
- RaiseMessage(new JobSelectedMessage() { Job = job, Context = _db });
}
/// <summary>
@@ -307,7 +312,7 @@ namespace Tango.PPC.Jobs.ViewModels
Jobs = jobs;
DraftJobsCollectionView = new ListCollectionView(Jobs);
DraftJobsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Job.LastUpdated), ListSortDirection.Descending));
- DraftJobsCollectionView.Filter = new Predicate<object>(x =>
+ DraftJobsCollectionView.Filter = new Predicate<object>(x =>
{
var job = x as Job;
@@ -324,7 +329,7 @@ namespace Tango.PPC.Jobs.ViewModels
HistoryJobsCollectionView = new ListCollectionView(Jobs);
HistoryJobsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Job.LastUpdated), ListSortDirection.Descending));
- HistoryJobsCollectionView.Filter = new Predicate<object>(x =>
+ HistoryJobsCollectionView.Filter = new Predicate<object>(x =>
{
var job = x as Job;
@@ -373,7 +378,7 @@ namespace Tango.PPC.Jobs.ViewModels
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()).ToList()
+ machine.SupportedColorSpaces.Count > 0 ? machine.SupportedColorSpaces : Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace() || (ApplicationManager.IsInTechnicianMode && x == ColorSpaces.Volume)).ToList()
);
var settings = SettingsManager.Default.GetOrCreate<JobsModuleSettings>();
@@ -427,7 +432,7 @@ namespace Tango.PPC.Jobs.ViewModels
job.RmlGuid = machine.DefaultRml != null ? machine.DefaultRmlGuid : Adapter.Rmls.FirstOrDefault().Guid;
job.WindingMethodGuid = Adapter.WindingMethods.FirstOrDefault().Guid;
job.SpoolTypeGuid = machine.DefaultSpoolType != null ? machine.DefaultSpoolTypeGuid : Adapter.SpoolTypes.FirstOrDefault().Guid;
-
+
if (Jobs.Count > 0)
{
job.JobIndex = Jobs.Max(x => x.JobIndex) + 1;
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 7026a6ebc..ed1e28f55 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
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.BL;
+using Tango.BL.Builders;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
using Tango.Integration.Operation;
@@ -21,6 +23,8 @@ namespace Tango.PPC.Jobs.ViewModels
/// <seealso cref="Tango.PPC.Common.PPCViewModel" />
public class MainViewVM : PPCViewModel
{
+ private NotificationItem _last_failed_job_notification;
+
/// <summary>
/// Called when the application has been started.
/// </summary>
@@ -28,6 +32,44 @@ namespace Tango.PPC.Jobs.ViewModels
{
MachineProvider.MachineOperator.PrintingCompleted += MachineOperator_PrintingCompleted;
MachineProvider.MachineOperator.PrintingFailed += MachineOperator_PrintingFailed;
+ MachineProvider.MachineOperator.ResumingJob += MachineOperator_ResumingJob;
+ }
+
+ private async void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e)
+ {
+ LogManager.Log($"Trying to resume job '{e.JobGuid}'...");
+
+ try
+ {
+ var job = await new JobBuilder(ObservablesContext.CreateDefault()).Set(e.JobGuid)
+ .WithConfiguration()
+ .WithRML()
+ .WithUser()
+ .WithSegments()
+ .WithBrushStops()
+ .BuildAsync();
+
+ e.Approve(job);
+
+ InvokeUI(() =>
+ {
+ NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView));
+
+ if (_last_failed_job_notification != null)
+ {
+ _last_failed_job_notification.Close();
+ _last_failed_job_notification = null;
+ }
+ });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "An error occurred while trying to resume the job.");
+ InvokeUI(() =>
+ {
+ NotificationProvider.ShowError("An error occurred while trying to resume a job in progress.");
+ });
+ }
}
/// <summary>
@@ -37,7 +79,7 @@ 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)
{
- NotificationProvider.PushNotification(new MessageNotificationItem(
+ _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, () =>
{
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 0227e24f5..037fac09c 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
@@ -203,14 +203,14 @@
<Grid>
<controls:RunningJobViewer Height="30" Width="600" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" />
- <TextBlock Margin="0 0 -40 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Right">
+ <TextBlock Margin="0 0 -50 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Right">
<Run Text="x"></Run><Run Text="{Binding RunningJobStatus.RemainingUnits}"></Run>
</TextBlock>
</Grid>
</StackPanel>
</Grid>
- <touch:TouchButton Margin="0 100 0 0" Style="{StaticResource TangoLinkButton}" Height="60" FontSize="{StaticResource TangoTitleFontSize}" Visibility="{Binding RunningJobStatus.IsCompleted,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <touch:TouchButton Margin="0 100 0 0" Command="{Binding GoToJobCommand}" Style="{StaticResource TangoLinkButton}" Height="60" FontSize="{StaticResource TangoTitleFontSize}" Visibility="{Binding RunningJobStatus.IsCompleted,Converter={StaticResource BooleanToVisibilityConverter}}">
Go to job
</touch:TouchButton>
</StackPanel>
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 e5b693a35..30a1a4a07 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
@@ -17,11 +17,15 @@
xmlns:localControls="clr-namespace:Tango.PPC.Jobs.Controls"
xmlns:local="clr-namespace:Tango.PPC.Jobs.Views"
mc:Ignorable="d"
- d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}">
+ d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}" x:Name="view">
<UserControl.Resources>
<localConverters:ColorSpaceToVisibilityConverter x:Key="ColorSpaceToVisibilityConverter" />
+ <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" />
+
<Style TargetType="FrameworkElement" x:Key="Level1Container">
<Setter Property="Margin" Value="20 15 60 15"></Setter>
@@ -33,6 +37,42 @@
<Setter Property="Margin" Value="80 40 60 0"></Setter>
</Style>
+ <DataTemplate x:Key="Volume_Template" DataType="{x:Type entities:BrushStop}">
+ <Grid>
+ <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" Margin="0 0 -90 0">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border>
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IdsPack.IdsPackFormula.Name}" Value="Lubricant">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IdsPack.IdsPackFormula.Name}" Value="Cleaner">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <touch:TouchNumericTextBox DisplayWatermarkHint="True" Width="50" Watermark="{Binding IdsPack.LiquidType.Name,IsAsync=True}" Margin="2 0" ValueChanged="OnLiquidVolumeFieldValueChanged" HorizontalContentAlignment="Center" Value="{Binding Volume}" keyboard:KeyboardView.Container="{Binding ElementName=Container}" HasDecimalPoint="True" Minimum="0" Maximum="100" JoggingFactor="0.5" StringFormat="0.00" />
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ <Canvas VerticalAlignment="Bottom" Visibility="{Binding IsLiquidVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <controls:FastTextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Liquid volumes are out of range."></controls:FastTextBlock>
+ </Canvas>
+ </Grid>
+ </DataTemplate>
+
<DataTemplate x:Key="RGB_Template" DataType="{x:Type entities:BrushStop}">
<UniformGrid Rows="1" Columns="3">
<touch:TouchNumericTextBox Margin="2 0" ValueChanged="OnBrushStopFieldValueChanged" HorizontalContentAlignment="Center" Value="{Binding Red}" keyboard:KeyboardView.Container="{Binding ElementName=Container}" Maximum="255" />
@@ -61,7 +101,7 @@
<DataTemplate x:Key="TWINE_Template" DataType="{x:Type entities:BrushStop}">
<DockPanel>
<touch:TouchIconButton Margin="0 0 -40 0" CornerRadius="50" Width="32" Height="32" Padding="5" RippleBrush="{StaticResource TangoRippleDarkBrush}" DockPanel.Dock="Right" Icon="Palette" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenTwineCatalogCommand}" CommandParameter="{Binding}"></touch:TouchIconButton>
- <touch:TouchAutoComplete Margin="2 0" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TwineCatalogItems}" Watermark="Color Code" PopupHeight="250" DisplayMemberPath="Name" AutoCompleteProvider="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TwineCatalogAutoCompleteProvider}" SelectedItem="{Binding ColorCatalog,Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
+ <touch:TouchAutoComplete Margin="2 0" ItemsSource="{Binding ElementName=view,Path=DataContext.TwineCatalogItems}" Watermark="Color Code" PopupHeight="250" DisplayMemberPath="Name" AutoCompleteProvider="{Binding ElementName=view,Path=DataContext.TwineCatalogAutoCompleteProvider}" SelectedItem="{Binding ColorCatalog,Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
<touch:TouchAutoComplete.ItemTemplate>
<DataTemplate>
<DockPanel Margin="2">
@@ -84,7 +124,7 @@
<StackPanel Orientation="Horizontal">
<Border Width="48" Height="48" CornerRadius="5" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
<Border.Background>
- <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
+ <SolidColorBrush Color="{Binding Color,IsAsync=True}"></SolidColorBrush>
</Border.Background>
</Border>
@@ -94,32 +134,39 @@
</StackPanel>
<DockPanel LastChildFill="False" Margin="0 20 0 0">
- <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left">Color code:</TextBlock>
+ <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left">Color code:</controls:FastTextBlock>
<ContentControl Focusable="False" Margin="20 0 0 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="300" Content="{Binding}">
<ContentControl.Style>
<Style TargetType="ContentControl">
- <Setter Property="ContentTemplate" Value="{x:Null}"></Setter>
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate/>
+ </Setter.Value>
+ </Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="RGB">
+ <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 RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="CMYK">
+ <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 RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="LAB">
+ <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 RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="Twine">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Twine">
<Setter Property="ContentTemplate" Value="{StaticResource TWINE_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>
</DockPanel>
- <Canvas Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}">
- <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock>
+ <Canvas Visibility="{Binding IsOutOfGamut,IsAsync=True,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <controls:FastTextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></controls:FastTextBlock>
</Canvas>
<DockPanel LastChildFill="False" Margin="0 20 0 0" IsEnabled="{Binding IsMiddle}">
@@ -137,14 +184,17 @@
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 0 -130 0" HorizontalAlignment="Right" VerticalAlignment="Top">
- <touch:TouchImageButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ReplaceBrushStopCommand}" CommandParameter="{Binding}" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}" Width="50" Height="50" Padding="10" Image="../Images/JobView/replace-color.png" CornerRadius="30"></touch:TouchImageButton>
- <touch:TouchIconButton Margin="0 0 50 0" Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveBrushStopCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
+ <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>
+ <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>
</DataTemplate>
<DataTemplate x:Key="Segment_Template" DataType="{x:Type entities:Segment}">
<Border Margin="0 0 0 15" RenderOptions.EdgeMode="Unspecified" CornerRadius="8" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
+ <Border.CacheMode>
+ <BitmapCache RenderAtScale="1" SnapsToDevicePixels="True" />
+ </Border.CacheMode>
<!--<Border.Effect>
<DropShadowEffect Opacity="0.5" Color="{StaticResource TangoDropShadowColor}" BlurRadius="10" ShadowDepth="15" />
</Border.Effect>-->
@@ -153,7 +203,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
- <Grid Background="Transparent" dragAndDrop:DragAndDropService.DropCommand="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SegmentDroppedCommand}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.Droppable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding ElementName=DraggingSurface}">
+ <Grid Background="Transparent" dragAndDrop:DragAndDropService.DropCommand="{Binding ElementName=view,Path=DataContext.SegmentDroppedCommand}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.Droppable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding ElementName=DraggingSurface}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Opacity" Value="1"></Setter>
@@ -169,7 +219,7 @@
<Style TargetType="DockPanel">
<Setter Property="Height" Value="163"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked}" Value="True">
+ <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked,IsAsync=True}" Value="True">
<Setter Property="Height" Value="74"></Setter>
</DataTrigger>
</Style.Triggers>
@@ -179,15 +229,15 @@
<Border.Style>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="8 0 0 8"></Setter>
- <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></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}" Value="True">
- <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='*2'}"></Setter>
+ <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}}" Value="True"></Condition>
- <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked}" Value="True"></Condition>
+ <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>
@@ -199,48 +249,57 @@
<Grid>
<DockPanel Margin="30 0" VerticalAlignment="Center">
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
- <Canvas Visibility="{Binding HasOutOfGamutBrushStop,Converter={StaticResource BooleanToVisibilityConverter}}">
- <Image Canvas.Left="-25" Canvas.Top="1" Source="../Images/JobView/error.png" Width="19" Height="19" />
+ <Canvas Visibility="{Binding HasOutOfGamutBrushStop,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}">
+ <Image Canvas.Left="-25" Canvas.Top="1" Source="{StaticResource Image_Out_Of_Gamut}" Width="19" Height="19" />
</Canvas>
<TextBlock FontSize="{StaticResource TangoTitleFontSize}">
<Run>Segment #</Run>
- <Run Text="{Binding SegmentIndex,Mode=OneWay}"></Run>
+ <Run Text="{Binding SegmentIndex,Mode=OneWay,IsAsync=True}"></Run>
</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}}">
+ <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}}" Value="True">
+ <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>
+ <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Color code:"></controls:FastTextBlock>
- <Grid DockPanel.Dock="Right" DataContext="{Binding BrushStops[0]}">
+ <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" Value="{x:Null}"></Setter>
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="RGB">
+ <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 RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="CMYK">
+ <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 RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="LAB">
+ <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 RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="Twine">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Twine">
<Setter Property="ContentTemplate" Value="{StaticResource TWINE_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>
@@ -255,27 +314,27 @@
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="False" />
- <Condition Binding="{Binding BrushStops[0].IsOutOfGamut}" 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>
</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>
+ <controls:FastTextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></controls:FastTextBlock>
</Canvas>
<DockPanel LastChildFill="False" Margin="0 20 0 0">
- <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):"></TextBlock>
+ <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):"></controls:FastTextBlock>
<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>
</DockPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 10 10 0">
- <TextBlock Visibility="{Binding ElementName=toggle_small_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding Length,StringFormat={}{0:N1} m}">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
+ <controls:FastTextBlock Visibility="{Binding ElementName=toggle_small_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding Length,StringFormat={}{0:N1} m}">
+ <controls:FastTextBlock.Style>
+ <Style TargetType="controls:FastTextBlock">
<Setter Property="Margin" Value="0 16 20 0"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=toggleEdit,Path=IsChecked}" Value="True">
@@ -283,19 +342,19 @@
</DataTrigger>
</Style.Triggers>
</Style>
- </TextBlock.Style>
- </TextBlock>
+ </controls:FastTextBlock.Style>
+ </controls:FastTextBlock>
- <touch:TouchImageButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ReplaceBrushStopCommand}" CommandParameter="{Binding BrushStops[0]}" Width="50" Height="50" Padding="10" Image="../Images/JobView/replace-color.png" CornerRadius="30">
+ <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}}">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
- <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked}" Value="True" />
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="False" />
- <Condition Binding="{Binding BrushStops[0].IsOutOfGamut}" Value="True" />
+ <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>
@@ -304,9 +363,9 @@
</touch:TouchImageButton.Style>
</touch:TouchImageButton>
- <StackPanel Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Orientation="Horizontal">
+ <StackPanel Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}" Orientation="Horizontal">
- <touch:TouchIconButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveSegmentCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
+ <touch:TouchIconButton Command="{Binding ElementName=view,Path=DataContext.RemoveSegmentCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
<dragAndDrop:DragThumb Background="Transparent" IsHitTestVisible="True">
<touch:TouchIconButton IsHitTestVisible="False" EnableDropShadow="False" Icon="BarsSolid" Padding="15" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
@@ -324,8 +383,8 @@
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="True"></Condition>
- <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked}" Value="True"></Condition>
+ <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="Visibility" Value="Visible"></Setter>
@@ -339,14 +398,14 @@
</ItemsControl>
- <touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.AddBrushStopCommand}" CommandParameter="{Binding}" Background="Transparent" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontWeight="Normal" Foreground="{StaticResource TangoPrimaryAccentBrush}" HorizontalAlignment="Left" EnableDropShadow="False" Margin="50 30 0 60">
+ <touch:TouchButton Command="{Binding ElementName=view,Path=DataContext.AddBrushStopCommand}" CommandParameter="{Binding}" Background="Transparent" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontWeight="Normal" Foreground="{StaticResource TangoPrimaryAccentBrush}" HorizontalAlignment="Left" EnableDropShadow="False" Margin="50 30 0 60">
<StackPanel Orientation="Horizontal">
<Grid Width="49" Height="49">
<Rectangle Stroke="{StaticResource TangoPrimaryAccentBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="5" RadiusY="5"></Rectangle>
<fa:ImageAwesome Icon="Plus" Width="16" Height="16" Foreground="{StaticResource TangoPrimaryAccentBrush}" />
</Grid>
- <TextBlock VerticalAlignment="Center" Margin="20 0 0 0">ADD COLOR</TextBlock>
+ <controls:FastTextBlock VerticalAlignment="Center" Margin="20 0 0 0">ADD COLOR</controls:FastTextBlock>
</StackPanel>
</touch:TouchButton>
</StackPanel>
@@ -356,247 +415,270 @@
</DataTemplate>
</UserControl.Resources>
- <Grid Background="{StaticResource TangoMidBackgroundBrush}">
+ <Grid Background="{StaticResource TangoMidBackgroundBrush}" SnapsToDevicePixels="False">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <Grid Grid.Row="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
+ <touch:TouchLoadingPanel Grid.Row="1" IsLoading="{Binding IsBusy}">
<Grid>
- <Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Grid.RowSpan="2">
- <touch:LightTouchScrollViewer x:Name="scrollViewer" Scrolling="scrollViewer_Scrolling">
- <StackPanel Margin="10 60 10 0">
- <StackPanel>
- <touch:TouchExpander Padding="20 15" IsExpanded="{Binding IsJobDetailsExpanded}">
- <touch:TouchExpander.Header>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
- <Image Source="../Images/JobView/job-details.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Details</TextBlock>
- <TextBlock FontWeight="Medium" Margin="50 0 0 0" VerticalAlignment="Center">
+ <Grid.CacheMode>
+ <BitmapCache RenderAtScale="1" SnapsToDevicePixels="False" />
+ </Grid.CacheMode>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid>
+ <Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Grid.RowSpan="2">
+ <touch:LightTouchScrollViewer x:Name="scrollViewer" Scrolling="scrollViewer_Scrolling">
+ <StackPanel Margin="10 60 10 0">
+ <StackPanel>
+ <touch:TouchExpander Padding="20 15" IsExpanded="{Binding IsJobDetailsExpanded}">
+ <touch:TouchExpander.Header>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
+ <Image Source="../Images/JobView/job-details.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Details</TextBlock>
+
+ <TextBlock FontWeight="Medium" Margin="50 0 0 0" VerticalAlignment="Center">
<Run Text="{Binding Job.Rml.Name}"></Run><Run>,</Run>
<Run Text="{Binding Job.ColorSpace.Name}"></Run>
- </TextBlock>
- </StackPanel>
- </touch:TouchExpander.Header>
+ </TextBlock>
+ </StackPanel>
+ </touch:TouchExpander.Header>
- <StackPanel Margin="60 30 60 20" TextElement.FontWeight="Medium">
- <controls:TableGrid RowHeight="50">
+ <StackPanel Margin="60 30 60 20" TextElement.FontWeight="Medium">
+ <controls:TableGrid RowHeight="50">
- <TextBlock>Job name:</TextBlock>
- <touch:TouchTextBox Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" KeyboardMode="AlphaNumeric" FocusSelectionMode="SelectAll" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
+ <TextBlock>Job name:</TextBlock>
+ <touch:TouchTextBox Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" KeyboardMode="AlphaNumeric" FocusSelectionMode="SelectAll" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
- <TextBlock>Customer:</TextBlock>
- <touch:TouchAutoComplete ForceItemSelection="False" Text="{Binding CustomersFilter}" ItemsSource="{Binding Customers}" SelectedItem="{Binding Job.Customer}" DisplayMemberPath="Name" AutoCompleteProvider="{Binding CustomersAutoCompleteProvider}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
+ <TextBlock>Customer:</TextBlock>
+ <touch:TouchAutoComplete ForceItemSelection="False" Text="{Binding CustomersFilter}" ItemsSource="{Binding Customers}" SelectedItem="{Binding Job.Customer}" DisplayMemberPath="Name" AutoCompleteProvider="{Binding CustomersAutoCompleteProvider}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
- <TextBlock>Thread type:</TextBlock>
- <touch:TouchComboBox ItemsSource="{Binding Rmls}" SelectedItem="{Binding Job.Rml}" DisplayMemberPath="Name" Title="Select Thread" />
+ <TextBlock>Thread type:</TextBlock>
+ <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">
+ <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">
- </TextBox>
- </controls:TableGrid>
+ </TextBox>
+ </controls:TableGrid>
- <Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
+ <Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
- <TextBlock HorizontalAlignment="Left">
+ <TextBlock HorizontalAlignment="Left">
<Run Text="Job status:"></Run>
<Run Text="{Binding Job.JobStatus}"></Run>
- </TextBlock>
+ </TextBlock>
- <Rectangle Margin="20 0" Grid.Column="1" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
+ <Rectangle Margin="20 0" Grid.Column="1" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
- <TextBlock Grid.Column="2" HorizontalAlignment="Center">
+ <TextBlock Grid.Column="2" HorizontalAlignment="Center">
<Run Text="Last updated:"></Run>
<Run Text="{Binding Job.LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run>
- </TextBlock>
+ </TextBlock>
- <Rectangle Margin="20 0" Grid.Column="3" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
+ <Rectangle Margin="20 0" Grid.Column="3" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
- <TextBlock Grid.Column="4" HorizontalAlignment="Right">
+ <TextBlock Grid.Column="4" HorizontalAlignment="Right">
<Run Text="Last dye:"></Run>
<Run Text="{Binding Job.LastRun,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run>
- </TextBlock>
- </Grid>
- </StackPanel>
- </touch:TouchExpander>
-
- <Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
- <Grid>
- <StackPanel>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
- <Image Source="../Images/JobView/color-length.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color &amp; Length</TextBlock>
- </StackPanel>
+ </TextBlock>
+ </Grid>
+ </StackPanel>
+ </touch:TouchExpander>
+ <Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
+ <Grid>
<StackPanel>
- <StackPanel.Style>
- <Style TargetType="StackPanel" BasedOn="{StaticResource Level2Container}">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </StackPanel.Style>
- <UniformGrid Columns="2" Rows="1">
- <DockPanel Margin="0 0 10 0">
- <TextBlock Text="Number of units:" VerticalAlignment="Center"></TextBlock>
- <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfUnits}" Minimum="1" Maximum="10000" JoggingFactor="0.01" />
- </DockPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/JobView/color-length.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color &amp; Length</TextBlock>
+ </StackPanel>
+
+ <StackPanel>
+ <StackPanel.Style>
+ <Style TargetType="StackPanel" BasedOn="{StaticResource Level2Container}">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </StackPanel.Style>
+ <UniformGrid Columns="2" Rows="1">
+ <DockPanel Margin="0 0 10 0">
+ <TextBlock Text="Number of units:" VerticalAlignment="Bottom"></TextBlock>
+ <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfUnits}" Minimum="1" Maximum="10000" JoggingFactor="0.01" />
+ </DockPanel>
+
+ <DockPanel Margin="10 0 0 0">
+ <TextBlock Text="Number of heads:" VerticalAlignment="Bottom"></TextBlock>
+ <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfHeads}" Minimum="1" Maximum="1000" JoggingFactor="0.1" />
+ </DockPanel>
+ </UniformGrid>
+ </StackPanel>
- <DockPanel Margin="10 0 0 0">
- <TextBlock Text="Number of heads:" VerticalAlignment="Center"></TextBlock>
- <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfHeads}" Minimum="1" Maximum="1000" JoggingFactor="0.1" />
+ <StackPanel>
+ <StackPanel.Style>
+ <Style TargetType="StackPanel" BasedOn="{StaticResource Level2Container}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </StackPanel.Style>
+ <DockPanel Margin="0 0 10 0">
+ <TextBlock Text="Repetitions:" VerticalAlignment="Bottom"></TextBlock>
+ <touch:TouchNumericTextBox Width="200" HorizontalAlignment="Left" Margin="20 0 0 0" Value="{Binding Job.NumberOfUnits}" Minimum="1" Maximum="10000" JoggingFactor="0.01" />
</DockPanel>
- </UniformGrid>
- </StackPanel>
+ </StackPanel>
- <!--<DockPanel Style="{StaticResource Level2Container}">
+ <!--<DockPanel Style="{StaticResource Level2Container}">
<TextBlock Text="Color Catalog/Space:" VerticalAlignment="Center"></TextBlock>
<touch:TouchComboBox Margin="20 0 0 0" ItemsSource="{Binding ColorSpaces}" SelectedItem="{Binding Job.ColorSpace}" DisplayMemberPath="Name" Title="Select Color Catalog/Space" />
</DockPanel>-->
- <Border x:Name="borderDockFloat" Height="80">
- <DockPanel x:Name="dockEdit" LastChildFill="False" Style="{StaticResource Level2ContainerExtraMargin}" Height="40" Width="640">
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
- <touch:TouchToggleIconButton x:Name="toggle_small_list" IsChecked="{Binding ElementName=toggle_large_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ListSolid" CheckedIcon="ListSolid" Padding="8" CornerRadius="20" />
- <Rectangle HorizontalAlignment="Left" Stroke="{StaticResource TangoDividerBrush}" Margin="10 8" />
- <touch:TouchToggleIconButton x:Name="toggle_large_list" IsChecked="{Binding ElementName=toggle_small_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ThListSolid" CheckedIcon="ThListSolid" Padding="8" CornerRadius="20" />
- </StackPanel>
+ <Border x:Name="borderDockFloat" Height="80">
+ <DockPanel x:Name="dockEdit" LastChildFill="False" Style="{StaticResource Level2ContainerExtraMargin}" Height="40" Width="640">
+ <StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
+ <touch:TouchToggleIconButton x:Name="toggle_small_list" IsChecked="{Binding ElementName=toggle_large_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ListSolid" CheckedIcon="ListSolid" Padding="8" CornerRadius="20" />
+ <Rectangle HorizontalAlignment="Left" Stroke="{StaticResource TangoDividerBrush}" Margin="10 8" />
+ <touch:TouchToggleIconButton x:Name="toggle_large_list" IsChecked="{Binding ElementName=toggle_small_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ThListSolid" CheckedIcon="ThListSolid" Padding="8" CornerRadius="20" />
+ </StackPanel>
- <touch:TouchToggleIconButton x:Name="toggleEdit" DockPanel.Dock="Right" Icon="Pencil" CheckedIcon="Pencil" Padding="8" CornerRadius="20" />
- </DockPanel>
- </Border>
+ <touch:TouchToggleIconButton x:Name="toggleEdit" DockPanel.Dock="Right" Icon="Pencil" CheckedIcon="Pencil" Padding="8" CornerRadius="20" />
+ </DockPanel>
+ </Border>
- <ItemsControl x:Name="listSegments" Style="{StaticResource Level2Container}" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource Segment_Template}"></ItemsControl>
+ <ItemsControl x:Name="listSegments" Style="{StaticResource Level2Container}" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource Segment_Template}"></ItemsControl>
- <StackPanel HorizontalAlignment="Right" Style="{StaticResource Level2Container}" Orientation="Horizontal">
- <touch:TouchButton Command="{Binding AddSolidSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="170" CornerRadius="20" Padding="0 10" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}">
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
- <TextBlock Margin="10 0 0 0">SOLID SEGMENT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- <touch:TouchButton Command="{Binding AddGradientSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" Margin="30 0 0 0" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Padding="0 10" Width="200" CornerRadius="20" Background="Transparent" BorderThickness="2">
- <touch:TouchButton.BorderBrush>
- <LinearGradientBrush>
- <GradientStop Offset="0" Color="{StaticResource TangoPrimaryAccentColor}" />
- <GradientStop Offset="1" Color="#57F157" />
- </LinearGradientBrush>
- </touch:TouchButton.BorderBrush>
+ <StackPanel HorizontalAlignment="Right" Style="{StaticResource Level2Container}" Orientation="Horizontal">
+ <touch:TouchButton Command="{Binding AddSolidSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="170" CornerRadius="20" Padding="0 10" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}">
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
+ <TextBlock Margin="10 0 0 0">SOLID SEGMENT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ <touch:TouchButton Command="{Binding AddGradientSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" Margin="30 0 0 0" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Padding="0 10" Width="200" CornerRadius="20" Background="Transparent" BorderThickness="2">
+ <touch:TouchButton.BorderBrush>
+ <LinearGradientBrush>
+ <GradientStop Offset="0" Color="{StaticResource TangoPrimaryAccentColor}" />
+ <GradientStop Offset="1" Color="#57F157" />
+ </LinearGradientBrush>
+ </touch:TouchButton.BorderBrush>
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
- <TextBlock Margin="10 0 0 0">GRADIENT SEGMENT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- </StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
+ <TextBlock Margin="10 0 0 0">GRADIENT SEGMENT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </StackPanel>
- <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
- <DockPanel LastChildFill="False">
- <touch:TouchCheckBox DockPanel.Dock="Left" HorizontalAlignment="Left" IsChecked="{Binding Job.EnableInterSegment}">Include white gap between segments</touch:TouchCheckBox>
- <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 5 0">
- <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Bottom">
+ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
+ <DockPanel LastChildFill="False">
+ <touch:TouchCheckBox DockPanel.Dock="Left" HorizontalAlignment="Left" IsChecked="{Binding Job.EnableInterSegment}">Include white gap between segments</touch:TouchCheckBox>
+ <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="Length (m):"></Run>
- </TextBlock>
+ </TextBlock>
- <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Minimum="1" Maximum="1000" Value="{Binding Job.InterSegmentLength}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
+ <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Minimum="1" Maximum="1000" Value="{Binding Job.InterSegmentLength}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
- <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>
- <Rectangle Stroke="{StaticResource TangoDividerBrush}" Margin="0 30 0 0" />
+ <Rectangle Stroke="{StaticResource TangoDividerBrush}" Margin="0 30 0 0" />
- <StackPanel x:Name="stackOutput" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
- <Image Source="../Images/JobView/output.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Output</TextBlock>
- </StackPanel>
+ <StackPanel x:Name="stackOutput" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/JobView/output.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Output</TextBlock>
+ </StackPanel>
- <!--<DockPanel Style="{StaticResource Level2Container}">
+ <!--<DockPanel Style="{StaticResource Level2Container}">
<TextBlock Text="Output spool (m):" VerticalAlignment="Center"></TextBlock>
<touch:TouchComboBox ItemsSource="{Binding SpoolTypes}" SelectedItem="{Binding Job.SpoolType}" Margin="40 0 0 0" DisplayMemberPath="Name" Title="Select Output Spool" />
</DockPanel>-->
- <DockPanel Style="{StaticResource Level2Container}">
- <TextBlock Text="Segments per spool:" VerticalAlignment="Center"></TextBlock>
- <touch:TouchToggleSlider Margin="30 0 0 0" BorderThickness="2" Height="38" Width="83" HorizontalAlignment="Left" UncheckedContent="One" CheckedContent="All" IsChecked="{Binding Job.IsAllSegmentsPerSpool}" />
- </DockPanel>
- </StackPanel>
- </Grid>
- </Border>
+ <DockPanel Style="{StaticResource Level2Container}">
+ <TextBlock Text="Segments per spool:" VerticalAlignment="Center"></TextBlock>
+ <touch:TouchToggleSlider Margin="30 0 0 0" BorderThickness="2" Height="38" Width="83" HorizontalAlignment="Left" UncheckedContent="One" CheckedContent="All" IsChecked="{Binding Job.IsAllSegmentsPerSpool}" />
+ </DockPanel>
+ </StackPanel>
+ </Grid>
+ </Border>
- <Border Style="{StaticResource TangoTouchBorder}" Margin="0 20 0 0" 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>
+ <Border Style="{StaticResource TangoTouchBorder}" Margin="0 20 0 0" 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>
- <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
- <Grid>
- <localControls:JobSummeryViewer DataContext="{Binding Job}" />
- </Grid>
+ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
+ <Grid>
+ <localControls:JobSummeryViewer DataContext="{Binding Job,IsAsync=True}" />
+ </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 0 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>
+ <Image Margin="10 0 0 0" Source="../Images/JobView/settings.png" VerticalAlignment="Bottom" />
+ </StackPanel>
+ </DockPanel>
+ </StackPanel>
</StackPanel>
- </StackPanel>
- </Border>
+ </Border>
- <StackPanel 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>
+ <StackPanel 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>
- <!--<Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
+ <!--<Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<Image Source="../Images/JobView/additional-tools.png" Width="39" />
@@ -618,286 +700,199 @@
</StackPanel>
</Border>-->
- <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">
- <Image Source="../Images/JobView/sample-dye.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Sample Dye</TextBlock>
- </StackPanel>
- </touch:TouchExpander.Header>
+ <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">
+ <Image Source="../Images/JobView/sample-dye.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Sample Dye</TextBlock>
+ </StackPanel>
+ </touch:TouchExpander.Header>
- <StackPanel>
- <StackPanel Margin="60 20 0 0">
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext}">
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <StackPanel>
- <TextBlock>
+ <StackPanel>
+ <StackPanel Margin="60 20 0 0">
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext}">
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock>
<Run>Dye 1 or more units in order to get approval.</Run>
<LineBreak/>
<Run>Once approved, you can dye the entire job.</Run>
- </TextBlock>
+ </TextBlock>
- <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">How many sample units?</TextBlock>
+ <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">How many sample units?</TextBlock>
- <DockPanel Margin="50 0 0 0">
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ <DockPanel Margin="50 0 0 0">
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ </DockPanel>
</DockPanel>
- </DockPanel>
- </StackPanel>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Sewing}">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <StackPanel>
- <TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Sewing}">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock>
<Run>Dye several meters per segment in order to get approval.</Run>
<LineBreak/>
<Run>Once approved, you can dye the entire job.</Run>
- </TextBlock>
+ </TextBlock>
- <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Meters per segment</TextBlock>
+ <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Meters per segment</TextBlock>
- <DockPanel Margin="50 0 0 0">
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ <DockPanel Margin="50 0 0 0">
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ </DockPanel>
</DockPanel>
- </DockPanel>
- </StackPanel>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
+ </StackPanel>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
- <touch:TouchButton Margin="0 50 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartSampleDyeCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
- START
- </touch:TouchButton>
- </StackPanel>
- </Setter.Value>
- </Setter>
+ <touch:TouchButton Margin="0 50 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartSampleDyeCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
+ START
+ </touch:TouchButton>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock>How to continue?</TextBlock>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <TextBlock>How to continue?</TextBlock>
- <UniformGrid Columns="2" Width="420" HorizontalAlignment="Left" Margin="0 40 0 20">
- <StackPanel HorizontalAlignment="Left">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveSampleCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Check"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">DONE</TextBlock>
- </StackPanel>
- </touch:TouchButton>
+ <UniformGrid Columns="2" Width="420" HorizontalAlignment="Left" Margin="0 40 0 20">
+ <StackPanel HorizontalAlignment="Left">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveSampleCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Check"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">DONE</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
- <TextBlock Margin="0 15 0 0" TextAlignment="Center">The sample is approved</TextBlock>
- </StackPanel>
+ <TextBlock Margin="0 15 0 0" TextAlignment="Center">The sample is approved</TextBlock>
+ </StackPanel>
- <StackPanel HorizontalAlignment="Right">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatSampleDyeCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
+ <StackPanel HorizontalAlignment="Right">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatSampleDyeCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
- <TextBlock Margin="0 15 0 0" TextAlignment="Center">Dye more samples</TextBlock>
- </StackPanel>
- </UniformGrid>
+ <TextBlock Margin="0 15 0 0" TextAlignment="Center">Dye more samples</TextBlock>
+ </StackPanel>
+ </UniformGrid>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
- <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.Approved}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Margin="0 40 80 40">
- <DockPanel LastChildFill="False">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
+ <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.Approved}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Margin="0 40 80 40">
+ <DockPanel LastChildFill="False">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
<Run>Sample Approved:</Run>
<Run Text="{Binding Job.SampleDyeApproveDate,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=''}"></Run>
- </TextBlock>
- <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding AnotherSampleCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">ANOTHER SAMPLE</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
+ </TextBlock>
+ <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding AnotherSampleCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">ANOTHER SAMPLE</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </StackPanel>
+
+ <StackPanel Margin="0 0 0 15">
+ <StackPanel.Style>
+ <Style TargetType="StackPanel">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
- </ContentControl.Style>
- </ContentControl>
- </StackPanel>
-
- <StackPanel Margin="0 0 0 15">
- <StackPanel.Style>
- <Style TargetType="StackPanel">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </StackPanel.Style>
- <Rectangle HorizontalAlignment="Stretch" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" Margin="-20 30"></Rectangle>
+ </StackPanel.Style>
+ <Rectangle HorizontalAlignment="Stretch" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" Margin="-20 30"></Rectangle>
- <StackPanel Orientation="Horizontal" Margin="60 0 0 0">
- <touch:TouchIcon Icon="AlertCircleOutline" Width="32" Height="32" StrokeThickness="0.1" Foreground="{StaticResource TangoGrayBrush}" />
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">
+ <StackPanel Orientation="Horizontal" Margin="60 0 0 0">
+ <touch:TouchIcon Icon="AlertCircleOutline" Width="32" Height="32" StrokeThickness="0.1" Foreground="{StaticResource TangoGrayBrush}" />
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">
You can use the color fine tuning tool to adjust the colors.
- </TextBlock>
+ </TextBlock>
+ </StackPanel>
</StackPanel>
</StackPanel>
- </StackPanel>
- </touch:TouchExpander>
-
- <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.Header>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
- <Image Source="../Images/JobView/color-fine-tuning.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color Fine Tuning</TextBlock>
- </StackPanel>
- </touch:TouchExpander.Header>
-
- <StackPanel Margin="60 20 0 0">
+ </touch:TouchExpander>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock>Select the colors you want to fine tune.</TextBlock>
-
- <StackPanel HorizontalAlignment="Center" Margin="0 40 0 0">
- <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Defined Colors</TextBlock>
+ <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.Header>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
+ <Image Source="../Images/JobView/color-fine-tuning.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color Fine Tuning</TextBlock>
+ </StackPanel>
+ </touch:TouchExpander.Header>
- <ItemsControl Margin="0 40 0 0" ItemsSource="{Binding FineTuneItems}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <DockPanel>
- <touch:TouchCheckBox DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" Margin="0 0 20 0" />
- <touch:TouchImageButton DockPanel.Dock="Right" Image="../Images/JobView/color-picker.png" Width="80" Height="80" Padding="15" CornerRadius="100" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.InvokeFineTuningPaletteCommand}" CommandParameter="{Binding}"></touch:TouchImageButton>
- <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}" IsEnabled="False">
- <touch:TouchFlatListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Columns="{Binding Suggestions.Count}" Margin="0 20"></UniformGrid>
- </ItemsPanelTemplate>
- </touch:TouchFlatListBox.ItemsPanel>
- <touch:TouchFlatListBox.ItemTemplate>
- <DataTemplate>
- <Ellipse Width="70" Height="70" Fill="{Binding Brush}" Margin="30 0">
- <Ellipse.Style>
- <Style TargetType="Ellipse">
- <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="1" />
- </Setter.Value>
- </Setter>
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" ShadowDepth="10" Direction="10" BlurRadius="15" Opacity="0" />
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
- <DataTrigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.2" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.2" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="1" Duration="00:00:0.2" />
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.EnterActions>
- <DataTrigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="0" Duration="00:00:0.2" />
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.ExitActions>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Ellipse.Style>
- </Ellipse>
- </DataTemplate>
- </touch:TouchFlatListBox.ItemTemplate>
- </touch:TouchFlatListBox>
- </DockPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
+ <StackPanel Margin="60 20 0 0">
- <DockPanel LastChildFill="False" Margin="0 80 0 0">
- <touch:TouchButton Command="{Binding ResetFineTuningCommand}" DockPanel.Dock="Left" Padding="40 10" Margin="-30 0 0 0" Style="{StaticResource TangoFlatButton}" Foreground="{StaticResource TangoPrimaryAccentBrush}">Reset</touch:TouchButton>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <TextBlock>Select the colors you want to fine tune.</TextBlock>
- <touch:TouchButton Margin="0 0 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartFineTuningCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
- START
- </touch:TouchButton>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.PendingApproval}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Margin="0 20 0 0">
- <StackPanel Orientation="Horizontal">
- <Grid>
- <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">1</TextBlock>
- </Grid>
- <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">Select the best variation for each color:</TextBlock>
- </StackPanel>
+ <StackPanel HorizontalAlignment="Center" Margin="0 40 0 0">
+ <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Defined Colors</TextBlock>
- <ItemsControl Margin="65 40 120 0" ItemsSource="{Binding ApprovalFineTuneItems}" AlternationCount="1000">
+ <ItemsControl Margin="0 40 0 0" ItemsSource="{Binding FineTuneItems}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel>
- <TextBlock Margin="0 0 20 0" VerticalAlignment="Center">
- <Run>Color</Run>
- <Run>#</Run><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(ItemsControl.AlternationIndex),Mode=OneWay,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}"></Run>
- </TextBlock>
- <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}">
+ <touch:TouchCheckBox DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" Margin="0 0 20 0" />
+ <touch:TouchImageButton DockPanel.Dock="Right" Image="{StaticResource Image_Color_Picker}" Width="80" Height="80" Padding="15" CornerRadius="100" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.InvokeFineTuningPaletteCommand}" CommandParameter="{Binding}"></touch:TouchImageButton>
+ <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}" IsEnabled="False">
<touch:TouchFlatListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="{Binding Suggestions.Count}" Margin="0 20"></UniformGrid>
@@ -951,107 +946,197 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
+ </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 40 0 0">
- <Grid>
- <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">2</TextBlock>
- </Grid>
- <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">How to continue</TextBlock>
- </StackPanel>
+ <DockPanel LastChildFill="False" Margin="0 80 0 0">
+ <touch:TouchButton Command="{Binding ResetFineTuningCommand}" DockPanel.Dock="Left" Padding="40 10" Margin="-30 0 0 0" Style="{StaticResource TangoFlatButton}" Foreground="{StaticResource TangoPrimaryAccentBrush}">Reset</touch:TouchButton>
- <UniformGrid Columns="2" Width="530" HorizontalAlignment="Left" Margin="0 40 0 20">
- <StackPanel HorizontalAlignment="Left">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveFineTuningCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Check"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">DONE</TextBlock>
- </StackPanel>
- </touch:TouchButton>
-
- <TextBlock Margin="0 15 0 0" TextAlignment="Center">All colors are approved</TextBlock>
+ <touch:TouchButton Margin="0 0 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartFineTuningCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
+ START
+ </touch:TouchButton>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.PendingApproval}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Margin="0 20 0 0">
+ <StackPanel Orientation="Horizontal">
+ <Grid>
+ <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">1</TextBlock>
+ </Grid>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">Select the best variation for each color:</TextBlock>
</StackPanel>
- <StackPanel HorizontalAlignment="Right">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatFineTuningCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
+ <ItemsControl Margin="65 40 120 0" ItemsSource="{Binding ApprovalFineTuneItems}" AlternationCount="1000">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <TextBlock Margin="0 0 20 0" VerticalAlignment="Center">
+ <Run>Color</Run>
+ <Run>#</Run><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(ItemsControl.AlternationIndex),Mode=OneWay,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}"></Run>
+ </TextBlock>
+ <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}">
+ <touch:TouchFlatListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid Columns="{Binding Suggestions.Count}" Margin="0 20"></UniformGrid>
+ </ItemsPanelTemplate>
+ </touch:TouchFlatListBox.ItemsPanel>
+ <touch:TouchFlatListBox.ItemTemplate>
+ <DataTemplate>
+ <Ellipse Width="70" Height="70" Fill="{Binding Brush}" Margin="30 0">
+ <Ellipse.Style>
+ <Style TargetType="Ellipse">
+ <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="1" ScaleY="1" />
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Effect">
+ <Setter.Value>
+ <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" ShadowDepth="10" Direction="10" BlurRadius="15" Opacity="0" />
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.2" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.2" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="1" Duration="00:00:0.2" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="0" Duration="00:00:0.2" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Ellipse.Style>
+ </Ellipse>
+ </DataTemplate>
+ </touch:TouchFlatListBox.ItemTemplate>
+ </touch:TouchFlatListBox>
+ </DockPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
- <TextBlock Margin="0 15 0 0" TextAlignment="Left" TextWrapping="Wrap" Width="170">Some color need more fine tuning</TextBlock>
+ <StackPanel Orientation="Horizontal" Margin="0 40 0 0">
+ <Grid>
+ <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">2</TextBlock>
+ </Grid>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">How to continue</TextBlock>
</StackPanel>
- </UniformGrid>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.Approved}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Margin="0 40 80 40">
- <DockPanel LastChildFill="False">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
+ <UniformGrid Columns="2" Width="530" HorizontalAlignment="Left" Margin="0 40 0 20">
+ <StackPanel HorizontalAlignment="Left">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveFineTuningCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Check"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">DONE</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+
+ <TextBlock Margin="0 15 0 0" TextAlignment="Center">All colors are approved</TextBlock>
+ </StackPanel>
+
+ <StackPanel HorizontalAlignment="Right">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatFineTuningCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+
+ <TextBlock Margin="0 15 0 0" TextAlignment="Left" TextWrapping="Wrap" Width="170">Some color need more fine tuning</TextBlock>
+ </StackPanel>
+ </UniformGrid>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+
+ <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.Approved}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Margin="0 40 80 40">
+ <DockPanel LastChildFill="False">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
<Run>Colors Approved:</Run>
<Run Text="{Binding Job.FineTuningApproveDate,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=''}"></Run>
- </TextBlock>
- <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding RepeatFineTuningCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">REPEAT FINE TUNING</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
- </StackPanel>
- </touch:TouchExpander>
+ </TextBlock>
+ <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding RepeatFineTuningCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">REPEAT FINE TUNING</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </StackPanel>
+ </touch:TouchExpander>
+ </StackPanel>
</StackPanel>
- </StackPanel>
- </touch:LightTouchScrollViewer>
- </Grid>
-
- <Border VerticalAlignment="Top" x:Name="borderEditDock" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" Padding="0 0 0 10">
- <Border.Effect>
- <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" BlurRadius="20" />
- </Border.Effect>
- </Border>
- </Grid>
+ </touch:LightTouchScrollViewer>
+ </Grid>
- <Grid Grid.Row="1">
- <Grid IsHitTestVisible="False">
- <Grid.Background>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#AEFFFFFF" />
- <GradientStop Offset="1" Color="{StaticResource TangoPrimaryBackgroundColor}" />
- </LinearGradientBrush>
- </Grid.Background>
- <Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" />
+ <Border VerticalAlignment="Top" x:Name="borderEditDock" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" Padding="0 0 0 10">
+ <!--<Border.Effect>
+ <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" BlurRadius="20" />
+ </Border.Effect>-->
+ </Border>
</Grid>
- <!--<Border Padding="20 20">
+
+ <Grid Grid.Row="1">
+ <Grid IsHitTestVisible="False">
+ <Grid.Background>
+ <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
+ <GradientStop Offset="0" Color="#AEFFFFFF" />
+ <GradientStop Offset="1" Color="{StaticResource TangoPrimaryBackgroundColor}" />
+ </LinearGradientBrush>
+ </Grid.Background>
+ <Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" />
+ </Grid>
+ <!--<Border Padding="20 20">
<Grid>
<DockPanel>
<touch:TouchButton IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" DelayCommand="{Binding DyeCommand}" DelayCommandDuration="00:00:0.3">
DYE
</touch:TouchButton>
- --><!--Add this in case you want to display job summery on bottom panel-->
- <!--<localControls:JobSummeryViewer DataContext="{Binding Job}" Height="35" Margin="0 -20 30 0" />--><!--
+ -->
+ <!--Add this in case you want to display job summery on bottom panel-->
+ <!--<localControls:JobSummeryViewer DataContext="{Binding Job}" Height="35" Margin="0 -20 30 0" />-->
+ <!--
</DockPanel>
</Grid>
</Border>-->
- </Grid>
+ </Grid>
- <dragAndDrop:DraggingSurface x:Name="DraggingSurface" />
- </Grid>
+ <dragAndDrop:DraggingSurface x:Name="DraggingSurface" />
+ </Grid>
+ </touch:TouchLoadingPanel>
<Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
<Border.Effect>
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 6a6e770a7..3cd6e1bce 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
@@ -13,6 +13,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.BL;
using Tango.BL.Entities;
using Tango.Core.DI;
using Tango.PPC.Jobs.ViewContracts;
@@ -111,5 +112,15 @@ namespace Tango.PPC.Jobs.Views
borderDockFloat.Child = dockEdit;
borderEditDock.Visibility = Visibility.Collapsed;
}
+
+ private void OnLiquidVolumeFieldValueChanged(object sender, Touch.Controls.DoubleValueChangedEventArgs e)
+ {
+ var liquidVolume = (sender as FrameworkElement).DataContext as LiquidVolume;
+
+ if (liquidVolume != null)
+ {
+ _vm.OnBrushStopFieldValueChanged(liquidVolume.BrushStop);
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
index c858e982e..b413fee0d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
@@ -86,6 +86,27 @@ namespace Tango.PPC.MachineSettings.ViewModels
set { _enableRemoteAssistance = value; RaisePropertyChangedAuto(); OnEnableRemoteAssistanceChanged(); }
}
+ private bool _enableLockScreen;
+ public bool EnableLockScreen
+ {
+ get { return _enableLockScreen; }
+ set { _enableLockScreen = value; RaisePropertyChangedAuto(); }
+ }
+
+ private int _lockScreenTimeoutMinutes;
+ public int LockScreenTimeoutMinutes
+ {
+ get { return _lockScreenTimeoutMinutes; }
+ set { _lockScreenTimeoutMinutes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _lockScreenPassword;
+ public String LockScreenPassword
+ {
+ get { return _lockScreenPassword; }
+ set { _lockScreenPassword = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -125,6 +146,9 @@ namespace Tango.PPC.MachineSettings.ViewModels
Settings.HotSpotPassword = HotSpotPassword;
Settings.EnableExternalBridge = EnableExternalBridge;
Settings.ExternalBridgePassword = ExternalBridgePassword;
+ Settings.EnableLockScreen = EnableLockScreen;
+ Settings.LockScreenTimeout = TimeSpan.FromMinutes(LockScreenTimeoutMinutes);
+ Settings.LockScreenPassword = LockScreenPassword;
Settings.Save();
await MachineProvider.SaveMachine();
@@ -166,6 +190,9 @@ namespace Tango.PPC.MachineSettings.ViewModels
_enableRemoteAssistance = RemoteAssistanceProvider.IsEnabled;
RaisePropertyChanged(nameof(EnableRemoteAssistance));
+ EnableLockScreen = Settings.EnableLockScreen;
+ LockScreenTimeoutMinutes = (int)Settings.LockScreenTimeout.TotalMinutes;
+ LockScreenPassword = Settings.LockScreenPassword;
SelectedJobTypes = new SelectedObjectCollection<JobTypes>(Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToObservableCollection(), Machine.SupportedJobTypes.ToObservableCollection());
SelectedColorSpaces = new SelectedObjectCollection<ColorSpaces>(Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace()).ToObservableCollection(), Machine.SupportedColorSpaces.ToObservableCollection());
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
index 4f846a46d..dd5f89bb2 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
@@ -11,7 +11,7 @@
xmlns:global="clr-namespace:Tango.PPC.MachineSettings"
xmlns:local="clr-namespace:Tango.PPC.MachineSettings.Views"
mc:Ignorable="d"
- d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ d:DesignHeight="2500" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
<Grid Background="{StaticResource TangoMidBackgroundBrush}">
<Grid.RowDefinitions>
@@ -172,6 +172,29 @@
</DockPanel>
</StackPanel>
</touch:TouchExpander>
+
+ <!--LOCK SCREEN-->
+ <touch:TouchExpander Margin="0 20 0 0" Header="Lock Screen" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
+ <StackPanel>
+ <controls:TableGrid Margin="10" RowHeight="60" MakeFirstColumnVerticalAlignmentBottom="False" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Enable Lock Screen</TextBlock>
+ <touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Margin="0 0 110 0" Width="90" IsChecked="{Binding EnableLockScreen}"></touch:TouchToggleSlider>
+
+ <TextBlock VerticalAlignment="Bottom">Lock Screen Timeout (m)</TextBlock>
+ <touch:TouchNumericTextBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Minimum="1" Maximum="60" Value="{Binding LockScreenTimeoutMinutes}" HasDecimalPoint="False" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>
+
+ <TextBlock VerticalAlignment="Bottom">Lock Screen Password</TextBlock>
+ <touch:TouchTextBox IsPassword="True" Watermark="•••••••" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Text="{Binding LockScreenPassword}" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchTextBox>
+ </controls:TableGrid>
+
+ <DockPanel Margin="10 -50 0 0">
+ <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
+ Enable the lock screen to protect the panel from unauthorized access.
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+ </touch:TouchExpander>
</StackPanel>
</touch:LightTouchScrollViewer>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs
index 1f63fcd55..0146f199b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs
@@ -62,8 +62,15 @@ namespace Tango.PPC.Technician.ViewModels
ApplicationLogsViewSource.Filter = (x) =>
{
- LogItemBase log = x as LogItemBase;
- return String.IsNullOrWhiteSpace(Filter) || log.Category.ToString().ToLower().Contains(Filter.ToLower()) || log.Message.ToLower().Contains(Filter.ToLower());
+ try
+ {
+ LogItemBase log = x as LogItemBase;
+ return String.IsNullOrWhiteSpace(Filter) || log.Category.ToString().ToLower().Contains(Filter.ToLower()) || log.Message.ToLower().Contains(Filter.ToLower());
+ }
+ catch
+ {
+ return false;
+ }
};
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml
index cc0a02878..a1cdaf987 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml
@@ -48,9 +48,14 @@
</DockPanel>
<Grid Margin="20">
- <touch:TouchNativeListBox ItemsSource="{Binding ApplicationLogsViewSource}" SelectionMode="Single">
+ <ListBox VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.IsVirtualizing="True" Style="{StaticResource BlankListBox}" ItemsSource="{Binding ApplicationLogsViewSource}" SelectionMode="Single">
+ <ListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <VirtualizingStackPanel />
+ </ItemsPanelTemplate>
+ </ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem" BasedOn="{StaticResource TangoTouchNativeListBoxItem}">
+ <Style TargetType="ListBoxItem" BasedOn="{StaticResource BlankListBoxItem}">
<Setter Property="Height" Value="125"></Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
@@ -61,6 +66,7 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
+ <Grid>
<Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" Margin="5" Padding="5" CornerRadius="5" IsHitTestVisible="False">
<Border.Style>
<Style TargetType="Border">
@@ -101,9 +107,23 @@
</TextBlock>
</StackPanel>
</Border>
+
+ <touch:TouchIcon HorizontalAlignment="Right" VerticalAlignment="Top" Margin="15" Width="16" Height="16">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
+ <Setter Property="Icon" Value="ChevronDown"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,IsAsync=True}" Value="True">
+ <Setter Property="Icon" Value="ChevronUp"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ </Grid>
</DataTemplate>
</ListBox.ItemTemplate>
- </touch:TouchNativeListBox>
+ </ListBox>
</Grid>
</DockPanel>