예제 #1
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     //save
     sv = new save();
     sv.saving(zitem, removals);
 }
예제 #2
0
        private void Window_Drop(object sender, DragEventArgs e)
        {
            sv = new save();

            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.specials(safe);
            zitem = new ObservableCollection<string>(ditem.Except(safe));
            sv.saving(zitem, removals);
        }