Пример #1
0
        void Search_FoundFolder(object sender, FolderEventArgs e)
        {
            int          img  = 0;
            string       dir  = e.DirectoryInfo.Parent.FullName;
            ListViewItem item = new ListViewItem(
                new string[] { e.DirectoryInfo.Name, dir }, img);

            item.Tag = e.DirectoryInfo;
            ResultsView.Items.Add(item);
        }
Пример #2
0
 void Search_SearchingFolder(object sender, FolderEventArgs e)
 {
     SearchInput.StatusList.Visible = true;
     SearchInput.StatusList.Items.Add(e.DirectoryInfo.FullName);
     SearchInput.StatusList.SelectedIndex = SearchInput.StatusList.Items.Count - 1;
     if (SearchInput.StatusList.Items.Count > 50)
     {
         SearchInput.StatusList.Items.RemoveAt(0);
     }
 }
Пример #3
0
        private void RepositoryFolderRemoved(object sender, FolderEventArgs e)
        {
            var item   = GetSpecialItem(RepositoryItemType.FileSystem);
            var folder = item.SubItems.OfType <IFolderItem>().FirstOrDefault(f => f.GetPath().EqualsIgnoreCase(e.Path));

            if (folder != null)
            {
                item.SubItems.Remove(folder);
            }
        }
Пример #4
0
 /// <summary>
 /// Called when details of a forum are refreshed from the server. This may be the title
 /// or description.
 /// </summary>
 private void OnFolderUpdated(object sender, FolderEventArgs e)
 {
     Platform.UIThread(this, delegate
     {
         // Handle changes to the topic name or description
         if (e.Folder == _currentFolder.Folder && frmCanvas.Items.Count > 0)
         {
             ForumPage forumFolderItem = (ForumPage)frmCanvas.Items[0];
             forumFolderItem.InvalidateItem();
         }
     });
 }
Пример #5
0
        private void ImapInboxIdlerOnCountChanged(object sender, FolderEventArgs eventArgs)
        {
            var folder            = eventArgs.Folder;
            var cacheMailBoxCount = Interlocked.Read(ref _nbMails);

            _config.Tracer?.TraceVerbose($"The number of messages in {folder} has changed to {folder.Count} emails and we have {cacheMailBoxCount} in cache", $"{this}");

            if (folder.Count > cacheMailBoxCount)
            {
                _config.Tracer?.TraceVerbose($"New messages have arrived!", $"{this}");
                SynchronizeMailCount(folder.Count);
            }
            else if (cacheMailBoxCount > folder.Count)
            {
                _config.Tracer?.TraceWarning($"Incoherence of mail count between the distant mail box ({folder.Count}) and local cache ({cacheMailBoxCount})!", $"{this}");
                SynchronizeMailCount(folder.Count);
            }
        }
Пример #6
0
        private void RepositoryFolderAdded(object sender, FolderEventArgs e)
        {
            var item = GetSpecialItem(RepositoryItemType.FileSystem);

            item.SubItems.AddFolder(e.Path, true);
        }
Пример #7
0
 static void FolderWalker_StartingFolder(object sender, FolderEventArgs e)
 {
     Console.WriteLine($"Starting Folder {e.DirectoryInfo.FullName}.");
 }
Пример #8
0
 /// <summary>
 /// Invoked when a folder is renamed.
 /// </summary>
 /// <param name="source">the source of the event</param>
 /// <param name="e">the FolderEventArgs</param>
 public virtual void FolderRenamed(object source, FolderEventArgs e)
 {
 }
Пример #9
0
 /// <summary>
 /// Invoked when a folder is deleted.
 /// </summary>
 /// <param name="source">the source of the event</param>
 /// <param name="e">the FolderEventArgs</param>
 public virtual void FolderDeleted(object source, FolderEventArgs e)
 {
 }