示例#1
0
        public static void Init()
        {
            Event CurrentEvent = new Event();
            CurrentEvent.StartTime = new DateTime(2013, 2, 22, 18, 0, 0);
            CurrentEvent.EndTime = new DateTime(2013, 2, 22, 19, 30, 0);
            CurrentEvent.Name = "Do the dishes";
            CurrentEvent.Priority = Priority.ASAP;
            CurrentEvent.Info = "You've procrastinated for much too long, it's time to give those dishes a proper cleaning!";
            ListOfEvents.Add(CurrentEvent);

            Event NextEvent = new Event();
            NextEvent.StartTime = new DateTime(2013, 2, 23, 12, 0, 0);
            NextEvent.EndTime = new DateTime(2013, 2, 23, 13, 0, 0);
            NextEvent.Name = "Go to the gym";
            NextEvent.Priority = Priority.LAZY;
            NextEvent.Info = "Gotta work on those biceps and femurs, if you want to be on the defensive line next season!";
            ListOfEvents.Add(NextEvent);

            Event ThirdEvent = new Event();
            ThirdEvent.StartTime = new DateTime(2013, 2, 25, 16, 0, 0);
            ThirdEvent.EndTime = new DateTime(2013, 2, 25, 18, 0, 0);
            ThirdEvent.Name = "That project ain't going to do itself 1/3";
            ThirdEvent.Priority = Priority.DL;
            ThirdEvent.Info = "Need to finish that customer project by the end of february!";
            ListOfEvents.Add(ThirdEvent);

            Event FourthEvent = new Event();
            FourthEvent.StartTime = new DateTime(2013, 2, 26, 14, 0, 0);
            FourthEvent.EndTime = new DateTime(2013, 2, 26, 16, 0, 0);
            FourthEvent.Name = "That project ain't going to do itself 2/3";
            FourthEvent.Priority = Priority.DL;
            FourthEvent.Info = "Need to finish that customer project by the end of february!";
            ListOfEvents.Add(FourthEvent);

            Event FifthEvent = new Event();
            FifthEvent.StartTime = new DateTime(2013, 2, 28, 15, 0, 0);
            FifthEvent.EndTime = new DateTime(2013, 2, 28, 17, 0, 0);
            FifthEvent.Name = "That project ain't going to do itself 3/3";
            FifthEvent.Priority = Priority.DL;
            FifthEvent.Info = "Need to finish that customer project by the end of february!";
            ListOfEvents.Add(FifthEvent);
        }
示例#2
0
        void TestTimeList()
        {
            List<Event> ListOfEvents = new List<Event>();
            Event Event1 = new Event();
            Event Event2 = new Event();
            Event1.Name = "Tiskaus";
            Event2.Name = "Sali";
            Event1.StartTime = new DateTime(2013, 3, 12, 11, 0, 0);
            Event1.EndTime = new DateTime(2013, 3, 12, 12, 0, 0);
            Event2.StartTime = new DateTime(2013, 3, 12, 14, 0, 0);
            Event2.EndTime = new DateTime(2013, 3, 12, 14, 30, 0);

            ListOfEvents.Add(Event1);
            ListOfEvents.Add(Event2);

            TimeList ListOfTimes = new TimeList(ListOfEvents);

            Debug.WriteLine(ListOfTimes.GetTimeIndex(60));
            Debug.WriteLine(ListOfTimes.GetTimeIndex(90));
            Debug.WriteLine(ListOfTimes.GetTimeIndex(75));
        }
示例#3
0
 private void TestEventContent(Event testEvent)
 {
     Debug.WriteLine("'" + testEvent.Name + "'");
     Debug.WriteLine(testEvent.StartTime);
     Debug.WriteLine(testEvent.EndTime);
 }