Projekt

Obecné

Profil

Stáhnout (2.96 KB) Statistiky
| Větev: | Tag: | Revize:
1 5d9a5bd9 A-Konig
using System;
2
3 734533a8 A-Konig
namespace ServerApp.Parser.InputData
4 5d9a5bd9 A-Konig
{
5
6
    /// <summary>
7 734533a8 A-Konig
    /// Data from login data file
8 5d9a5bd9 A-Konig
    /// 
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 734533a8 A-Konig
        /// <summary> Date time </summary>
26 5d9a5bd9 A-Konig
        // index 0
27
        public DateTime date;
28 734533a8 A-Konig
        /// <summary> Number of events </summary>
29 5d9a5bd9 A-Konig
        // index 1
30
        public int amount;
31
        // index 2
32
        public int lesson;
33 734533a8 A-Konig
        /// <summary> Time of the start of the lesson </summary>
34 5d9a5bd9 A-Konig
        // index 3
35
        public DateTime lessonStart;
36 734533a8 A-Konig
        /// <summary> Time of the endof the lesson </summary>
37 5d9a5bd9 A-Konig
        // index 4
38
        public DateTime lessonEnd;
39 734533a8 A-Konig
        /// <summary> Building tag </summary>
40 5d9a5bd9 A-Konig
        // index 5
41
        public string building;
42 734533a8 A-Konig
        /// <summary> Room type </summary>
43 5d9a5bd9 A-Konig
        // index 6
44
        public string roomType;
45 734533a8 A-Konig
        /// <summary> Room number </summary>
46 5d9a5bd9 A-Konig
        // index 7
47
        public string room;
48 734533a8 A-Konig
        /// <summary> PC hostname </summary>
49 5d9a5bd9 A-Konig
        // index 8
50
        public string hostname;
51
52 734533a8 A-Konig
        /// <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 5d9a5bd9 A-Konig
        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 734533a8 A-Konig
        /// <summary>
78
        /// To string
79
        /// </summary>
80
        /// <returns></returns>
81 5d9a5bd9 A-Konig
        public override string ToString()
82
        {
83
            return date + " " + room + " " + lessonStart + "-" + lessonEnd + " " + amount;
84
        }
85
    }
86
}