aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-30 14:53:18 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-30 14:53:18 +0300
commited58cf7cef3ff2df02a535df5f45bb51369d338e (patch)
tree5b719b15c208462b1c855ff48c5d11c11ce0bfc6 /Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels
parent19c3ce7f77cd4a78c5438db2d4385e5daaad4624 (diff)
downloadTango-ed58cf7cef3ff2df02a535df5f45bb51369d338e.tar.gz
Tango-ed58cf7cef3ff2df02a535df5f45bb51369d338e.zip
Add new job.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs1
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs56
2 files changed, 34 insertions, 23 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
index 6227610e4..a02005776 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
@@ -1536,6 +1536,7 @@ namespace Tango.PPC.Jobs.ViewModels
Job.ColorSpace = colorSpaces.FirstOrDefault();
Job.Version = 2;
+ Job.Name = JobModel.Name;
Job.NumberOfUnits = JobModel.NumberOfUnits;
Job.EnableInterSegment = JobModel.InterSegmentLength > 0;
Job.InterSegmentLength = JobModel.InterSegmentLength;
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 ebc396a39..fa78430bd 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
@@ -433,37 +433,47 @@ namespace Tango.PPC.Jobs.ViewModels
await Task.Delay(200);
}
var selectedRmlGuid = Settings.DefaultRmlGuid;
- JobCreationViewVM vm = new JobCreationViewVM(_spoolTypes.ToList(), _rmls.ToList(), selectedRmlGuid, 0, false);
-
- var selectedSpoolTypeGuid = Settings.SpoolTypeGuid;
- vm.SelectedSpoolType = false == String.IsNullOrEmpty(selectedSpoolTypeGuid) ? _spoolTypes.FirstOrDefault(x => x.Guid == selectedSpoolTypeGuid) : _spoolTypes.FirstOrDefault(x => x.Type == SpoolTypes.StandardSpool);
- if (twnFile == null)
- {
- vm = await NotificationProvider.ShowDialog<JobCreationViewVM>(vm);
- if (!vm.DialogResult) return;
-
- if (vm.SelectedRML != null)
- {
- selectedRmlGuid = vm.SelectedRML.Guid;
- }
- if (vm.SelectedSpoolType != null)
- {
- selectedSpoolTypeGuid = vm.SelectedSpoolType.Guid;
- }
-
- }
-
Job job = new Job();
job.LastUpdated = DateTime.UtcNow;
job.JobSource = JobSource.Local;
- job.Name = vm.JobName;
job.NumberOfHeads = 1;
job.NumberOfUnits = 1;
job.SampleUnitsOrMeters = 1;
job.CreationDate = DateTime.UtcNow;
job.JobStatus = JobStatuses.Draft;
- job.EnableInterSegment = vm.WhiteGap > 0;
- job.InterSegmentLength = vm.WhiteGap;
+
+ var selectedSpoolTypeGuid = Settings.SpoolTypeGuid;
+
+ if (BuildProvider.IsEureka)
+ {
+ job.Name = "Unnamed";
+ job.EnableInterSegment = false;
+ job.InterSegmentLength = 0;
+ }
+ else
+ {
+ JobCreationViewVM vm = new JobCreationViewVM(_spoolTypes.ToList(), _rmls.ToList(), selectedRmlGuid, 0, false);
+ vm.SelectedSpoolType = false == String.IsNullOrEmpty(selectedSpoolTypeGuid) ? _spoolTypes.FirstOrDefault(x => x.Guid == selectedSpoolTypeGuid) : _spoolTypes.FirstOrDefault(x => x.Type == SpoolTypes.StandardSpool);
+ if (twnFile == null)
+ {
+ vm = await NotificationProvider.ShowDialog<JobCreationViewVM>(vm);
+ if (!vm.DialogResult)
+ return;
+
+ if (vm.SelectedRML != null)
+ {
+ selectedRmlGuid = vm.SelectedRML.Guid;
+ }
+ if (vm.SelectedSpoolType != null)
+ {
+ selectedSpoolTypeGuid = vm.SelectedSpoolType.Guid;
+ }
+ job.Name = vm.JobName;
+ job.EnableInterSegment = vm.WhiteGap > 0;
+ job.InterSegmentLength = vm.WhiteGap;
+ }
+ }
+
//job.JobType = vm.SelectedJobType;
job.EnableLubrication = true;
//job.ColorSpaceGuid = Adapter.ColorSpaces.FirstOrDefault(x => x.Code == vm.SelectedColorSpace.ToInt32()).Guid;