Пример #1
0
    // ===========================================================
    // Methods
    // ===========================================================

    private void UpdateTextIfNeeded()
    {
        int h = MadHashCode.FirstPrime;

        h += MadHashCode.Add(h, text);
        h += MadHashCode.Add(h, wordWrap);
        h += MadHashCode.Add(h, wordWrapLength);
        h += MadHashCode.Add(h, scale);

        if (h != hash)
        {
            UpdateText();
            hash = h;
        }
    }
    int ConfigurationHash()
    {
        var hash = new MadHashCode();

        hash.Add(bulletTextureOff);
        hash.Add(bulletTextureOn);
        hash.Add(hideManagedObjects);
        hash.Add(bulletDistance);
        hash.Add(guiDepth);
        if (draggable != null)
        {
            hash.Add(draggable.dragStopCount);
        }
        return(hash.GetHashCode());
    }
Пример #3
0
    // ===========================================================
    // Methods
    // ===========================================================

    public override int GetHashCode()
    {
        var hash = new MadHashCode();

        hash.Add(texture);
        hash.Add(glyphs);
        hash.Add(linesCount);
        hash.Add(fillFactorTolerance);
        hash.Add(createStatus);
        hash.Add(created);
        hash.Add(material);
        hash.Add(dimensions);

        return(hash.GetHashCode());
    }
Пример #4
0
    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);
    }