コード例 #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     //delete
     rm = new removals();
     rm.permdelete(removals);
 }
コード例 #2
0
 private void Button_Click_2(object sender, RoutedEventArgs e)
 {
     //clear all
     rm = new removals();
     rm.f1clear(ditem);
 }
コード例 #3
0
        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;
        }