public FilePack SetCount(int newCount) { FilePack clone = (FilePack)MemberwiseClone(); clone.ClipboardCount = newCount; return(clone); }
private void ClipboardChanged(object sender, EventArgs e) { if (!m_clipboard.ContainsFileDropList()) { return; } FilePack pack = new FilePack(m_clipboard.GetFileDropListPaths()); m_packs.AddOrUpdate(pack, 1, (existingPack, existingCount) => ++ existingCount); ClipboardFilePacksUpdated?.Invoke(this, new FilePacksChangeArgs(pack, FilePacksChangeType.Added)); }
public FilePacksChangeArgs(FilePack changedPack, FilePacksChangeType opType) { ChangedPack = changedPack; OpType = opType; }
protected bool Equals(FilePack other) { return(m_paths.ElementsEqual(other.m_paths)); }
public void Remove(FilePack filePack) { m_packs.TryRemove(filePack, out _); ClipboardFilePacksUpdated?.Invoke(this, new FilePacksChangeArgs(filePack, FilePacksChangeType.Deleted)); }