Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if ((comboBox8.Text == "0") && (comboBox11.Text == "0"))
                MessageBox.Show("Both Boxes are zero.");

            else
            {

                Read dataext = new Read();
                dataext.read_subdirectories(textBox1.Text);
                dataext.read_directory_extended(textBox1.Text, textBox2.Text, comboBox1.Text, comboBox8.Text, comboBox11.Text);
                dataext.read_files(textBox1.Text, textBox2.Text, comboBox1.Text);
                dataext.read_subextension(textBox1.Text, textBox2.Text, comboBox1.Text);
                Application.OpenForms[1].Close();
            }
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(comboBox1.Text) || String.IsNullOrEmpty(textBox2.Text) || String.IsNullOrEmpty(textBox1.Text))
            {

                MessageBox.Show("Forgot something ?" );
            }

            else
            {
                Read dats = new Read();
                dats.read_files (textBox1.Text, textBox2.Text, comboBox1.Text);
                dats.read_directory(textBox1.Text, textBox2.Text, comboBox1.Text);
                dats.read_subdirectories(textBox1.Text);
                dats.read_subextension(textBox1.Text, textBox2.Text, comboBox1.Text);

                string[] ziles = System.IO.Directory.GetFileSystemEntries(textBox1.Text);
                Array.Sort(ziles);
                for (int z = 0; z < ziles.Length; z++)
                {
                    string zane = ziles[z];
                    richTextBox2.AppendText(zane + "\n");
                }

                string[] liles = System.IO.Directory.GetDirectories(textBox1.Text);
                StreamWriter dest = new StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\" + "path.txt", false);

                dest.Write(textBox1.Text);
                dest.Close();
            }
        }