/// <summary>
 /// Raises the <see cref="E:LearningModuleAdded"/> event.
 /// </summary>
 /// <param name="e">The <see cref="MLifter.BusinessLayer.LearningModuleAddedEventArgs"/> instance containing the event data.</param>
 /// <remarks>Documented by Dev05, 2009-03-06</remarks>
 protected virtual void OnLearningModuleAdded(LearningModuleAddedEventArgs e)
 {
     if (LearningModuleAdded != null)
     {
         LearningModuleAdded(this, e);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Handles the LearningModuleAdded event of the Folder control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="MLifter.BusinessLayer.LearningModuleAddedEventArgs"/> instance containing the event data.</param>
        /// <remarks>Documented by Dev05, 2009-03-16</remarks>
        private void Folder_LearningModuleAdded(object sender, LearningModuleAddedEventArgs e)
        {
            e.LearningModule.IsVerifiedChanged += new EventHandler(LearningModule_IsVerifiedChanged);

            //UpdateDetails();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Handles the LearningModuleAdded event of the lmIndex control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="MLifter.BusinessLayer.LearningModuleAddedEventArgs"/> instance containing the event data.</param>
        /// <remarks>Documented by Dev05, 2009-03-07</remarks>
        private void lmIndex_LearningModuleAdded(object sender, LearningModuleAddedEventArgs e)
        {
            if (selectedTreeViewNode == null || (selectedTreeViewNode.Folder == null && !selectedTreeViewNode.IsMainNode) || e.LearningModule == null)
                return;
            LearningModulesIndexEntry entry = e.LearningModule;
            if (selectedTreeViewNode.IsMainNode || entry.Connection == selectedTreeViewNode.Folder.Connection &&
                (!(entry.Connection is UncConnectionStringBuilder) || learningModulesTreeViewControl.ShowLearningModulesOfSubFolder ||
                selectedTreeViewNode.Folder.Path == entry.ConnectionString.ConnectionString.Substring(0, entry.ConnectionString.ConnectionString.LastIndexOf('\\'))))
            {
                lock (actualItems)
                {
                    if (!actualItems.Contains(entry))
                        actualItems.Add(entry);
                }

                listViewLearningModules.Invoke((MethodInvoker)delegate
                {
                    LearningModuleListViewItem item = new LearningModuleListViewItem(entry);
                    listViewLearningModules.BeginUpdate();
                    listViewLearningModules.Items.Add(item);
                    if (listViewLearningModules.SelectedItems.Count == 0)
                        item.Selected = true;
                    item.UpdateDetails();
                    lmEntryListItemList[entry] = item;
                    //entry.IsVerifiedChanged += new EventHandler(LearningModule_IsVerifiedChanged);
                    SetLearningModuleListViewItemGroup(item);
                    listViewLearningModules.EndUpdate();
                });
            }
        }
Exemplo n.º 4
0
 void Folder_LearningModuleAdded(object sender, LearningModuleAddedEventArgs e)
 {
     UpdateDetails();
 }
Exemplo n.º 5
0
 private void Folder_SubFolder_LearningModuleAdded(object sender, LearningModuleAddedEventArgs e)
 {
     OnLearningModuleAdded(e);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Raises the <see cref="E:LearningModuleAdded"/> event.
 /// </summary>
 /// <param name="e">The <see cref="MLifter.BusinessLayer.LearningModuleAddedEventArgs"/> instance containing the event data.</param>
 /// <remarks>Documented by Dev05, 2009-03-06</remarks>
 protected virtual void OnLearningModuleAdded(LearningModuleAddedEventArgs e)
 {
     if (LearningModuleAdded != null)
         LearningModuleAdded(this, e);
 }
        /// <summary>
        /// Handles the LearningModuleAdded event of the Folder control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="MLifter.BusinessLayer.LearningModuleAddedEventArgs"/> instance containing the event data.</param>
        /// <remarks>Documented by Dev05, 2009-03-06</remarks>
        private void Folder_LearningModuleAdded(object sender, LearningModuleAddedEventArgs e)
        {
            learningModules.Add(e.LearningModule);
            OnLearningModuleAdded(e);

            GetCacheItem(e.LearningModule);

            Thread loadDetails = new Thread(new ParameterizedThreadStart(LoadLearningModuleDetails));
            loadDetails.Name = "Loading details to " + e.LearningModule.DisplayName;
            loadDetails.CurrentCulture = Thread.CurrentThread.CurrentCulture;
            loadDetails.CurrentUICulture = Thread.CurrentThread.CurrentUICulture;
            loadDetails.IsBackground = true;
            loadDetails.Priority = ThreadPriority.Lowest;
            if (AddThreadToDictionary(e.LearningModule, loadDetails))
                loadDetails.Start(e.LearningModule);
        }
 private void Folder_SubFolder_LearningModuleAdded(object sender, LearningModuleAddedEventArgs e)
 {
     OnLearningModuleAdded(e);
 }