private void addToFavoritesToolStripMenuItem_Click(object sender, EventArgs e) { AddFavorites dlg = new AddFavorites(historyTreeView.SelectedNode.Text); DialogResult res = dlg.ShowDialog(); if (res == DialogResult.OK) { if (dlg.favFile == "Favorites") addFavorit(getCurrentBrowser().Url.ToString(), dlg.favName); else addLink(getCurrentBrowser().Url.ToString(), dlg.favName); deleteHistory(); } dlg.Close(); }
private void MenuItem_Favorite_Add_Click(object sender, EventArgs e) { if (getCurrentBrowser().Url != null) { AddFavorites dlg = new AddFavorites(getCurrentBrowser().Url.ToString()); DialogResult res = dlg.ShowDialog(); if (res == DialogResult.OK) { if (dlg.favFile == "Favorites") addFavorit(getCurrentBrowser().Url.ToString(), dlg.favName); else addLink(getCurrentBrowser().Url.ToString(), dlg.favName); } dlg.Close(); } }