private void OnItemRemoved(object sender, ToolStripItemEventArgs e)
        {
            FragmentControlProvider itemProvider = GetItemProvider(e.Item);

            if (itemProvider != null)
            {
                itemProviders.Remove(e.Item);
                itemProvider.Terminate();
                RemoveChildProvider(itemProvider);
            }
        }
Exemple #2
0
 private void RaiseNavigationEvent(StructureChangeType type,
                                   ref FragmentControlProvider provider,
                                   SWF.ScrollBar scrollbar)
 {
     if (type == StructureChangeType.ChildAdded)
     {
         provider = subject.GetScrollbarProvider(scrollbar);
         provider.Initialize();
         subject.AddChildProvider(provider);
     }
     else
     {
         subject.RemoveChildProvider(provider);
         provider.Terminate();
         provider = null;
     }
 }