-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHSector.cs
105 lines (91 loc) · 2.58 KB
/
HSector.cs
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HazeronAdviser
{
class HSector
{
// There is no sector name or ID in the HMails.
protected string _name = "-"; // Name of the sector, this can change at any time.
public string Name
{
get { return _name; }
}
protected int _id = 0; // ID of the sector.
public int ID
{
get { return _id; }
}
public string IdString
{
get { return HHelper.ToID(_id); }
}
protected string _overview = "";
public string Overview
{
get { return _overview; }
}
protected DateTime _lastUpdated = new DateTime(2000, 1, 1);
public DateTime LastUpdared
{
get { return _lastUpdated; }
}
public string LastUpdaredString
{
get
{
return LastUpdared.ToString("F", Hazeron.DateTimeFormat);
}
}
protected byte _attentionCode = 0x00; // 0b00000000
public byte AttentionCode
{
get { return _attentionCode; }
}
protected List<int> _owners = new List<int>();
public List<int> Onwers
{
get { return _owners; }
}
protected List<HSystem> _systems = new List<HSystem>();
public List<HSystem> Systems
{
get { return _systems; }
}
protected int _abandonment = 0, _abandonmentMax = 0;
public int Abandonment
{
get { return _abandonment; }
}
public int AbandonmentMax
{
get { return _abandonmentMax; }
}
protected string _abandonmentColumn = "-";
public string AbandonmentColumn
{
get { return _abandonmentColumn; }
}
protected bool _initialized = false;
public bool Initialized
{
get { return _initialized; }
}
public HSector(HSystem system)
{
//_name = system.SectorName; // Incase sector changed name.
_id = system.SectorID;
AddSystem(system);
}
public void AddSystem(HSystem system)
{
_systems.Add(system);
if (DateTime.Compare(system.LastUpdared, _lastUpdated) == 1)
_lastUpdated = system.LastUpdared;
foreach (int owner in system.Onwers)
if (!_owners.Contains(owner))
_owners.Add(owner);
}
}
}