예제 #1
0
 public static void Remove(Task task)
 {
     try
     {
         for (int x = 0; x < taskList.Count; x++)
             if (taskList[x].ID == task.ID)
             {
                 taskList.RemoveAt(x);
                 AccessXML xml = new AccessXML();
                 xml.Save(taskList);
                 break;
             }
     }
     catch { }
 }
예제 #2
0
파일: Task.cs 프로젝트: Ceasius/University
 public Task Clone()
 {
     Task clone = new Task(this.Date, this.EndTime, this.StartTime, this.Location, this.Name, this.Description, this.Important);
     return clone;
 }
예제 #3
0
        static public void EditTemp()
        {
            if (SelectedPos != -1)
                taskList[SelectedPos] = TempTask;
            else return;
            SelectedPos = -1;
            TempTask = new Task();
            InsertionSort();

            AccessXML xml = new AccessXML();
            xml.Save(taskList);
        }
예제 #4
0
        private static void  DummyValues()
        {
            Random r = new Random(303);
            for (int x = 0; x < 10; x++)
            {
                int random;
                String name = "Task"+x.ToString();
                String description = "Description" + x.ToString();
                String location = "Location" + x.ToString();
                Boolean important = (r.Next(2)==1);
                random = r.Next(10);
                String startTime = "1" + random.ToString() + ":00";
                String endTime = "1" + random.ToString() + ":15";
                random = r.Next(29)+1;
                DateTime dt = new DateTime(2011, 5, random);
                Task cur = new Task(dt, endTime, startTime, location, name, description, important);

                taskList.Add(cur);
            }
            InsertionSort();
        }