public override bool ShutDown(PluginShutDownReason reason)
 {
     if (mTab != null)
     {
         mContainer.Controls.Remove(mTab);
     }
     mContainer = null;
     mTab = null;
     mControl = null;
     return true;
 }
        void HandleInitializeTab(TabControl tabControl)
        {
            mControl = new MainControl();
            mControl.PropertyValueChanged += new EventHandler(HandleValueChanged);
            mControl.ListAddOrRemove += new EventHandler(HandleValueChanged);
            mControl.EmitAllClick += new EventHandler(HandleEmitAllClick);
            mControl.EmitCurrentClick += new EventHandler(HandleEmitCurrentClick);

            mTab = new PluginTab();
            mContainer = tabControl;

            mTab.ClosedByUser += new PluginTab.ClosedByUserDelegate(OnClosedByUser);

            mTab.Text = "  Emitters"; // add spaces to make room for the X to close the plugin
            mTab.Controls.Add(mControl);
            mControl.Dock = DockStyle.Fill;
        }