Projekt

Obecné

Profil

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