예제 #1
0
        void Refresh()
        {
            var foo = MyTaskService.GetAllTask();

            foreach (var item in foo)
            {
                MyTasks.Add(item);
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            MyTasks myTasks = new MyTasks();
            Task    t1      = new Task("Read Troelsen", "almost finished but still have to read");
            Task    t2      = new Task("Set up VPN", "my rasbperry pi needs to be used all the way");
            Task    t3      = new Task("Neural Network", "complete the book you're reading");
            Task    t4      = new Task("Sleep well", "complete the book you're reading");
            Task    t5      = new Task("Dance", "complete the book you're reading");


            myTasks.Add(t1);
            myTasks.Add(t2);
            myTasks.Add(t3);

            myTasks.PrintAll();

            myTasks.Sort();

            Console.WriteLine("*** Done! ***");
            myTasks.PrintAll();
            Console.ReadLine();
        }