private void Button_Click(object sender, RoutedEventArgs e) { //delete rm = new removals(); rm.permdelete(removals); }
private void Button_Click_2(object sender, RoutedEventArgs e) { //clear all rm = new removals(); rm.f1clear(ditem); }
private void listBox1_Drop(object sender, DragEventArgs e) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); foreach (string file in files) { if (Directory.Exists(file)) { string[] folders = Directory.GetDirectories(file, "*.*", SearchOption.TopDirectoryOnly); foreach (string d in folders) { ditem.Add(d.ToLower()); } string[] dirfiles = Directory.GetFiles(file); foreach (string dirfile in dirfiles) { ditem.Add(dirfile.ToLower()); } } else { ditem.Add(file.ToLower()); } } rm = new removals(); rm.specials(safe); zitem = new ObservableCollection<string>(ditem.Except(safe)); listBox1.ItemsSource = zitem; }