Projekt

Obecné

Profil

Stáhnout (2.99 KB) Statistiky
| Větev: | Tag: | Revize:
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
    /// <author>Alex Konig</author>
24
    class LogInInstance
25
    {
26
        /// <summary> Date time </summary>
27
        // index 0
28
        public DateTime date;
29
        /// <summary> Number of events </summary>
30
        // index 1
31
        public int amount;
32
        // index 2
33
        public int lesson;
34
        /// <summary> Time of the start of the lesson </summary>
35
        // index 3
36
        public DateTime lessonStart;
37
        /// <summary> Time of the endof the lesson </summary>
38
        // index 4
39
        public DateTime lessonEnd;
40
        /// <summary> Building tag </summary>
41
        // index 5
42
        public string building;
43
        /// <summary> Room type </summary>
44
        // index 6
45
        public string roomType;
46
        /// <summary> Room number </summary>
47
        // index 7
48
        public string room;
49
        /// <summary> PC hostname </summary>
50
        // index 8
51
        public string hostname;
52

    
53
        /// <summary>
54
        /// Constructor
55
        /// </summary>
56
        /// <param name="date"></param>
57
        /// <param name="amount"></param>
58
        /// <param name="lesson"></param>
59
        /// <param name="lessonStart"></param>
60
        /// <param name="lessonEnd"></param>
61
        /// <param name="building"></param>
62
        /// <param name="roomtType"></param>
63
        /// <param name="room"></param>
64
        /// <param name="hostname"></param>
65
        public LogInInstance(DateTime date, int amount, int lesson, DateTime lessonStart, DateTime lessonEnd, string building, string roomtType, string room, string hostname)
66
        {
67
            this.date = date;
68
            this.amount = amount;
69
            this.lesson = lesson;
70
            this.lessonStart = lessonStart;
71
            this.lessonEnd = lessonEnd;
72
            this.building = building;
73
            this.roomType = roomtType;
74
            this.room = room;
75
            this.hostname = hostname;
76
        }
77

    
78
        /// <summary>
79
        /// To string
80
        /// </summary>
81
        /// <returns></returns>
82
        public override string ToString()
83
        {
84
            return date + " " + room + " " + lessonStart + "-" + lessonEnd + " " + amount;
85
        }
86
    }
87
}
(4-4/5)