Пример #1
0
        private void exitBT_Click(object sender, EventArgs e)
        {
            if (RIT_Menu.favorites != null)
            {
                RIT_Menu.favorites.Clear();
            }

            foreach (Resturants rest in RIT_Menu.Rit)
            {
                if (rest.favorites)
                {
                    Favorites fav = new Favorites("ss", true);
                    RIT_Menu.Add_Favorite(fav);
                }
            }
            RIT_Menu.SaveFavs();
            this.Close();
        }
Пример #2
0
 /*****************************************************/
 /*          Loads in resturants from Json            */
 /*****************************************************/
 public void Add_Favorite(Favorites fav)
 {
     //could not add the favorites save function
     // favorites.Add(fav);
 }