Ejemplo n.º 1
0
        public Menu()
        {
            List <Contact> contacts;

            if (Program.UsePersistance)
            {
                contacts = Persist.ReadContacts();
                manager  = new Manager(contacts);
            }
            else
            {
                contacts = new List <Contact>();
                manager  = new Manager(contacts);
            }
            tasks = new Tasks(manager);
        }
Ejemplo n.º 2
0
        public Menu()
        {
            List <Contact> contacts;

            // If persistence is enabled, get the user's contacts from a save file.
            if (Program.UsePersistance)
            {
                contacts = Persist.ReadContacts();
                manager  = new Manager(contacts);
            }

            // If persistence is not enabled, don't load the user's contacts from a save file. (start fresh)
            else
            {
                contacts = new List <Contact>();
                manager  = new Manager(contacts);
            }
            tasks = new Tasks(manager);
        }