Пример #1
0
        public void addToEncryptedPictureFiles(cEncryptedPictureFile enc)
        {
            bool found = pEncryptedPictureFileCollection.Any(encryptedPictureFile => encryptedPictureFile.pEncryptedFileName == enc.pEncryptedFileName);

            if (!found)
            {
                pEncryptedPictureFileCollection.Add(enc);
            }
        }
Пример #2
0
        public virtual void ReadFilesFromDisk(cFilm film)
        {
            film.getEncryptedPictureFiles().Clear();

            string[] files = Directory.GetFiles(film.pPath, pEncFileName);

            foreach (string file in files)
            {
                var fi = new FileInfo(file);

                long   fileNumber;
                string message;
                if (getFileNumber(fi.Name, fi.DirectoryName, out fileNumber, out message))
                {
                    var enc = new cEncryptedPictureFile {
                        pEncryptedFileName = fi.Name, pEncryptedFilePath = film.pPath, pEncryptedFileNumber = fileNumber
                    };
                    film.addToEncryptedPictureFiles(enc);
                }
            }
        }
Пример #3
0
 public virtual bool isDeveloped(cEncryptedPictureFile enc)
 {
     return(pPictureFileCollection.Where(pictureFile => pictureFile.pEncryptedPicture.pEncryptedFileName == enc.pEncryptedFileName).Any(pictureFile => pictureFile.pHasDecryptedData));
 }
Пример #4
0
        private static int compare(cEncryptedPictureFile b, cEncryptedPictureFile a)
        {
            int diff = b.pEncryptedFileNumber.CompareTo(a.pEncryptedFileNumber);

            return(diff);
        }