Example #1
0
        } /* RetrievePlanktonDataBySipperFiles */

        private PicesDataBaseImageList  RetrievePlanktonDataByGroup()
        {
            backGroundStatus = "Group [" + group.Name + "]";

            PicesDataBaseImageList data = dbConn.ImagesQueryByGrouop(this.group,
                                                                     CruiseName.Text,
                                                                     StationName.Text,
                                                                     DeploymentNum.Text,
                                                                     SipperFile.Text,
                                                                     mlClass,
                                                                     classKeyToUse,
                                                                     probMin, probMax,
                                                                     sizeMin, sizeMax,
                                                                     depthMin, depthMax,
                                                                     0,     // Restart Image Id
                                                                     -1,    // limit (Max number Images to load.
                                                                     false  // false = Do not include Thumbnail
                                                                     );

            if (data != null)
            {
                imagesLoaded += (uint)data.Count;
            }

            return(data);
        } /* RetrievePlanktonDataByGroup */
Example #2
0
        } /* SaveImagesForOneSipperFile */

        private void  SaveImagesByGroup()
        {
            uint lastImageId = 0;

            sipperFileStatus = "Group [" + group.Name + "]";

            while (!cancelRequested)
            {
                int limit = -1;
                PicesDataBaseImageList nextBunch = dbConn.ImagesQueryByGrouop
                                                       (group,
                                                       cruise,
                                                       station,
                                                       deployment,
                                                       sipperFileName,
                                                       mlClass,
                                                       classKeyToUse,
                                                       probMin, probMax,
                                                       sizeMin, sizeMax,
                                                       depthMin, depthMax,
                                                       lastImageId,
                                                       limit, // Max # of rows to return.  -1 indicates no limit.,
                                                       false  // false = Don't Load IncludeThumbnail
                                                       );
                if ((nextBunch == null) || (nextBunch.Count < 1))
                {
                    // Sine we loaded less images than 'limit' was set for we are done loading images from this sipperFileName.
                    break;
                }

                // Get the 'lastImagId'  before calling 'SaveOneBatchOfImages' which will sort it into a different order.
                if (nextBunch.Count > 0)
                {
                    lastImageId = nextBunch[nextBunch.Count - 1].ImageId;
                }
                SaveOneBatchOfImages(nextBunch);
                nextBunch = null;
            }
        } /* SaveImagesByGroup */
Example #3
0
        private void  LoadImagesForSelectedGroup()
        {
            curSipperFileName = "";
            uint lastImageId = restartImageId;

            while (!cancelRequested)
            {
                int limit = 100;
                PicesDataBaseImageList nextBunch = dbConn.ImagesQueryByGrouop
                                                       (selectedImageGroup,
                                                       cruiseName,
                                                       stationName,
                                                       deploymentNum,
                                                       sipperFileName,
                                                       mlClass, classKeyToUse,
                                                       probMin, probMax,
                                                       sizeMin, sizeMax,
                                                       depthMin, depthMax,
                                                       lastImageId,
                                                       limit, // Max # of rows to return.  -1 indicates no limit.,
                                                       true   // true = IncludeThumbnail
                                                       );
                if ((nextBunch == null) || (nextBunch.Count < 1))
                {
                    return;
                }

                blocker.StartBlock();

                if (loadedImages == null)
                {
                    loadedImages = new PicesDataBaseImageList();
                }

                uint largestImageId = nextBunch[0].ImageId;

                foreach (PicesDataBaseImage i  in  nextBunch)
                {
                    if (i.ImageId != lastImageId)
                    {
                        loadedImages.Add(i);
                        imagesLoadedCount++;
                    }

                    if (i.ImageId > largestImageId)
                    {
                        largestImageId = i.ImageId;
                    }
                }

                lastImageId = largestImageId;

                blocker.EndBlock();

                if ((nextBunch.Count < limit) || (limit < 0))
                {
                    // Sine we loaded less images than 'limit' was set for we are done loading images from this sipperFileName.
                    break;
                }

                nextBunch = null;
            }
        } /* LoadImagesForSelectedGroup */