1
|
using System;
|
2
|
|
3
|
namespace ServerApp.Parser.InputData
|
4
|
{
|
5
|
|
6
|
/// <summary>
|
7
|
/// Data from login data file
|
8
|
///
|
9
|
/// Data contains:
|
10
|
/// datum - date of access
|
11
|
/// budova - building tag
|
12
|
/// hodina_zacatek - start of lecture
|
13
|
/// hodina_konec - end of lecture
|
14
|
/// pocet_prihlaseni - number of successfull sign-ins to given computer in given lecture
|
15
|
/// stroj_hostname - name of specific computer
|
16
|
/// typ_objektu - type of object (classroom, laboratory, lecture room, other)
|
17
|
/// ucebna_nazev - specific name of room
|
18
|
/// vyucovaci_hodina - number of lecture(according to the timetable)
|
19
|
/// Csv format:
|
20
|
/// "27.10.2011 00:00:00";1;7;"13:00";"13:45";"UI";"Laboratoř";"UI-505";"ui505av07-lps"
|
21
|
/// [datum];[amount];[lesson];[lesson start];[lesson end];[building];[room type];[room];[hostname]
|
22
|
/// </summary>
|
23
|
class LogInInstance
|
24
|
{
|
25
|
/// <summary> Date time </summary>
|
26
|
// index 0
|
27
|
public DateTime date;
|
28
|
/// <summary> Number of events </summary>
|
29
|
// index 1
|
30
|
public int amount;
|
31
|
// index 2
|
32
|
public int lesson;
|
33
|
/// <summary> Time of the start of the lesson </summary>
|
34
|
// index 3
|
35
|
public DateTime lessonStart;
|
36
|
/// <summary> Time of the endof the lesson </summary>
|
37
|
// index 4
|
38
|
public DateTime lessonEnd;
|
39
|
/// <summary> Building tag </summary>
|
40
|
// index 5
|
41
|
public string building;
|
42
|
/// <summary> Room type </summary>
|
43
|
// index 6
|
44
|
public string roomType;
|
45
|
/// <summary> Room number </summary>
|
46
|
// index 7
|
47
|
public string room;
|
48
|
/// <summary> PC hostname </summary>
|
49
|
// index 8
|
50
|
public string hostname;
|
51
|
|
52
|
/// <summary>
|
53
|
/// Constructor
|
54
|
/// </summary>
|
55
|
/// <param name="date"></param>
|
56
|
/// <param name="amount"></param>
|
57
|
/// <param name="lesson"></param>
|
58
|
/// <param name="lessonStart"></param>
|
59
|
/// <param name="lessonEnd"></param>
|
60
|
/// <param name="building"></param>
|
61
|
/// <param name="roomtType"></param>
|
62
|
/// <param name="room"></param>
|
63
|
/// <param name="hostname"></param>
|
64
|
public LogInInstance(DateTime date, int amount, int lesson, DateTime lessonStart, DateTime lessonEnd, string building, string roomtType, string room, string hostname)
|
65
|
{
|
66
|
this.date = date;
|
67
|
this.amount = amount;
|
68
|
this.lesson = lesson;
|
69
|
this.lessonStart = lessonStart;
|
70
|
this.lessonEnd = lessonEnd;
|
71
|
this.building = building;
|
72
|
this.roomType = roomtType;
|
73
|
this.room = room;
|
74
|
this.hostname = hostname;
|
75
|
}
|
76
|
|
77
|
/// <summary>
|
78
|
/// To string
|
79
|
/// </summary>
|
80
|
/// <returns></returns>
|
81
|
public override string ToString()
|
82
|
{
|
83
|
return date + " " + room + " " + lessonStart + "-" + lessonEnd + " " + amount;
|
84
|
}
|
85
|
}
|
86
|
}
|