aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml20
-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.csproj3
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs22
-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.cs48
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs15
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs34
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml1128
10 files changed, 724 insertions, 618 deletions
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..be151678d 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,12 +28,12 @@
</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>
- <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding>
- <Binding Path="LengthWithFactor"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.Length" IsAsync="True"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth" IsAsync="True"></Binding>
+ <Binding Path="LengthWithFactor" IsAsync="True"></Binding>
</MultiBinding>
</Grid.Width>
@@ -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/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..5b7e97c93 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>
@@ -408,7 +409,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs
index 264f41131..3e8c6f280 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>
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..c7946ee6a 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
@@ -396,7 +396,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;
@@ -433,10 +434,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 +468,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 +548,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}.");
}
}
@@ -764,8 +767,11 @@ namespace Tango.PPC.Jobs.ViewModels
/// <param name="brushStop">The brush stop.</param>
public void OnBrushStopFieldValueChanged(BrushStop brushStop)
{
- brushStop.Corrected = false;
- brushStop.OutOfGamutChecked = false;
+ if (brushStop != null)
+ {
+ brushStop.Corrected = false;
+ brushStop.OutOfGamutChecked = false;
+ }
}
/// <summary>
@@ -802,20 +808,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 +946,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Starts the fine tuning.
/// </summary>
- private void StartFineTuning()
+ private async void StartFineTuning()
{
try
{
@@ -948,14 +954,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..86c53440e 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;
@@ -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..d72f4544a 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;
@@ -28,6 +30,38 @@ 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));
+ });
+ }
+ 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>
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..e44d194bd 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
@@ -210,7 +210,7 @@
</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..cb12805f5 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>
@@ -61,7 +65,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 +88,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,22 +98,26 @@
</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>
</Style.Triggers>
@@ -118,11 +126,11 @@
</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}">
+ <DockPanel LastChildFill="False" Margin="0 20 0 0" IsEnabled="{Binding IsMiddle,IsAsync=True}">
<TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left">Position (m):</TextBlock>
<Grid Margin="20 0 0 0" Width="300" DockPanel.Dock="Right">
<Grid.ColumnDefinitions>
@@ -130,21 +138,24 @@
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
- <touch:TouchNumericTextBox Value="{Binding OffsetMeters}" HasDecimalPoint="True" StringFormat="0.0" Maximum="{Binding Segment.Length}" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>
+ <touch:TouchNumericTextBox Value="{Binding OffsetMeters,IsAsync=True}" HasDecimalPoint="True" StringFormat="0.0" Maximum="{Binding Segment.Length,IsAsync=True}" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>
<!--<touch:TouchSlider Grid.Column="1" Height="30" Margin="10 0 0 -23" Maximum="{Binding Segment.Length}" Value="{Binding OffsetMeters}" />-->
</Grid>
</DockPanel>
</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 +164,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 +180,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 +190,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,46 +210,52 @@
<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>
</Style.Triggers>
@@ -255,27 +272,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>
- <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}" />
+ <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):"></controls:FastTextBlock>
+ <touch:TouchNumericTextBox Width="180" DockPanel.Dock="Right" Value="{Binding Length,IsAsync=True}" 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 +300,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 +321,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 +341,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 +356,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 +373,253 @@
</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>
- <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" />
- </DockPanel>
- </UniformGrid>
- </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="Center"></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="Center"></TextBlock>
+ <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfHeads}" Minimum="1" Maximum="1000" JoggingFactor="0.1" />
+ </DockPanel>
+ </UniformGrid>
+ </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 +641,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 +887,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>
-
- <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>
+ <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>
- <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>