bool IsDirty() { if (dirty) { dirty = false; return(true); } if (currentConfiguration == null || iconTemplate == null) { return(false); } var hash = MadHashCode.FirstPrime; hash = MadHashCode.Add(hash, currentConfiguration); hash = MadHashCode.Add(hash, configurationGroup); hash = MadHashCode.Add(hash, iconTemplate); hash = MadHashCode.AddList(hash, iconTemplates); hash = MadHashCode.Add(hash, (int)iconTemplateQuantity); hash = MadHashCode.Add(hash, backgroundTexture); hash = MadHashCode.Add(hash, (int)enumerationType); hash = MadHashCode.Add(hash, enumerationOffset); if (hash != lastHash) { lastHash = hash; return(true); } return(false); }
private int ComputeHash() { var h = MadHashCode.FirstPrime; h = MadHashCode.Add(h, currentConfiguration); h = MadHashCode.Add(h, configurationGroup); h = MadHashCode.Add(h, hideManagedObjects); h = MadHashCode.Add(h, limitLevelsPerPage); h = MadHashCode.Add(h, levelsPerPage); h = MadHashCode.Add(h, (int)setupMethod); h = MadHashCode.Add(h, iconTemplate); h = MadHashCode.AddList(h, iconTemplates); h = MadHashCode.Add(h, (int)iconTemplateQuantity); h = MadHashCode.Add(h, iconScale); h = MadHashCode.Add(h, iconOffset); h = MadHashCode.Add(h, leftSlideSprite); h = MadHashCode.Add(h, leftSlideScale); h = MadHashCode.Add(h, leftSlideOffset); h = MadHashCode.Add(h, rightSlideSprite); h = MadHashCode.Add(h, rightSlideScale); h = MadHashCode.Add(h, rightSlideOffset); h = MadHashCode.Add(h, gridWidth); h = MadHashCode.Add(h, gridHeight); h = MadHashCode.Add(h, (int)horizontalAlign); h = MadHashCode.Add(h, (int)verticalAlign); h = MadHashCode.Add(h, pixelsWidth); h = MadHashCode.Add(h, pixelsHeight); h = MadHashCode.Add(h, pagesOffsetManual); h = MadHashCode.Add(h, pagesOffsetFromResolution); h = MadHashCode.Add(h, (int)enumerationType); h = MadHashCode.Add(h, enumerationOffset); h = MadHashCode.Add(h, (int)pagingMethod); h = MadHashCode.Add(h, pagingInvert); h = MadHashCode.Add(h, pagesOffsetPercent); return(h); }