コード例 #1
0
        private void OnItemRemoved(object sender, ToolStripItemEventArgs e)
        {
            FragmentControlProvider itemProvider = GetItemProvider(e.Item);

            if (itemProvider != null)
            {
                itemProviders.Remove(e.Item);
                itemProvider.Terminate();
                RemoveChildProvider(itemProvider);
            }
        }
コード例 #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;
     }
 }