Esempio n. 1
0
        public void CollectInformation()
        {
            StageDB stageDB = new StageDB();

            List <ImageFile> imageFiles = stageDB.GetAllImageFiles();

            int i = 1;

            foreach (ImageFile imageFile in imageFiles)
            {
                Console.WriteLine("Inserting image: " + imageFile.FileName + " | " + i + " / " + imageFiles.Count);
                ImageInfo imageInfo = CollectImageInfo(imageFile);
                InsertSingleImageInfoIntoDB(imageInfo);
                i++;
            }
        }
        public void LoadDataFromStageDBtoResultDB()
        {
            List <ImageFile> imageFiles = new List <ImageFile>();
            List <ImageInfo> imageInfos = new List <ImageInfo>();

            StageDB  stageDB  = new StageDB();
            ResultDB resultDB = new ResultDB();


            imageFiles = stageDB.GetAllImageFiles();
            imageInfos = stageDB.GetAllImageInfos();


            foreach (ImageFile imageFile in imageFiles)
            {
                imageFile.FilePath.Replace("StageDBData", "ResultDBData");
                resultDB.InsertImageFile(imageFile);
            }

            foreach (ImageInfo imageInfo in imageInfos)
            {
                resultDB.InsertImageInfo(imageInfo);
            }
        }