-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntry.cs
More file actions
72 lines (62 loc) · 1.79 KB
/
Entry.cs
File metadata and controls
72 lines (62 loc) · 1.79 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Timer
{
public class Entry
{
private Evenement evenement;
private Int32 stopwatch;
private Int32 number;
private Int64 msec;
public Entry(Evenement evenement, Int32 stopwatch, Int32 number, Int64 msec)
{
this.evenement = evenement;
this.stopwatch = stopwatch;
this.number = number;
this.msec = msec;
}
public String NumberString
{
get { return this.number.ToString("D"); }
set { this.number = Int32.Parse(value); }
}
public String Msec
{
get
{
int fms = (int)(this.msec / 10);
int hun = fms % 100;
fms = (fms - hun) / 100;
int sec = fms % 60;
fms = (fms - sec) / 60;
int min = fms;
return min.ToString("D2") + ":" + sec.ToString("D2") + "." + hun.ToString("D2");
}
}
public String Name
{
get { Driver p = evenement.FindDriver(this.number); if (p != null) return p.Name; else return null; }
}
public String Vehicle
{
get { Driver p = evenement.FindDriver(this.number); if(p != null) return p.Vehicle; else return null; }
}
public Int32 Stopwatch
{
get { return this.stopwatch; }
set { this.stopwatch = value; }
}
public Int64 Value
{
get { return this.msec; }
set { this.msec = value; }
}
public Int32 Number
{
get { return this.number; }
set { this.number = value; }
}
}
}