Ejemplo n.º 1
0
        public NightshiftTicker(ImageDatabase newImageDatabase, SunriseSunset newSunriseSunset)
        {
            imageDatabase = newImageDatabase;
            sunriseSunset = newSunriseSunset;

            lastId = -1;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 bool Equals(ImageDatabase other)
 {
     return(string.Equals(imgFormat, other.imgFormat) && stepCount == other.stepCount && dayHash == other.dayHash && nightHash == other.nightHash);
 }
Ejemplo n.º 4
0
        bool DatabaseExisting()
        {
            var existingDb = ImageDatabase.LoadDatabase(dirPath);

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