Esempio n. 1
0
        private void findSamplesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (TreeNode n in treeView1.Nodes)
            {
                checkAllContaining("sample", n);
            }

            getCheckedFiles();

            DeleteConfirmationForm dcf = new DeleteConfirmationForm();
            // POSSIBLE CRASH!!!
            dcf.Width = Convert.ToInt32(this.Width * 0.8);
            dcf.Height = Convert.ToInt32(this.Height * 0.8);
            dcf.CustomFileBindingSource.DataSource = FilesToHandel;

            if (dcf.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                FilesToHandel.ForEach(x =>
                {
                    if (File.Exists(x.FullPath))
                    {
                        File.Delete(x.FullPath);
                    }
                });
                loadTree();
            }
        }
Esempio n. 2
0
        private void clearAnnoyancesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List<string> annoyanceList = new List<string>();
            annoyanceList.AddRange(new string[] { "nfo", "nzb", "srs", "sfv", "srr", "srt" });

            foreach (TreeNode n in treeView1.Nodes)
            {
                annoyanceList.ForEach(x => checkAllOfExtention("." + x, n));
            }

            getCheckedFiles();

            DeleteConfirmationForm dcf = new DeleteConfirmationForm();
            // POSSIBLE CRASH!!!
            dcf.Width = Convert.ToInt32(this.Width * 0.8);
            dcf.Height = Convert.ToInt32(this.Height * 0.8);
            dcf.CustomFileBindingSource.DataSource = FilesToHandel;

            if (dcf.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                FilesToHandel.ForEach(x =>
                {
                    if (File.Exists(x.FullPath))
                    {
                        File.Delete(x.FullPath);
                    }
                });
                loadTree();
            }
        }