Example #1
0
        public bool canHost(Event e) {
		    if (e.StudentNumber <= Capacity && e.getCType() == Type /*&& e.getCourse().needsProjector() <= Projector*/)
			    return true;
		    return false;
		
	    }
Example #2
0
 public void setEvent(int i, int j, Event e)
 {
     for (int k = 0; k < e.Duration; k++)
         week[i, j + k]++;
 }
Example #3
0
        public void populateEventList(string s)
        {
            StreamReader myFile = new StreamReader(s);
            string myString = myFile.ReadToEnd();

            string[] linije = Regex.Split(myString, "\r\n");
            int ID = 1;
            foreach (string linija in linije)
            {

                string[] info = linija.Split(' ');
                int brKolegija = info.Length - 4;
                List<string> grupe = new List<string>();
                for (int i = 0; i < brKolegija; i++)
                {
                    grupe.Add(info[4 + i]);
                }

                int sNo = 0;
                foreach (string g in grupe)
                {
                    sNo += findGroup(g).getSize();
                }

                Course tmpCourse = findCourse(info[0]);

                Event tmp = new Event(tmpCourse, grupe, Convert.ToInt32(info[1]), ID, Convert.ToInt32(info[2]), Convert.ToInt32(info[3]), sNo);
                ID++;
                EventList.Add(tmp);
                //Console.Write(info[1]);
            }
            myFile.Close();
            //UnasignedEvents = EventList;
            foreach (Event f in EventList)
                UnasignedEvents.Add(f);
        }