Beispiel #1
0
        public void button_exportAll()
        {
            popup.displayBlock("Please wait ...");
            ExportFile ef = new ExportFile();

            ef.settings    = settings;
            ef.filesExport = files.mainCopy;
            ef.LoadFiles();
            List <AudioFiles> afDelete = ef.exportAll();


            //bool isDelete = false; bool isDeleteOnlyProgram = false;
            if (isDelete)
            {
                foreach (AudioFiles element in afDelete)//listSelectId
                {
                    File.Delete(element.path);
                }
                foreach (AudioFiles element in afDelete)
                {
                    files.mainCopy.Remove(element);
                    files.main.Remove(element);
                }
                int i = 0;
                foreach (AudioFiles element in files.main)
                {
                    element.id = i;
                    i++;
                }
                list_name_main.ItemsSource = files.mainCopy;
                list_name_main.Items.Refresh();
            }
            if (isDeleteOnlyProgram && isDelete != true)
            {
                foreach (AudioFiles element in afDelete)
                {
                    files.mainCopy.Remove(element);
                    files.main.Remove(element);
                }
                int i = 0;
                foreach (AudioFiles element in files.main)
                {
                    element.id = i;
                    i++;
                }
                list_name_main.ItemsSource = files.mainCopy;
                list_name_main.Items.Refresh();
            }
            popup.displayNan();

            checkBox_name_deleteAfterOnly.IsChecked = false;
            checkBox_name_deleteAfter.IsChecked     = false;
            isDelete            = false;
            isDeleteOnlyProgram = false;
        }