private void LoadURL(string url) { Uri outUri; string newUrl = url; string urlLower = url.Trim().ToLower(); // UI SetTabTitle(CurBrowser, "Loading..."); // load page if (urlLower == "localhost") { newUrl = "http://localhost/"; } else if (url.CheckIfFilePath() || url.CheckIfFilePath2()) { newUrl = url.PathToURL(); } else { Uri.TryCreate(url, UriKind.Absolute, out outUri); if (!(urlLower.StartsWith("http") || urlLower.StartsWith("sharpbrowser"))) { if (outUri == null || outUri.Scheme != Uri.UriSchemeFile) { newUrl = "http://" + url; } } if (urlLower.StartsWith("sharpbrowser:") || // load URL if it seems valid (Uri.TryCreate(newUrl, UriKind.Absolute, out outUri) && ((outUri.Scheme == Uri.UriSchemeHttp || outUri.Scheme == Uri.UriSchemeHttps) && newUrl.Contains(".") || outUri.Scheme == Uri.UriSchemeFile))) { } else { // run search if unknown URL newUrl = SearchURL + HttpUtility.UrlEncode(url); } } // load URL CurBrowser.Load(newUrl); // set URL in UI SetFormURL(newUrl); // always enable back btn EnableBackButton(true); EnableForwardButton(false); }
private void LoadURL(string url) { Uri outUri; string newUrl = url; string urlLower = url.Trim().ToLower(); // UI SetTabTitle(CurBrowser, "Loading..."); // load page if (urlLower == "localhost") { newUrl = "about:blank"; } else if (url.CheckIfFilePath() || url.CheckIfFilePath2()) { newUrl = url.PathToURL(); } else { Uri.TryCreate(url, UriKind.Absolute, out outUri); if (!(urlLower.StartsWith("http") || urlLower.StartsWith("sharpbrowser"))) { if (outUri == null || outUri.Scheme != Uri.UriSchemeFile) { newUrl = "http://" + url; } } } // load URL CurBrowser.Load(newUrl); // set URL in UI SetFormURL(newUrl); }
private void citationGeneratorToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("https://www.citefast.com/"); }
private void googleSlidesToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("https://www.google.com/intl/en-GB/slides/about/"); }
private void canvaToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://canva.com"); }
private void facebookToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.facebook.com"); }
private void whatsappWebToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://web.whatsapp.com"); }
private void edxToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.edx.org"); }
private void googleClassroomToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://classroom.google.com"); }
private void foxNewsToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://www.foxnews.com"); }
private void timesOfIsraelToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://www.timesofisrael.com"); }
private void jerusalemPostToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://www.jpost.com"); }
private void gulfTimesQatarToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.gulf-times.com/"); }
private void gitHubToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.github.com"); }
private void collegeBoardToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("https://www.collegeboard.org/"); }
private void toolStripStatusLabel1_Click_1(object sender, EventArgs e) { CurBrowser.Load(AdulteryURL); }
private void khanAcademyToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://khanacademy.org"); }
private void alJazeeraToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://www.aljazeera.com"); }
private void codecademyToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://www.codecademy.com"); }
private void googleDriveToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://drive.google.com"); }
private void grammarlyToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.grammarly.com"); }
private void googleFormsToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("https://www.google.com/forms/about/"); }
private void instagramToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.instagram.com"); }
private void BtnHome_Click(object sender, EventArgs e) { CurBrowser.Load(HomepageURL); }
private void twitterToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.twitter.com"); }
private void russiaTodayToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://www.rt.com"); }
private void preziToolStripMenuItem_Click_1(object sender, EventArgs e) { CurBrowser.Load("http://www.prezi.com"); }
private void googleDocsToolStripMenuItem_Click(object sender, EventArgs e) { CurBrowser.Load("http://docs.google.com"); }
public void RefreshActiveTab() { CurBrowser.Load(CurBrowser.Address); }
private void weeblyToolStripMenuItem_Click_2(object sender, EventArgs e) { CurBrowser.Load("http://www.weebly.com"); }