blob: 86e1c7771a9b36988ebcb1aaea92b584b3551e31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.DTO;
using Tango.BL.Enumerations;
namespace Tango.PPC.Shared.Statistics
{
public class JobRunComposition
{
public JobRunDTO JobRun { get; set; }
public PresentationJob Job { get; set; }
public double Distance
{
get
{
double actualStartPosition = 0;
double actualEndPosition = 0;
actualStartPosition = JobRun.MachineType == MachineTypes.Eureka.ToInt32() ? JobRun.ActualStartPosition * 4 : JobRun.ActualStartPosition;
if (JobRun.ActualEndPosition > 0)
{
actualEndPosition = JobRun.MachineType == MachineTypes.Eureka.ToInt32() ? JobRun.ActualEndPosition * 4 : JobRun.ActualEndPosition;
}
else
{
actualEndPosition = JobRun.MachineType == MachineTypes.Eureka.ToInt32() ? JobRun.EndPosition * 4 : JobRun.EndPosition;
}
return actualEndPosition - actualStartPosition;
}
}
public JobRunComposition()
{
Job = new PresentationJob();
}
}
}
|