public NightshiftTicker(ImageDatabase newImageDatabase, SunriseSunset newSunriseSunset) { imageDatabase = newImageDatabase; sunriseSunset = newSunriseSunset; lastId = -1; }
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); }
bool Equals(ImageDatabase other) { return(string.Equals(imgFormat, other.imgFormat) && stepCount == other.stepCount && dayHash == other.dayHash && nightHash == other.nightHash); }
bool DatabaseExisting() { var existingDb = ImageDatabase.LoadDatabase(dirPath); return(existingDb != null && Equals(existingDb, resultDatabase)); }