Пример #1
0
                public void SetOldFileName(int index, string newOldName)
                {
                    HashedFile item = Data.items[index];

                    if (item.oldFileName != newOldName)
                    {
                        item.oldFileName = newOldName;
                        item.RaisePropertyChanged(null);
                    }
                }
Пример #2
0
                public void SetStoredHash(int index, byte[] newHash)
                {
                    HashedFile item = Data.items[index];

                    if (!newHash.SequenceEqual(item.storedHash))
                    {
                        item.storedHash = new byte[newHash.Length];
                        Array.Copy(newHash, item.storedHash, newHash.Length);
                        SetIsMatch(index, newHash.SequenceEqual(item.actualHash));
                        item.RaisePropertyChanged(null);
                    }
                }
Пример #3
0
                public void SetStoredHashToActual(int index)
                {
                    HashedFile item = Data.items[index];

                    if (item.actualHash == null)
                    {
                        if (item.storedHash != null)
                        {
                            item.IsMatch    = item.actualHash != null? false : (bool?)null;
                            item.storedHash = null;
                            item.RaisePropertyChanged(null);
                        }
                    }
                    else if (!item.actualHash.SequenceEqual(item.storedHash))
                    {
                        item.storedHash = new byte[item.actualHash.Length];
                        Array.Copy(item.actualHash, item.storedHash, item.storedHash.Length);
                        SetIsMatch(index, true);
                        item.RaisePropertyChanged(null);
                    }
                }