Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Diagnostics;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WinForms_GoogleSearch
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- string input = textBox1.Text;
- string output = input.Replace(' ', '+');
- string output2 = input.Replace('#', "%23");
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (comboBox1.SelectedIndex == 0)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text);
- }
- if (comboBox1.SelectedIndex == 1)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text +" site:"+ comboBox1.Text);
- }
- if (comboBox1.SelectedIndex == 2)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text + " site:" + comboBox1.Text);
- }
- if (comboBox1.SelectedIndex == 3)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text + " site:" + comboBox1.Text);
- }
- if (comboBox1.SelectedIndex == 4)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text + " site:" + comboBox1.Text);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment