Esempio n. 1
0
        public FilePack SetCount(int newCount)
        {
            FilePack clone = (FilePack)MemberwiseClone();

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