Exemplo n.º 1
0
        public override void Activate()
        {
            //if (_seriesSelector != null)
            //{
            _frmDatasheet = new frmDatasheet();
            AddDatasheetPanel();
            AddDatasheetRibbon();
            //}

            //when panel is selected activate seriesview and ribbon tab
            App.DockManager.ActivePanelChanged += new EventHandler <DotSpatial.Controls.Docking.DockablePanelEventArgs>(DockManager_ActivePanelChanged);

            App.DockManager.SelectPanel("datasheetSeriesView");
            App.HeaderControl.SelectRoot(kDataSheet);

            //when root item is selected
            App.HeaderControl.RootItemSelected += new EventHandler <RootItemEventArgs>(HeaderControl_RootItemSelected);

            //assign project saving/loading events
            App.SerializationManager.Serializing += new EventHandler <SerializingEventArgs>(SerializationManager_Serializing);
            //allow plugin to deal with any custom settings that were deserialized
            App.SerializationManager.Deserializing += new EventHandler <SerializingEventArgs>(SerializationManager_Deserializing);

            base.Activate(); //ensures "enabled" is set to true
        }
Exemplo n.º 2
0
        public override void Deactivate()
        {
            //remove ribbon tab
            App.HeaderControl.RemoveAll();

            //remove plugin panel
            App.DockManager.Remove(kDataSheet);

            _frmDatasheet = null;

            //this line to ensure "enabled is set to false
            base.Deactivate();
        }