Beispiel #1
0
                public void SetOldFileName(int index, string newOldName)
                {
                    HashedFile item = Data.items[index];

                    if (item.oldFileName != newOldName)
                    {
                        item.oldFileName = newOldName;
                        item.NotifyPropertyChanged(null);
                    }
                }
Beispiel #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.NotifyPropertyChanged(null);
                    }
                }
Beispiel #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.NotifyPropertyChanged(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.NotifyPropertyChanged(null);
                    }
                }