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); }
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); } }
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); } }
/// <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(); } }); }
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); } }
private void RepositoryFolderAdded(object sender, FolderEventArgs e) { var item = GetSpecialItem(RepositoryItemType.FileSystem); item.SubItems.AddFolder(e.Path, true); }
static void FolderWalker_StartingFolder(object sender, FolderEventArgs e) { Console.WriteLine($"Starting Folder {e.DirectoryInfo.FullName}."); }
/// <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) { }
/// <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) { }