Пример #1
0
 protected override void OnDisabled()
 {
     base.OnDisabled();
     MiniatureImages.Clear();
     DownloadedImages.Clear();
     FoldersWithNewContent.Clear();
 }
Пример #2
0
        public void RequestCraftListIfNeeded(string selectedFolder)
        {
            if (FoldersWithNewContent.Contains(selectedFolder))
            {
                FoldersWithNewContent.Remove(selectedFolder);
                MessageSender.SendRequestCraftListMsg(selectedFolder);
                return;
            }

            if (CraftInfo.GetOrAdd(selectedFolder, new ConcurrentDictionary <string, CraftBasicEntry>()).Count == 0)
            {
                MessageSender.SendRequestCraftListMsg(selectedFolder);
            }
        }
Пример #3
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);
            }
        }