Example #1
0
        private void Insert_Click(object sender, EventArgs e)
        {
            List <string> picList       = FileBLL.movePic(textBox1.Text);
            ArrayList     duplicatePics = new ArrayList();;

            foreach (string path in picList)
            {
                duplicatePics.AddRange(processPic(path));
            }
            foreach (Pic pic in duplicatePics)
            {
                movePic(pic.Path);
            }
            string index   = textBox1.Text.Split('\\')[1];
            string picPath = Path.GetPathRoot(textBox1.Text) + "Pic" + index;

            removeEmptyFolder(picPath);
            List <MyFileInfo> duplicateList = new List <MyFileInfo>();

            duplicateList = FileBLL.InsertFiles(textBox1.Text.Replace("\\", "\\\\"));
            if (duplicateList.Capacity > 0)
            {
                Form2 f2 = new Form2(duplicateList);
                foreach (MyFileInfo myFileInfo in duplicateList)
                {
                    if (myFileInfo.Length > 70)
                    {
                        moveFile(myFileInfo);
                    }
                }
                f2.Show();
            }
            else
            {
                MessageBox.Show("seccuss");
            }
            refresh();
        }