aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-03-10 16:26:32 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-03-10 16:26:32 +0200
commit6dbef47fe2ca696fcf11ce4c2d0662c28b36bf35 (patch)
tree4acde5e7e00c919e57c8e09e30179dfb14b2e36c /Software
parent0e4045af38f59004c537e9bf5e7f2e89f7320f1f (diff)
downloadTango-6dbef47fe2ca696fcf11ce4c2d0662c28b36bf35.tar.gz
Tango-6dbef47fe2ca696fcf11ce4c2d0662c28b36bf35.zip
FSE Remote Job Parameters.
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml8
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs1
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs7
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs19
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj1
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs12
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs15
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml54
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/DefaultRemoteJobService.cs109
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/IRemoteJobInputOutputProvider.cs22
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobInputOutput.cs22
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobProgress.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobUpdateResponse.cs1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
20 files changed, 270 insertions, 18 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
index ae4444f06..538e8a795 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
@@ -241,7 +241,7 @@ namespace Tango.FSE.Statistics.ViewModels
StartSelectedDate = DateTime.Now.AddDays(-7);
EndSelectedDate = DateTime.Now;
- LengthUpperValue = 10000;
+ LengthUpperValue = 1000000;
GetStatisticsCommand = new RelayCommand(GetStatistics, () => IsFiltersAvailable);
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
index 88b460ab1..590192e28 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
@@ -442,21 +442,21 @@
<GroupBox.Header>
<TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Length</TextBox>
</GroupBox.Header>
- <mahapps:RangeSlider Focusable="True" Height="40" Margin="5 5 5 5" Minimum="0" Maximum="10000" ExtendedMode="True"
+ <mahapps:RangeSlider Focusable="True" Height="40" Margin="5 5 5 5" Minimum="0" Maximum="1000000" ExtendedMode="True"
LowerValue="{Binding LengthLowerValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
UpperValue="{Binding LengthUpperValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center" IsSnapToTickEnabled="True" FontSize="8"/>
</GroupBox>
- <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Width="130" TextBlock.Foreground="{StaticResource FSE_GrayBrush}">
+ <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Width="150" Margin="0 -5 0 0" TextBlock.Foreground="{StaticResource FSE_GrayBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="30" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
- <TextBlock HorizontalAlignment="Left" Text="{Binding LengthLowerValue}" Grid.Column="0"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000000" Style="{StaticResource FSE_NumericUpDown_Flat_Dark}" Width="60" FontSize="{StaticResource FSE_SmallerFontSize}" MinWidth="10" Height="20" Padding="2 0 0 0" MinHeight="10" HideUpDownButtons="True" Value="{Binding LengthLowerValue,UpdateSourceTrigger=PropertyChanged}" Grid.Column="0"></mahapps:NumericUpDown>
<material:PackIcon HorizontalAlignment="Center" Grid.Column="1" Kind="ArrowLeftRight" Margin="0 -2 0 0" VerticalAlignment="Center" Width="20" Height="20"></material:PackIcon>
- <TextBlock HorizontalAlignment="Right" Text="{Binding LengthUpperValue}" Grid.Column="2"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000000" Style="{StaticResource FSE_NumericUpDown_Flat_Dark}" Width="60" FontSize="{StaticResource FSE_SmallerFontSize}" MinWidth="10" Height="20" MinHeight="10" Padding="2 0 0 0" HideUpDownButtons="True" BorderBrush="Transparent" Value="{Binding LengthUpperValue,UpdateSourceTrigger=PropertyChanged}" Grid.Column="2"></mahapps:NumericUpDown>
</Grid>
</Grid>
</StackPanel>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs
index 65299eac9..ff70bd7ba 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs
@@ -10,6 +10,7 @@ namespace Tango.FSE.Common.RemoteJob
{
event EventHandler<RemoteJobStartedEventArgs> RemoteJobStarted;
event EventHandler<RemoteJobStoppedEventArgs> RemoteJobStopped;
+ event EventHandler<RemoteJobUpdatedEventArgs> RemoteJobUpdated;
bool IsRemoteJobRunning { get; }
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs
index 001263044..d3af568aa 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs
@@ -5,11 +5,18 @@ using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.Integration.Operation;
+using Tango.PPC.Shared.Jobs;
namespace Tango.FSE.Common.RemoteJob
{
public class RemoteJobStartedEventArgs : EventArgs
{
+ public RemoteJobUpdateResponse RemoteJobUpdateResponse { get; set; }
public JobHandler JobHandler { get; set; }
+
+ public RemoteJobStartedEventArgs()
+ {
+ RemoteJobUpdateResponse = new RemoteJobUpdateResponse();
+ }
}
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs
new file mode 100644
index 000000000..1b548adb2
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PPC.Shared.Jobs;
+
+namespace Tango.FSE.Common.RemoteJob
+{
+ public class RemoteJobUpdatedEventArgs : EventArgs
+ {
+ public RemoteJobUpdateResponse RemoteJobUpdateResponse { get; set; }
+
+ public RemoteJobUpdatedEventArgs()
+ {
+ RemoteJobUpdateResponse = new RemoteJobUpdateResponse();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
index 8ef3551d5..519da38bb 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
@@ -317,6 +317,7 @@
<Compile Include="RemoteDesktop\VideoConfiguration.cs" />
<Compile Include="RemoteDesktop\VideoQuality.cs" />
<Compile Include="RemoteDesktop\VideoRecordingHandler.cs" />
+ <Compile Include="RemoteJob\RemoteJobUpdatedEventArgs.cs" />
<Compile Include="RemoteUpgrade\IRemoteUpgradeManager.cs" />
<Compile Include="RemoteUpgrade\RemoteUpgradeHandler.cs" />
<Compile Include="RemoteUpgrade\RemoteUpgradeHandlerStatus.cs" />
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs
index 4c4d5430e..d3c6c44e8 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs
@@ -23,8 +23,15 @@ namespace Tango.FSE.UI.RemoteJob
public event EventHandler<RemoteJobStartedEventArgs> RemoteJobStarted;
public event EventHandler<RemoteJobStoppedEventArgs> RemoteJobStopped;
+ public event EventHandler<RemoteJobUpdatedEventArgs> RemoteJobUpdated;
+
+ private bool _isRemoteJobRunning;
+ public bool IsRemoteJobRunning
+ {
+ get { return _isRemoteJobRunning; }
+ private set { _isRemoteJobRunning = value; RaisePropertyChangedAuto(); }
+ }
- public bool IsRemoteJobRunning { get; private set; }
[TangoInject]
private IMachineProvider MachineProvider { get; set; }
@@ -97,6 +104,8 @@ namespace Tango.FSE.UI.RemoteJob
JobHandler = _handler
});
+ RemoteJobUpdated?.Invoke(this, new RemoteJobUpdatedEventArgs() { RemoteJobUpdateResponse = response });
+
return;
}
@@ -105,6 +114,7 @@ namespace Tango.FSE.UI.RemoteJob
if (response.Progress.JobStatus != null)
{
_handler.RaiseStatusReceived(response.Progress.JobStatus);
+ RemoteJobUpdated?.Invoke(this, new RemoteJobUpdatedEventArgs() { RemoteJobUpdateResponse = response });
}
if (stage == RemoteJobStage.Failed && IsRemoteJobRunning)
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs
index 453a0892e..07784ce1f 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs
@@ -36,6 +36,14 @@ namespace Tango.FSE.UI.Tiles.RemoteJob
set { _runningJobStatus = value; RaisePropertyChangedAuto(); }
}
+ private RemoteJobUpdateResponse _remoteJobResponse;
+ public RemoteJobUpdateResponse RemoteJobResponse
+ {
+ get { return _remoteJobResponse; }
+ set { _remoteJobResponse = value; RaisePropertyChangedAuto(); }
+ }
+
+
private bool _isRunning;
public bool IsRunning
{
@@ -99,9 +107,15 @@ namespace Tango.FSE.UI.Tiles.RemoteJob
RemoteJobProvider.RemoteJobStarted += RemoteJobProvider_RemoteJobStarted;
RemoteJobProvider.RemoteJobStopped += RemoteJobProvider_RemoteJobStopped;
+ RemoteJobProvider.RemoteJobUpdated += RemoteJobProvider_RemoteJobUpdated;
MachineProvider.MachineConnected += MachineProvider_MachineConnected;
}
+ private void RemoteJobProvider_RemoteJobUpdated(object sender, Common.RemoteJob.RemoteJobUpdatedEventArgs e)
+ {
+ RemoteJobResponse = e.RemoteJobUpdateResponse;
+ }
+
private void MachineProvider_MachineConnected(object sender, Common.Connection.MachineConnectedEventArgs e)
{
InitDemoJob();
@@ -119,6 +133,7 @@ namespace Tango.FSE.UI.Tiles.RemoteJob
Handler.StatusChanged -= Handler_StatusChanged;
}
+ RemoteJobResponse = e.RemoteJobUpdateResponse;
Handler = e.JobHandler;
Handler.StatusChanged += Handler_StatusChanged;
Job = e.JobHandler.Job;
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml
index 1323c9298..419d34e89 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml
@@ -9,9 +9,55 @@
d:DesignHeight="100" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:RemoteJobTile, IsDesignTimeCreatable=False}">
<Grid TextElement.Foreground="{StaticResource FSE_PrimaryAccentBrush}">
<Viewbox Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}">
- <Border Background="#292929" CornerRadius="10" VerticalAlignment="Bottom" Padding="20 0" Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}">
- <controls:RunningJobViewer IsRunning="{Binding IsRunning}" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" IsEureka="{Binding IsEureka}" IsActive="True" Margin="30 10" Height="90" />
- </Border>
- </Viewbox>
+ <Grid>
+ <Grid HorizontalAlignment="Left" Width="700" Height="200" Margin="50 -350 0 0" TextElement.Foreground="{StaticResource FSE_GrayBrush}" Visibility="{Binding IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel VerticalAlignment="Bottom">
+ <TextBlock Margin="5 0 0 0" FontSize="{StaticResource FSE_LargeFontSize}" Text="{Binding Handler.Job.Name}" FontWeight="Bold"></TextBlock>
+ <TextBlock Margin="5 0 0 0" FontSize="{StaticResource FSE_DefaultFontSize}" Text="{Binding RemoteJobResponse.RmlName}" FontStyle="Italic"></TextBlock>
+
+ <StackPanel Orientation="Horizontal" TextElement.FontSize="11" Margin="0 10 0 0" Visibility="{Binding IsEureka,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <ItemsControl ItemsSource="{Binding RemoteJobResponse.Progress.InputOutput.Input}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel Orientation="Horizontal"/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border Margin="5" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1" Width="45" Height="45" CornerRadius="5">
+ <DockPanel>
+ <TextBlock Margin="0 5 0 0" DockPanel.Dock="Top" Text="{Binding Item1,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ <TextBlock Margin="0 2 0 0" Text="{Binding Item2,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ <TextBlock Margin="20 0" Text="=>" VerticalAlignment="Center"></TextBlock>
+ <ItemsControl ItemsSource="{Binding RemoteJobResponse.Progress.InputOutput.Output}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel Orientation="Horizontal"/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border Margin="5" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1" Width="45" Height="45" CornerRadius="5">
+ <DockPanel>
+ <TextBlock Margin="0 5 0 0" DockPanel.Dock="Top" Text="{Binding Item1,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ <TextBlock Margin="0 2 0 0" Text="{Binding Item2,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ <Border Background="#292929" CornerRadius="10" VerticalAlignment="Bottom" Padding="20 0" Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}">
+ <controls:RunningJobViewer IsRunning="{Binding IsRunning}" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" IsEureka="{Binding IsEureka}" IsActive="True" Margin="30 10" Height="90" />
+ </Border>
+ </Grid>
+ </Viewbox>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
index 5f005385e..c3d6136af 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
@@ -474,6 +474,8 @@ namespace Tango.PPC.Jobs.ViewModels
job.Name = "Unnamed";
job.EnableInterSegment = false;
job.InterSegmentLength = 0;
+ job.NumberOfSpools = 4;
+ job.NumberOfUnits = 1;
}
else
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/DefaultRemoteJobService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/DefaultRemoteJobService.cs
index 8826a8be3..00b4f5ad1 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/DefaultRemoteJobService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/DefaultRemoteJobService.cs
@@ -8,6 +8,7 @@ using Tango.Core;
using Tango.Core.DI;
using Tango.Integration.ExternalBridge;
using Tango.Integration.Operation;
+using Tango.PPC.Common.Build;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.ExternalBridge;
using Tango.PPC.Shared.Jobs;
@@ -27,18 +28,23 @@ namespace Tango.PPC.Common.RemoteJob
private List<RunningJobUpdateClient> _clients;
private JobHandler _handler;
private JobDTO _currentJobDTO;
+ private String _rmlName;
private ProcessParametersTableDTO _currentJobProcessParameters;
+ private IRemoteJobInputOutputProvider _inputOutputProvider;
+ private IBuildProvider _buildProvider;
public bool Enabled { get; set; } = true;
private IMachineProvider MachineProvider { get; set; }
- public DefaultRemoteJobService(IPPCExternalBridgeService externalBridge, IMachineProvider machineProvider)
+ public DefaultRemoteJobService(IPPCExternalBridgeService externalBridge, IMachineProvider machineProvider, IBuildProvider buildProvider)
{
externalBridge.RegisterRequestHandler(this);
MachineProvider = machineProvider;
+ _buildProvider = buildProvider;
+
_clients = new List<RunningJobUpdateClient>();
MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted;
}
@@ -52,6 +58,14 @@ namespace Tango.PPC.Common.RemoteJob
_currentJobDTO = JobDTO.FromObservable(e.Job);
_currentJobProcessParameters = ProcessParametersTableDTO.FromObservable(_handler.ProcessParameters);
+ _rmlName = e.Job.Rml.FinalName;
+
+ RemoteJobInputOutput inputOutput = new RemoteJobInputOutput();
+
+ if (_clients.Count > 0 && _buildProvider.IsEureka)
+ {
+ inputOutput = GetCurrentJobInputOutput();
+ }
foreach (var client in _clients.ToList())
{
@@ -60,12 +74,15 @@ namespace Tango.PPC.Common.RemoteJob
RemoteJobProgress progress = new RemoteJobProgress();
progress.Stage = RemoteJobStage.Started;
progress.JobStatus = _handler.JobStatus;
+ progress.InputOutput = inputOutput;
+
await client.Receiver.SendGenericResponse(new RemoteJobUpdateResponse()
{
Job = _currentJobDTO,
ProcessParameters = _currentJobProcessParameters,
- Progress = progress
+ Progress = progress,
+ RmlName = _rmlName
}, client.Token);
client.JobSent = true;
@@ -76,6 +93,16 @@ namespace Tango.PPC.Common.RemoteJob
private async void JobHandler_StatusChanged(object sender, RunningJobStatus e)
{
+ var currentProgress = GetJobProgress(_handler);
+ RemoteJobInputOutput inputOutput = new RemoteJobInputOutput();
+
+ if (_clients.Count > 0 && _buildProvider.IsEureka)
+ {
+ inputOutput = GetCurrentJobInputOutput();
+ }
+
+ currentProgress.InputOutput = inputOutput;
+
foreach (var client in _clients.ToList())
{
if (client.JobSent)
@@ -84,7 +111,8 @@ namespace Tango.PPC.Common.RemoteJob
{
await client.Receiver.SendGenericResponse(new RemoteJobUpdateResponse()
{
- Progress = GetJobProgress(_handler)
+ Progress = currentProgress,
+ RmlName = _rmlName,
}, client.Token);
}
catch { }
@@ -96,12 +124,14 @@ namespace Tango.PPC.Common.RemoteJob
RemoteJobProgress progress = new RemoteJobProgress();
progress.Stage = RemoteJobStage.Started;
progress.JobStatus = _handler.JobStatus;
+ progress.InputOutput = inputOutput;
await client.Receiver.SendGenericResponse(new RemoteJobUpdateResponse()
{
Job = _currentJobDTO,
ProcessParameters = _currentJobProcessParameters,
- Progress = progress
+ Progress = progress,
+ RmlName = _rmlName
}, client.Token);
client.JobSent = true;
@@ -128,6 +158,77 @@ namespace Tango.PPC.Common.RemoteJob
}
}
+ private RemoteJobInputOutput GetCurrentJobInputOutput()
+ {
+ var inputOutput = new RemoteJobInputOutput();
+
+ if (_inputOutputProvider == null && _buildProvider.IsEureka)
+ {
+ _inputOutputProvider = TangoIOC.Default.GetInstance<IRemoteJobInputOutputProvider>();
+ }
+
+ if (_inputOutputProvider != null)
+ {
+ var i = _inputOutputProvider;
+
+ if (i.CurrentBrushStop != null)
+ {
+ var colorSpace = i.CurrentBrushStop.BrushColorSpace;
+
+ inputOutput.ColorSpace = colorSpace;
+
+ switch (colorSpace)
+ {
+ case BL.Enumerations.ColorSpaces.Volume:
+ inputOutput.Input.Add(new Tuple<string, String>("C", i.CurrentBrushStop.Cyan.ToString("0.00")));
+ inputOutput.Input.Add(new Tuple<string, String>("M", i.CurrentBrushStop.Magenta.ToString("0.00")));
+ inputOutput.Input.Add(new Tuple<string, String>("Y", i.CurrentBrushStop.Yellow.ToString("0.00")));
+ inputOutput.Input.Add(new Tuple<string, String>("K", i.CurrentBrushStop.Black.ToString("0.00")));
+ break;
+ case BL.Enumerations.ColorSpaces.RGB:
+ inputOutput.Input.Add(new Tuple<string, String>("R", i.CurrentBrushStop.Red.ToString()));
+ inputOutput.Input.Add(new Tuple<string, String>("G", i.CurrentBrushStop.Green.ToString()));
+ inputOutput.Input.Add(new Tuple<string, String>("B", i.CurrentBrushStop.Blue.ToString()));
+ break;
+ case BL.Enumerations.ColorSpaces.LAB:
+ inputOutput.Input.Add(new Tuple<string, String>("L", i.CurrentBrushStop.L.ToString("0.00")));
+ inputOutput.Input.Add(new Tuple<string, String>("A", i.CurrentBrushStop.A.ToString("0.00")));
+ inputOutput.Input.Add(new Tuple<string, String>("B", i.CurrentBrushStop.B.ToString("0.00")));
+ break;
+ case BL.Enumerations.ColorSpaces.Catalog:
+ inputOutput.Input.Add(new Tuple<string, String>("Catalog", i.CurrentBrushStop.ColorCatalog.Name));
+ inputOutput.Input.Add(new Tuple<string, String>("Color", i.CurrentBrushStop.ColorCatalogsItem.Name));
+ break;
+ default:
+ break;
+ }
+
+ try
+ {
+ inputOutput.Output.Add(new Tuple<string, string>("C", i.CyanOutput.ToString()));
+ inputOutput.Output.Add(new Tuple<string, string>("LC", i.LightCyanOutput.ToString()));
+ inputOutput.Output.Add(new Tuple<string, string>("M", i.MagentaOutput.ToString()));
+ inputOutput.Output.Add(new Tuple<string, string>("LM", i.LightMagentaOutput.ToString()));
+ inputOutput.Output.Add(new Tuple<string, string>("Y", i.YellowOutput.ToString()));
+ inputOutput.Output.Add(new Tuple<string, string>("LY", i.LightYellowOutput.ToString()));
+ inputOutput.Output.Add(new Tuple<string, string>("K", i.BlackOutput.ToString()));
+ }
+ catch
+ {
+ inputOutput.Output.Add(new Tuple<string, string>("C", "N/A"));
+ inputOutput.Output.Add(new Tuple<string, string>("LC", "N/A"));
+ inputOutput.Output.Add(new Tuple<string, string>("M", "N/A"));
+ inputOutput.Output.Add(new Tuple<string, string>("LM", "N/A"));
+ inputOutput.Output.Add(new Tuple<string, string>("Y", "N/A"));
+ inputOutput.Output.Add(new Tuple<string, string>("LY", "N/A"));
+ inputOutput.Output.Add(new Tuple<string, string>("K", "N/A"));
+ }
+ }
+ }
+
+ return inputOutput;
+ }
+
private RemoteJobProgress GetJobProgress(JobHandler handler)
{
RemoteJobStage stage = RemoteJobStage.Running;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/IRemoteJobInputOutputProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/IRemoteJobInputOutputProvider.cs
new file mode 100644
index 000000000..cc98bd419
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJob/IRemoteJobInputOutputProvider.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+
+namespace Tango.PPC.Common.RemoteJob
+{
+ public interface IRemoteJobInputOutputProvider
+ {
+ BrushStop CurrentBrushStop { get; }
+
+ double CyanOutput { get; }
+ double MagentaOutput { get; }
+ double YellowOutput { get; }
+ double BlackOutput { get; }
+ double LightCyanOutput { get; }
+ double LightMagentaOutput { get; }
+ double LightYellowOutput { get; }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
index 28cbfa6bc..08ad6ec1c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
@@ -221,6 +221,7 @@
<Compile Include="RemoteJobUpload\IRemoteJobUploadService.cs" />
<Compile Include="RemoteJobUpload\RemoteJobReceivedEventArgs.cs" />
<Compile Include="RemoteJob\DefaultRemoteJobService.cs" />
+ <Compile Include="RemoteJob\IRemoteJobInputOutputProvider.cs" />
<Compile Include="RemoteJob\IRemoteJobService.cs" />
<Compile Include="RemoteActions\IRemoteActionsService.cs" />
<Compile Include="RemoteNotifications\DefaultRemoteNotificationsService.cs" />
@@ -642,7 +643,7 @@
</Target>
<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/Tango.PPC.Shared/Jobs/RemoteJobInputOutput.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobInputOutput.cs
new file mode 100644
index 000000000..e6c39a024
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobInputOutput.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Enumerations;
+
+namespace Tango.PPC.Shared.Jobs
+{
+ public class RemoteJobInputOutput
+ {
+ public ColorSpaces ColorSpace { get; set; }
+ public List<Tuple<String, String>> Input { get; set; }
+ public List<Tuple<String, String>> Output { get; set; }
+
+ public RemoteJobInputOutput()
+ {
+ Input = new List<Tuple<string, String>>();
+ Output = new List<Tuple<string, String>>();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobProgress.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobProgress.cs
index d91d612d1..d3adc7ecb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobProgress.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobProgress.cs
@@ -12,10 +12,12 @@ namespace Tango.PPC.Shared.Jobs
{
public RemoteJobStage Stage { get; set; }
public JobStatus JobStatus { get; set; }
+ public RemoteJobInputOutput InputOutput { get; set; }
public RemoteJobProgress()
{
JobStatus = new JobStatus();
+ InputOutput = new RemoteJobInputOutput();
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobUpdateResponse.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobUpdateResponse.cs
index 0bb32d266..28ff50622 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobUpdateResponse.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Jobs/RemoteJobUpdateResponse.cs
@@ -11,6 +11,7 @@ namespace Tango.PPC.Shared.Jobs
public class RemoteJobUpdateResponse
{
public JobDTO Job { get; set; }
+ public String RmlName { get; set; }
public ProcessParametersTableDTO ProcessParameters { get; set; }
public RemoteJobProgress Progress { get; set; }
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj
index 3f7bc0cbe..6b4e448f7 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj
@@ -75,6 +75,7 @@
<Compile Include="Insights\InsightsMinDateResponse.cs" />
<Compile Include="Insights\InsightsRequest.cs" />
<Compile Include="Insights\InsightsResponse.cs" />
+ <Compile Include="Jobs\RemoteJobInputOutput.cs" />
<Compile Include="Jobs\RemoteJobProgress.cs" />
<Compile Include="Jobs\RemoteJobStage.cs" />
<Compile Include="Jobs\RemoteJobUpdateRequest.cs" />
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
index 92c527134..4a67f204c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
@@ -73,7 +73,7 @@ namespace Tango.PPC.UI
viewBox.Child = new Views.MainEurekaView();
var screens = System.Windows.Forms.Screen.AllScreens;
- var touch_screen = screens.Last();
+ var touch_screen = screens.OrderBy(x => x.Bounds.X).Last();
bool hasTouch = TouchHelper.IsTouchEnabled() || settings.ForceTouchMode;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
index 937a76f94..8507d1e39 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
@@ -30,10 +30,11 @@ using System.Windows.Media;
using Tango.PPC.Common.Resume;
using Tango.Core.ExtensionMethods;
using Tango.PPC.Common.Printing;
+using Tango.PPC.Common.RemoteJob;
namespace Tango.PPC.UI.ViewModels
{
- public class MachineStatusViewVM : PPCViewModel
+ public class MachineStatusViewVM : PPCViewModel, IRemoteJobInputOutputProvider
{
public enum StatisticTab
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>