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