private void button4_Click(object sender, EventArgs e) { lyndaparse parse = new lyndaparse();//declare new lynda parse parse.test(); parse.populate(textBox3.Text);//sample data MessageBox.Show(parse.returnname()); }
private void button7_Click(object sender, EventArgs e) { lyndaparse parse = new lyndaparse();//declare new lynda parse listBox1.Items.Clear(); try { int tempcts = 0; // Only get files that begin with the letter "c." string tempfiletypesearch = ""; if (textBox1.TextLength < 1) { tempfiletypesearch = "*"; //defaults to all files } tempfiletypesearch = textBox1.Text; //MessageBox.Show(tempfiletypesearch); string[] dirs = Directory.GetFiles(textBox2.Text, tempfiletypesearch); foreach (string dir in dirs) { Console.WriteLine(dir); vconsole_write(dir); listBox1.Items.Add(dir); tempcts++; } } catch (Exception ex) { Console.WriteLine("The process failed: {0}", ex.ToString()); } //files are in next phase int count = 0; int indexlength = listBox1.Items.Count - 1; //amount of items in box MessageBox.Show(listBox1.Items.Count.ToString()); //determines the amount of items in the list box while (count <= indexlength) { parse.populate(listBox1.Items[count].ToString()); listBox2.Items.Add(parse.returnname()); vconsole_write(parse.returnname()); count++; } //next phase rename int count2 = 0; int indexlength2 = listBox1.Items.Count - 1; while (count2 <= indexlength2) { //listBox1.Items[count].ToString(); rename(textBox2.Text, listBox1.Items[count2].ToString(), listBox2.Items[count2].ToString());//renames the files count2++; } }
private void button1_Click(object sender, EventArgs e) { string temptext = textBox3.Text; if (temptext.Length < 1) { MessageBox.Show("Please Fill in the \"Series\" box"); return; } lyndaparse parse = new lyndaparse();//declare new lynda parse listBox1.Items.Clear(); listBox2.Items.Clear(); parse.set_series_name(textBox3.Text); try { int tempcts = 0; // Only get files that begin with the letter "c." string tempfiletypesearch = ""; if (textBox1.TextLength < 1) { tempfiletypesearch = "*"; //defaults to all files } tempfiletypesearch = textBox1.Text; //MessageBox.Show(tempfiletypesearch); string[] dirs = Directory.GetFiles(textBox2.Text, tempfiletypesearch); foreach (string dir in dirs) { Console.WriteLine(dir); //vconsole_write(dir); listBox1.Items.Add(dir); tempcts++; } } catch (Exception ex) { Console.WriteLine("The process failed: {0}", ex.ToString()); } //files are in next phase int count = 0; int indexlength = listBox1.Items.Count - 1; //amount of items in box //MessageBox.Show(listBox1.Items.Count.ToString()); //determines the amount of items in the list box while (count <= indexlength) { parse.populate(listBox1.Items[count].ToString()); listBox2.Items.Add(parse.returnname()); //vconsole_write(parse.returnname()); count++; } button3.Enabled = true; }
private void button6_Click(object sender, EventArgs e) { lyndaparse parse = new lyndaparse(); //declare new lynda parse int count = 0; int indexlength = listBox1.Items.Count - 1; //amount of items in box MessageBox.Show(listBox1.Items.Count.ToString()); //determines the amount of items in the list box while (count <= indexlength) { parse.populate(listBox1.Items[count].ToString()); listBox2.Items.Add(parse.returnname()); vconsole_write(parse.returnname()); count++; } }