Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FavoriteForm favoriteForm = new FavoriteForm();

            if (favoriteForm.ShowDialog() == DialogResult.OK)
            {
                Favorite favorite = favoriteForm.Favorite;
                FavoriteManager.FavoritesManager.Favorites.Add(favorite);
                FavoriteManager.Save();
                Render();
            }
        }
Ejemplo n.º 2
0
        private void AddPageToFavorites()
        {
            FavoriteForm favoriteForm = new FavoriteForm()
            {
                Url   = AddressBar.Text, // TODO bind it to web browsers url
                Title = CurrentTitle     // TODO bind to text
            };

            if (favoriteForm.ShowDialog() == DialogResult.OK)
            {
                Favorite favorite = favoriteForm.Favorite;
                FavoriteManager.FavoritesManager.Favorites.Add(favorite);
                SaveFavorites();
                RenderFavoriteMenus();
            }
        }