private void searchBtn_Click(object sender, EventArgs e) { //when search button is pressed if (searchTxt.Text.Trim() != "" || categoryBox.SelectedIndex != 0) { tabControl.SelectedIndex = 0; homeBtn.Text = "End Search"; string query = ""; string category = ""; //get screenshot string string screenshots = new RegStoreClass().sValue; //get query if (searchTxt.Text.Trim() != "") { query = searchTxt.Text; } //get selected category switch (categoryBox.SelectedIndex) { case 1: category = "app"; break; case 2: category = "game"; break; case 3: category = "driver"; break; } //search browser.Navigate(new Uri("http://surfers-side.ppcplanet.org/posts.php?q=" + query + "^^" + category + screenshots)); } else { MessageBox.Show("Invalid search query.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); } }
public MainForm() { InitializeComponent(); //set up a few things categoryBox.SelectedIndex = 0; browser.Show(); browser.BringToFront(); //remember screenshots setting string value = new RegStoreClass().sValue; if (value != "^$") { scToggle.Checked = false; } //load posts.php page browser.Navigate(new Uri("http://surfers-side.ppcplanet.org/posts.php?q=^^^" + value)); }
private void homeBtn_Click(object sender, EventArgs e) { //go home switch (homeBtn.Text) { case "Home": tabControl.SelectedIndex = 0; break; case "Refresh": //remember screenshots setting string value = new RegStoreClass().sValue; browser.Navigate(new Uri("http://surfers-side.ppcplanet.org/posts.php?q=^^^" + value)); break; case "Back": browser.GoBack(); break; } }