Ejemplo n.º 1
0
        private void button18_Click(object sender, EventArgs e)
        {
            comboBox2.Text = String.IsNullOrEmpty(comboBox2.Text) ? "1" : comboBox2.Text;



            if (Until.Value.Subtract(Since.Value).Days < Convert.ToInt32(comboBox2.Text))
            {
                MessageBox.Show("Number of threads cannot be more than number of days selected for your query");
            }
            else if (String.IsNullOrEmpty(SaveToFolder))
            {
                MessageBox.Show("Please select a folder to save all files.");
                button20.PerformClick();
            }
            else if (comboBox1.SelectedIndex == -1)
            {
                MessageBox.Show("Please select type of file you want to save. The list is above Save folder button.");
            }
            else
            {
                PrepareQuery();

                FileType ft = comboBox1.SelectedIndex == 0 ? FileType.Json : FileType.CSV;

                ScraperWindow f = new ScraperWindow(Convert.ToInt32(comboBox2.Text), this.Query, SaveToFolder, ft);

                f.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void button18_Click(object sender, EventArgs e)
        {
            comboBox2.Text = String.IsNullOrEmpty(comboBox2.Text) ? "1" : comboBox2.Text;



            if (Until.Value.Subtract(Since.Value).Days < Convert.ToInt32(comboBox2.Text))
            {
                MessageBox.Show("Number of threads cannot be more than number of days selected for your query");
            }
            if (String.IsNullOrEmpty(SaveToFolder))
            {
                MessageBox.Show("Please select a folder to save all files.");
                button20.PerformClick();
            }
            else
            {
                PrepareQuery();
                ScraperWindow f = new ScraperWindow(Convert.ToInt32(comboBox2.Text), this.Query, SaveToFolder);

                f.ShowDialog();
            }
        }