//deactivate this plugin public override void Deactivate() { //remove ribbon tab App.HeaderControl.RemoveAll(); //remove plugin panel App.DockManager.Remove(strPanelKey); _frmDatasheet = null; //this line to ensure "enabled is set to false base.Deactivate(); }
//initial activation, adding the panel and the ribbon public override void Activate() { _frmDatasheet = new frmDatasheet(); AddRibbon("Activate"); AddPanel(); //when panel is selected activate seriesview and ribbon tab App.DockManager.ActivePanelChanged += new EventHandler <DotSpatial.Controls.Docking.DockablePanelEventArgs>(DockManager_ActivePanelChanged); //when root item is selected App.HeaderControl.RootItemSelected += new EventHandler <RootItemEventArgs>(HeaderControl_RootItemSelected); base.Activate(); //ensures "enabled" is set to true }
//initial activation, adding the panel and the ribbon public override void Activate() { _frmDatasheet = new frmDatasheet(); AddRibbon("Activate"); AddPanel(); //when panel is selected activate seriesview and ribbon tab App.DockManager.ActivePanelChanged += new EventHandler<DotSpatial.Controls.Docking.DockablePanelEventArgs>(DockManager_ActivePanelChanged); //when root item is selected App.HeaderControl.RootItemSelected +=new EventHandler<RootItemEventArgs>(HeaderControl_RootItemSelected); base.Activate(); //ensures "enabled" is set to true }