aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-11 10:26:41 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-11 10:26:41 +0200
commit8d7ace94349c473c20fa5c06431897580e45aa82 (patch)
tree3dc358ec7fb21ffcf3f5595aa67971f1461840a0 /Software/Visual_Studio
parenta899cdbb2c5f36d9fb5d89744b69387289765cf8 (diff)
downloadTango-8d7ace94349c473c20fa5c06431897580e45aa82.tar.gz
Tango-8d7ace94349c473c20fa5c06431897580e45aa82.zip
Implemented single segment per spool on PPC!
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml32
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeViewVM.cs20
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_change.pngbin0 -> 8111 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_replace.pngbin0 -> 46011 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj16
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs22
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs6
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Tango.Emulations.csproj2
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs17
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs175
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/SpoolChangeRequiredEventArgs.cs33
-rw-r--r--Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj3
-rw-r--r--Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml4
14 files changed, 312 insertions, 46 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml
new file mode 100644
index 000000000..74c1d1570
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml
@@ -0,0 +1,32 @@
+<UserControl x:Class="Tango.PPC.Jobs.Dialogs.SpoolChangeView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:local="clr-namespace:Tango.PPC.Jobs.Dialogs"
+ mc:Ignorable="d"
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DesignHeight="630" d:DesignWidth="560" MinWidth="560" Height="700" d:DataContext="{d:DesignInstance Type=local:SpoolChangeViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid Margin="20">
+ <DockPanel>
+ <StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" Orientation="Horizontal">
+ <touch:TouchButton Command="{Binding CloseCommand}" CornerRadius="25" Style="{StaticResource TangoMessageBoxButton}" HorizontalContentAlignment="Center" DockPanel.Dock="Right" Width="140" Height="50" VerticalAlignment="Bottom">ABORT</touch:TouchButton>
+ <touch:TouchButton Command="{Binding OKCommand}" CornerRadius="25" Style="{StaticResource TangoMessageBoxButton}" Foreground="{StaticResource TangoPrimaryAccentBrush}" HorizontalContentAlignment="Center" DockPanel.Dock="Right" Width="140" Height="50" VerticalAlignment="Bottom">CONTINUE</touch:TouchButton>
+ </StackPanel>
+ <StackPanel>
+ <Image Source="../Images/spool_replace.png" Stretch="Uniform" Height="200" RenderOptions.BitmapScalingMode="Fant"></Image>
+ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoHeaderFontSize}">SPOOL CHANGE</TextBlock>
+ <TextBlock Margin="20 10" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
+ <Run>The current job was set to dye each color segment on a single spool.</Run>
+ <LineBreak/>
+ <Run>Please replace the spool and press 'continue'.</Run>
+ </TextBlock>
+
+ <TextBlock FontSize="{StaticResource TangoHeaderFontSize}" Foreground="{StaticResource TangoPrimaryAccentBrush}" HorizontalAlignment="Center" Margin="0 50 0 0">
+ <Run Text="{Binding SpoolChangeRequiredEventArgs.CurrentSegment}"></Run><Run>/</Run><Run Text="{Binding SpoolChangeRequiredEventArgs.TotalSegments}"></Run>
+ </TextBlock>
+ </StackPanel>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml.cs
new file mode 100644
index 000000000..f79e1f4b7
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.PPC.Jobs.Dialogs
+{
+ /// <summary>
+ /// Interaction logic for SpoolChangeView.xaml
+ /// </summary>
+ public partial class SpoolChangeView : UserControl
+ {
+ public SpoolChangeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeViewVM.cs
new file mode 100644
index 000000000..8942cb284
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/SpoolChangeViewVM.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Integration.Operation;
+using Tango.SharedUI;
+
+namespace Tango.PPC.Jobs.Dialogs
+{
+ public class SpoolChangeViewVM : DialogViewVM
+ {
+ public SpoolChangeRequiredEventArgs SpoolChangeRequiredEventArgs { get; set; }
+
+ public SpoolChangeViewVM(SpoolChangeRequiredEventArgs spoolChangeRequiredEventArgs)
+ {
+ SpoolChangeRequiredEventArgs = spoolChangeRequiredEventArgs;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_change.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_change.png
new file mode 100644
index 000000000..17737eed0
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_change.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_replace.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_replace.png
new file mode 100644
index 000000000..0adf7e7d4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/spool_replace.png
Binary files differ
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 c82512ef6..ddd8d1c07 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
@@ -104,6 +104,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Dialogs\SpoolChangeView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Resources\Styles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -174,6 +178,10 @@
<DependentUpon>JobTypePickerView.xaml</DependentUpon>
</Compile>
<Compile Include="Dialogs\JobTypePickerViewVM.cs" />
+ <Compile Include="Dialogs\SpoolChangeView.xaml.cs">
+ <DependentUpon>SpoolChangeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Dialogs\SpoolChangeViewVM.cs" />
<Compile Include="JobsModule.cs" />
<Compile Include="JobsModuleSettings.cs" />
<Compile Include="Messages\JobSelectedMessage.cs" />
@@ -367,10 +375,16 @@
<ItemGroup>
<Resource Include="Images\job.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\spool_change.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\spool_replace.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</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 387b3e6a0..16ffdd906 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
@@ -8,6 +8,7 @@ using Tango.Integration.Operation;
using Tango.PPC.Common;
using Tango.PPC.Common.Navigation;
using Tango.PPC.Jobs.AppBarItems;
+using Tango.PPC.Jobs.Dialogs;
using Tango.PPC.Jobs.Views;
namespace Tango.PPC.Jobs.ViewModels
@@ -95,10 +96,31 @@ namespace Tango.PPC.Jobs.ViewModels
{
Job = e.Job;
e.JobHandler.StatusChanged += JobHandler_StatusChanged;
+ e.JobHandler.SpoolChangeRequired += JobHandler_SpoolChangeRequired;
e.JobHandler.Stopped += JobHandler_Stopped;
}
/// <summary>
+ /// Handles the SpoolChangeRequired event of the JobHandler.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="SpoolChangeRequiredEventArgs"/> instance containing the event data.</param>
+ private void JobHandler_SpoolChangeRequired(object sender, SpoolChangeRequiredEventArgs e)
+ {
+ InvokeUI(async () =>
+ {
+ if ((await NotificationProvider.ShowDialog(new SpoolChangeViewVM(e))).DialogResult)
+ {
+ e.Confirm();
+ }
+ else
+ {
+ e.Abort();
+ }
+ });
+ }
+
+ /// <summary>
/// Handles the Stopped event of the JobHandler.
/// </summary>
/// <param name="sender">The source of the event.</param>
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
index 911a55e22..95779f03e 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
@@ -148,7 +148,7 @@ namespace Tango.BL.Entities
{
get
{
- if (EnableInterSegment)
+ if (EnableInterSegment && IsAllSegmentsPerSpool)
{
ObservableCollection<Segment> effectiveSegments = new ObservableCollection<Segment>();
@@ -285,7 +285,7 @@ namespace Tango.BL.Entities
}
}
- if (propName == nameof(InterSegmentLength) || propName == nameof(EnableInterSegment))
+ if (propName == nameof(InterSegmentLength) || propName == nameof(EnableInterSegment) || propName == nameof(SpoolsDistribution))
{
OnLengthChanged();
RaisePropertyChanged(nameof(EffectiveSegments));
@@ -349,7 +349,7 @@ namespace Tango.BL.Entities
private double GetLength()
{
- return Segments.Sum(x => x.LengthWithFactor) + (EnableInterSegment ? (InterSegmentLength * (Segments.Count > 0 ? Segments.Count - 1 : Segments.Count)) : 0);
+ return Segments.Sum(x => x.LengthWithFactor) + ((EnableInterSegment && IsAllSegmentsPerSpool) ? (InterSegmentLength * (Segments.Count > 0 ? Segments.Count - 1 : Segments.Count)) : 0);
}
#endregion
diff --git a/Software/Visual_Studio/Tango.Emulations/Tango.Emulations.csproj b/Software/Visual_Studio/Tango.Emulations/Tango.Emulations.csproj
index 022188335..e01f0be8d 100644
--- a/Software/Visual_Studio/Tango.Emulations/Tango.Emulations.csproj
+++ b/Software/Visual_Studio/Tango.Emulations/Tango.Emulations.csproj
@@ -90,7 +90,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/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
index dbdf98d1d..ed008cae8 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
@@ -70,6 +70,11 @@ namespace Tango.Integration.Operation
/// </summary>
public event EventHandler<int> UnitCompleted;
+ /// <summary>
+ /// Occurs when the job is set to 1 segment per spool and it's time to replace the spool.
+ /// </summary>
+ public event EventHandler<SpoolChangeRequiredEventArgs> SpoolChangeRequired;
+
#endregion
#region Properties
@@ -252,6 +257,18 @@ namespace Tango.Integration.Operation
Stopped?.Invoke(this, new EventArgs());
}
+ /// <summary>
+ /// Raises the spool change required event.
+ /// </summary>
+ internal void RaiseSpoolChangeRequired(Action confirmAction, Action abortAction)
+ {
+ SpoolChangeRequired?.Invoke(this, new SpoolChangeRequiredEventArgs(confirmAction, abortAction)
+ {
+ CurrentSegment = Status.CurrentSegment.SegmentIndex,
+ TotalSegments = Status.Segments.Count,
+ });
+ }
+
#endregion
#region Private Methods
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 080fc6cd8..9d65655e7 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -893,6 +893,136 @@ namespace Tango.Integration.Operation
}
}
+ /// <summary>
+ /// Creates a PMR job segment.
+ /// </summary>
+ /// <param name="segment">The segment.</param>
+ /// <returns></returns>
+ private JobSegment CreatePMRJobSegment(Segment segment, Job job, ProcessParametersTable processParameters)
+ {
+ JobSegment jobSegment = new JobSegment();
+ jobSegment.Length = segment.LengthWithFactor;
+ jobSegment.Name = segment.Name;
+
+ foreach (var stop in segment.BrushStops)
+ {
+ JobBrushStop jobStop = new JobBrushStop();
+ jobStop.Index = stop.StopIndex;
+ jobStop.OffsetPercent = stop.OffsetPercent;
+ jobStop.OffsetMeters = stop.OffsetMeters;
+
+ if (stop.LiquidVolumes == null)
+ {
+ stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters);
+ }
+
+ foreach (var liquidVolume in stop.LiquidVolumes)
+ {
+ JobDispenser dispenser = new JobDispenser();
+ dispenser.Index = liquidVolume.IdsPack.PackIndex;
+ dispenser.Volume = liquidVolume.Volume;
+ dispenser.DispenserLiquidType = (DispenserLiquidType)liquidVolume.IdsPack.LiquidType.Code;
+ dispenser.DispenserStepDivision = (DispenserStepDivision)liquidVolume.DispenserStepDivision;
+
+ dispenser.NanoliterPerPulse = liquidVolume.IdsPack.DispenserType.NlPerPulse;
+
+ dispenser.LiquidMaxNanoliterPerCentimeter = liquidVolume.LiquidMaxNanoliterPerCentimeter;
+ dispenser.NanoliterPerCentimeter = liquidVolume.NanoliterPerCentimeter;
+ dispenser.NanolitterPerSecond = liquidVolume.NanoliterPerSecond;
+ dispenser.PulsePerSecond = liquidVolume.PulsePerSecond;
+
+ jobStop.Dispensers.Add(dispenser);
+ }
+
+ jobSegment.BrushStops.Add(jobStop);
+ }
+
+ return jobSegment;
+ }
+
+ private void ContinueSingleSpoolJob(Segment segment, Job job, ProcessParametersTable processParameters, JobHandler handler)
+ {
+ JobRequest request = new JobRequest();
+
+ JobTicket ticket = new JobTicket();
+ ticket.Guid = handler.Job.Guid;
+ ticket.EnableInterSegment = job.EnableInterSegment;
+ ticket.InterSegmentLength = job.InterSegmentLength;
+ ticket.Length = segment.Length;
+ ticket.WindingMethod = (JobWindingMethod)job.WindingMethod.Code;
+ ticket.Spool = new JobSpool();
+
+ job.SpoolType.MapPrimitivesTo(ticket.Spool);
+ ticket.Spool.JobSpoolType = (JobSpoolType)job.SpoolType.Code;
+
+ ProcessParameters process = new ProcessParameters();
+ processParameters.MapPrimitivesTo(process);
+ ticket.ProcessParameters = process;
+
+ ticket.Segments.Add(CreatePMRJobSegment(segment, job, processParameters));
+
+ request.JobTicket = ticket;
+
+ LogRequestSent(request);
+ bool responseLogged = false;
+
+ var previous_segments_length = job.Segments.Where(x => x.SegmentIndex < segment.SegmentIndex).Sum(x => x.Length);
+
+ SendContinuousRequest<JobRequest, JobResponse>(request, null, TimeSpan.FromSeconds(2)).Subscribe((response) =>
+ {
+ response.Message.Status.Progress += previous_segments_length;
+
+ handler.RaiseStatusReceived(response.Message.Status);
+
+ if (!responseLogged && segment == job.Segments.First())
+ {
+ responseLogged = true;
+ Status = MachineStatuses.Printing;
+ RunningJob = handler.Job;
+ PrintingStarted?.Invoke(this, new PrintingEventArgs(handler, handler.Job));
+ LogResponseReceived(response.Message);
+ }
+
+ }, (ex) =>
+ {
+ if (!(ex is ContinuousResponseAbortedException))
+ {
+ Status = MachineStatuses.ReadyToDye;
+
+ if (!handler.IsCanceled)
+ {
+ PrintingFailed?.Invoke(this, new PrintingFailedEventArgs(handler, handler.Job, ex));
+ handler.RaiseFailed(ex);
+ LogRequestFailed(request, ex);
+ }
+ }
+ else
+ {
+ Status = MachineStatuses.ReadyToDye;
+ }
+ }, () =>
+ {
+ if (segment == job.Segments.Last())
+ {
+ Status = MachineStatuses.ReadyToDye;
+ PrintingCompleted?.Invoke(this, new PrintingEventArgs(handler, handler.Job));
+ handler.RaiseCompleted();
+ }
+ else
+ {
+ handler.RaiseSpoolChangeRequired(() =>
+ {
+ ContinueSingleSpoolJob(job.Segments[job.Segments.IndexOf(segment) + 1], job, processParameters, handler);
+ },() =>
+ {
+ PrintingAborted?.Invoke(this, new PrintingEventArgs(handler, handler.Job));
+ Status = MachineStatuses.ReadyToDye;
+ handler.RaiseCanceled();
+ });
+ }
+ });
+ }
+
#endregion
#region Public Methods
@@ -1022,44 +1152,7 @@ namespace Tango.Integration.Operation
foreach (var segment in job.Segments)
{
- JobSegment jobSegment = new JobSegment();
- jobSegment.Length = segment.LengthWithFactor;
- jobSegment.Name = segment.Name;
-
- foreach (var stop in segment.BrushStops)
- {
- JobBrushStop jobStop = new JobBrushStop();
- jobStop.Index = stop.StopIndex;
- jobStop.OffsetPercent = stop.OffsetPercent;
- jobStop.OffsetMeters = stop.OffsetMeters;
-
- if (stop.LiquidVolumes == null)
- {
- stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters);
- }
-
- foreach (var liquidVolume in stop.LiquidVolumes)
- {
- JobDispenser dispenser = new JobDispenser();
- dispenser.Index = liquidVolume.IdsPack.PackIndex;
- dispenser.Volume = liquidVolume.Volume;
- dispenser.DispenserLiquidType = (DispenserLiquidType)liquidVolume.IdsPack.LiquidType.Code;
- dispenser.DispenserStepDivision = (DispenserStepDivision)liquidVolume.DispenserStepDivision;
-
- dispenser.NanoliterPerPulse = liquidVolume.IdsPack.DispenserType.NlPerPulse;
-
- dispenser.LiquidMaxNanoliterPerCentimeter = liquidVolume.LiquidMaxNanoliterPerCentimeter;
- dispenser.NanoliterPerCentimeter = liquidVolume.NanoliterPerCentimeter;
- dispenser.NanolitterPerSecond = liquidVolume.NanoliterPerSecond;
- dispenser.PulsePerSecond = liquidVolume.PulsePerSecond;
-
- jobStop.Dispensers.Add(dispenser);
- }
-
- jobSegment.BrushStops.Add(jobStop);
- }
-
- ticket.Segments.Add(jobSegment);
+ ticket.Segments.Add(CreatePMRJobSegment(segment, job, processParameters));
}
request.JobTicket = ticket;
@@ -1085,6 +1178,12 @@ namespace Tango.Integration.Operation
RunningJobStatus = s;
};
+ if (!job.IsAllSegmentsPerSpool)
+ {
+ ContinueSingleSpoolJob(job.Segments.First(), job, processParameters, handler);
+ return handler;
+ }
+
LogRequestSent(request);
bool responseLogged = false;
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/SpoolChangeRequiredEventArgs.cs b/Software/Visual_Studio/Tango.Integration/Operation/SpoolChangeRequiredEventArgs.cs
new file mode 100644
index 000000000..3f2660c4b
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Operation/SpoolChangeRequiredEventArgs.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.Integration.Operation
+{
+ public class SpoolChangeRequiredEventArgs : EventArgs
+ {
+ private Action _confirmAction;
+ private Action _abortAction;
+
+ public SpoolChangeRequiredEventArgs(Action confirmAction, Action abortAction)
+ {
+ _confirmAction = confirmAction;
+ _abortAction = abortAction;
+ }
+
+ public int CurrentSegment { get; set; }
+ public int TotalSegments { get; set; }
+
+ public void Confirm()
+ {
+ _confirmAction();
+ }
+
+ public void Abort()
+ {
+ _abortAction();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
index 5719f23ca..865738305 100644
--- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
+++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
@@ -89,6 +89,7 @@
<Compile Include="IntegrationSettings.cs" />
<Compile Include="Operation\DefaultMachineEventsStateProvider.cs" />
<Compile Include="Operation\EmbeddedLogItem.cs" />
+ <Compile Include="Operation\SpoolChangeRequiredEventArgs.cs" />
<Compile Include="Upgrade\FirmwareUpgradeHandler.cs" />
<Compile Include="Upgrade\FirmwareUpgradeProgressEventArgs.cs" />
<Compile Include="Upgrade\FirmwareUpgradeStatus.cs" />
@@ -166,7 +167,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml b/Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml
index 351df8ff2..77d1c32a1 100644
--- a/Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml
@@ -51,11 +51,11 @@
<Style x:Key="TangoMessageBoxButton" TargetType="{x:Type controls:TouchButton}" BasedOn="{StaticResource TangoFlatButton}">
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
- <Setter Property="FontSize" Value="{StaticResource TangoButtonFontSize}"></Setter>
+ <Setter Property="FontSize" Value="{StaticResource TangoTitleFontSize}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource TangoDividerBrush}"></Setter>
<Setter Property="BorderThickness" Value="0 0 0 0"></Setter>
<Setter Property="CornerRadius" Value="50"></Setter>
- <Setter Property="RippleFactor" Value="2"></Setter>
+ <Setter Property="RippleFactor" Value="5"></Setter>
</Style>
</ResourceDictionary> \ No newline at end of file