Exemplo n.º 1
0
 protected override void OnDisabled()
 {
     base.OnDisabled();
     MiniatureImages.Clear();
     DownloadedImages.Clear();
     FoldersWithNewContent.Clear();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Requests the miniatures if the folder is empty or there are new screenshots
        /// </summary>
        public void RequestMiniaturesIfNeeded(string selectedFolder)
        {
            if (FoldersWithNewContent.Contains(selectedFolder))
            {
                FoldersWithNewContent.Remove(selectedFolder);
                MessageSender.RequestMiniatures(selectedFolder);
                return;
            }

            if (MiniatureImages.GetOrAdd(selectedFolder, new ConcurrentDictionary <long, Screenshot>()).Count == 0)
            {
                MessageSender.RequestMiniatures(selectedFolder);
            }
        }