/// <summary> /// Returns the next site and adds the current site to the /// previous sites stack. /// </summary> /// <param name="currentSite">The current site of the browser</param> /// <returns>Last visited site before pressing "Previous"</returns> public string ReturnNextSite(string currentSite) { string nextSite = NextSites.Pop(); PreviousSites.Push(currentSite); return(nextSite); }
/// <summary> /// Add a site to the URL list as well as the previous sites stack. /// </summary> /// <param name="url">Site to be added</param> public void AddNewSite(string url) { AddSiteToList(url); PreviousSites.Push(url); }