Beispiel #1
0
        static void Main(string[] args)
        {
            string command = "";

            do
            {
                //Wyświetlanie menu
                TaskManager.ShowOption();

                Console.WriteLine("Podaj polecenie: ");
                command = Console.ReadLine();

                //obługa programu w runtimie
                if (command == "add")
                {
                    TaskManager.AddTask();
                }

                else if (command == "show")
                {
                    TaskManager.ShowTask();
                }

                else if (command == "save")
                {
                    TaskManager.Save();
                }
                else if (command == "load")
                {
                    TaskManager.Load();
                }
                else if (command == "clear")
                {
                    TaskManager.Clear();
                }
                else if (command == "remove")
                {
                    TaskManager.Remove();
                }
                else if (command == "sort")
                {
                    TaskManager.Sort();
                }
                else
                {
                    Console.Clear();
                    ConsoleEx.Error("Nie ma takiej komendy!");
                }
            } while (command != "exit");
        }
 private void Form1_Load(object sender, EventArgs e)
 {
     task.Load("save.xml");
     dataGridView1.DataSource = task.TasksList;
     task.ColorRows(dataGridView1, task.TasksList);
 }