Example #1
0
        public FilePack SetCount(int newCount)
        {
            FilePack clone = (FilePack)MemberwiseClone();

            clone.ClipboardCount = newCount;
            return(clone);
        }
Example #2
0
        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;
 }
Example #4
0
 protected bool Equals(FilePack other)
 {
     return(m_paths.ElementsEqual(other.m_paths));
 }
Example #5
0
 public void Remove(FilePack filePack)
 {
     m_packs.TryRemove(filePack, out _);
     ClipboardFilePacksUpdated?.Invoke(this, new FilePacksChangeArgs(filePack, FilePacksChangeType.Deleted));
 }