コード例 #1
0
        public NightshiftTicker(ImageDatabase newImageDatabase, SunriseSunset newSunriseSunset)
        {
            imageDatabase = newImageDatabase;
            sunriseSunset = newSunriseSunset;

            lastId = -1;
        }
コード例 #2
0
        ImageDatabaseGenerator(string newDirPath, string newDayPath, string newNightPath, int newStepCount)
        {
            dirPath        = newDirPath;
            dayImagePath   = newDayPath;
            nightImagePath = newNightPath;
            stepCount      = newStepCount;

            var dayHash   = GetFileHash(dayImagePath);
            var nightHash = GetFileHash(nightImagePath);

            resultDatabase = new ImageDatabase(dirPath, ".jpg", stepCount, dayHash, nightHash);
        }
コード例 #3
0
 bool Equals(ImageDatabase other)
 {
     return(string.Equals(imgFormat, other.imgFormat) && stepCount == other.stepCount && dayHash == other.dayHash && nightHash == other.nightHash);
 }
コード例 #4
0
        bool DatabaseExisting()
        {
            var existingDb = ImageDatabase.LoadDatabase(dirPath);

            return(existingDb != null && Equals(existingDb, resultDatabase));
        }