/// <summary> /// Raises the <see cref="E:FolderAdded"/> event. /// </summary> /// <param name="e">The <see cref="MLifter.BusinessLayer.FolderAddedEventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2009-03-06</remarks> protected virtual void OnFolderAdded(FolderAddedEventArgs e) { if (FolderAdded != null) { FolderAdded(this, e); } }
/// <summary> /// Handles the FolderAdded event of the Folder control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="MLifter.BusinessLayer.FolderAddedEventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2009-03-16</remarks> private void Folder_FolderAdded(object sender, FolderAddedEventArgs e) { e.Folder.ContentLoaded += new EventHandler(Folder_ContentLoaded); e.Folder.ContentLoading += new EventHandler(Folder_ContentLoading); e.Folder.ContentLoadException += new FolderIndexEntry.ContentLoadExceptionEventHandler(Folder_ContentLoadException); e.Folder.FolderAdded += new EventHandler<FolderAddedEventArgs>(Folder_FolderAdded); e.Folder.LearningModuleAdded += new EventHandler<LearningModuleAddedEventArgs>(Folder_LearningModuleAdded); //UpdateDetails(); }
/// <summary> /// Handles the AddFolder event of the lmIndex control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="MLifter.BusinessLayer.FolderAddedEventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2009-03-07</remarks> private void lmIndex_FolderAdded(object sender, FolderAddedEventArgs e) { if (e.Folder == null) return; learningModulesTreeViewControl.AddFolder(e.Folder); if (selectedTreeViewNode == null || selectedTreeViewNode.Folder == null) return; FolderIndexEntry entry = e.Folder; if ((selectedTreeViewNode.IsMainNode && entry.Connection.ConnectionString == entry.Path) || entry.Connection == selectedTreeViewNode.Folder.Connection && (!(entry.Connection is UncConnectionStringBuilder) || !learningModulesTreeViewControl.ShowLearningModulesOfSubFolder && selectedTreeViewNode.Folder.Path == entry.Path.Substring(0, entry.Path.Length - 1 - entry.DisplayName.Length))) { lock (actualItems) { if (!actualItems.Contains(entry)) actualItems.Add(entry); } listViewLearningModules.Invoke((MethodInvoker)delegate { FolderListViewItem item = new FolderListViewItem(entry); listViewLearningModules.BeginUpdate(); listViewLearningModules.Items.Insert(0, item); item.UpdateImage(); item.UpdateDetails(); SetFolderListViewItemGroup(item); listViewLearningModules.EndUpdate(); }); } }
void Folder_FolderAdded(object sender, FolderAddedEventArgs e) { UpdateDetails(); }
private void Folder_SubFolderAdded(object sender, FolderAddedEventArgs e) { OnFolderAdded(e); }
/// <summary> /// Raises the <see cref="E:FolderAdded"/> event. /// </summary> /// <param name="e">The <see cref="MLifter.BusinessLayer.FolderAddedEventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2009-03-06</remarks> protected virtual void OnFolderAdded(FolderAddedEventArgs e) { if (FolderAdded != null) FolderAdded(this, e); }
/// <summary> /// Handles the SubFolderAdded event of the Folder control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="MLifter.BusinessLayer.FolderAddedEventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2009-03-06</remarks> private void Folder_SubFolderAdded(object sender, FolderAddedEventArgs e) { if (e.Folder != null && !Folders.Contains(e.Folder)) Folders.Add(e.Folder); OnFolderAdded(e); }