private bool Compare(int index) { if (m_Compare.ContainsKey(index)) { return(m_Compare[index]); } int width1, height1; int width2, height2; byte[] org = Gumps.GetRawGump(index, out width1, out height1); byte[] sec = SecondGump.GetRawGump(index, out width2, out height2); bool res = false; if ((org == null) && (sec == null)) { res = true; } else if (((org == null) || (sec == null)) || (org.Length != sec.Length)) { res = false; } else if ((width1 != width2) || (height1 != height2)) { res = false; } else { string hash1string = BitConverter.ToString(shaM.ComputeHash(org)); string hash2string = BitConverter.ToString(shaM.ComputeHash(sec)); if (hash1string == hash2string) { res = true; } } m_Compare[index] = res; return(res); }
private bool Compare(int index) { if (_mCompare.ContainsKey(index)) { return(_mCompare[index]); } byte[] org = Gumps.GetRawGump(index, out int width1, out int height1); byte[] sec = SecondGump.GetRawGump(index, out int width2, out int height2); bool res = false; if (org == null && sec == null) { res = true; } else if (org == null || sec == null || org.Length != sec.Length) { res = false; } else if (width1 != width2 || height1 != height2) { res = false; } else { string hash1String = BitConverter.ToString(_shaM.ComputeHash(org)); string hash2String = BitConverter.ToString(_shaM.ComputeHash(sec)); if (hash1String == hash2String) { res = true; } } _mCompare[index] = res; return(res); }