Exemple #1
0
        public static bool CommandModified(string CurrentCommand)
        {
            bool result = false;
            bool delete = false;
            IEnumerable <string> IEnumerableList;

            IEnumerableList = Directory.EnumerateFiles(Program.mainForm.RestoreFolder, "*progress.tmp", SearchOption.AllDirectories);
            List <string> filesList = IEnumerableList.Cast <string>().ToList();

            if (filesList.Count > 0 && (CurrentCommand != Program.mainForm.Command))
            {
                DialogResult dialogResult = MessageBox.Show("You have previously started a job with "
                                                            + "different options. If you continue, progress will be lost.\n" +
                                                            "Are you sure you want to continue?", "Warning!", MessageBoxButtons.YesNo,
                                                            MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
                if (dialogResult.ToString() == "Yes")
                {
                    delete = true;
                }
                else
                {
                    result = true;
                }

                if (delete == true)
                {
                    for (int i = filesList.Count - 1; i >= 0; i--)
                    {
                        Shredding.ShredGutmann(filesList[i]);
                    }
                }
            }
            return(result);
        }
Exemple #2
0
 public ListEnum(IEnumerableList list)
 {
     Utils.ThrowException(list == null ? new ArgumentNullException("list") : null);
     m_list = list;
 }
Exemple #3
0
 public ListEnum(IEnumerableList list)
 {
     Utils.ThrowException(list == null ? new ArgumentNullException("list") : null);
     mList = list;
 }