public static void ShowTOC()
 {
     if (TOCPalette._ps == null)
     {
         TOCPalette._ps             = new PaletteSet(AfaStrings.GISContents, new Guid("C7FE86F9-5BCC-4764-AE32-E54587302339"));
         TOCPalette._ps.Size        = (new Size(300, 400));
         TOCPalette._ps.Text        = (AfaStrings.GISContents);
         TOCPalette._ps.DockEnabled = (DockSides)(20480);
         TOCPalette._toc            = new TOCControl();
         ElementHost elementHost = new ElementHost();
         elementHost.AutoSize = true;
         elementHost.Dock     = DockStyle.Fill;
         elementHost.Child    = TOCPalette._toc;
         TOCPalette._ps.Add(AfaStrings.GISContents, elementHost);
         Application.DocumentManager.DocumentCreated   += (new DocumentCollectionEventHandler(TOCPalette.DocumentManager_DocumentCreated));
         Application.DocumentManager.DocumentDestroyed += (new DocumentDestroyedEventHandler(TOCPalette.DocumentManager_DocumentDestroyed));
         Application.DocumentManager.DocumentActivated += (new DocumentCollectionEventHandler(TOCPalette.DocumentManager_DocumentActivated));
         TOCPalette._ps.StateChanged      += (new PaletteSetStateEventHandler(TOCPalette._ps_StateChanged));
         TOCPalette._ps.PaletteActivated  += (new PaletteActivatedEventHandler(TOCPalette._ps_PaletteActivated));
         TOCPalette._ps.PaletteSetDestroy += (new PaletteSetDestroyEventHandler(TOCPalette._ps_PaletteSetDestroy));
     }
     TOCPalette._ps.KeepFocus = (true);
     TOCPalette._ps.Visible   = (true);
     TOCPalette._showTOC      = true;
 }
 void IComponentConnector.Connect(int connectionId, object target)
 {
     if (connectionId == 1)
     {
         this.ctrlTOC = (TOCControl)target;
         return;
     }
     this._contentLoaded = true;
 }