Beispiel #1
0
 protected override void CreateObjects()
 {
     base.CreateObjects();
     this.m_ToolBarAdapter = new PlotToolBarAdapter(this);
     this.m_LogFileAdapter = new PlotLogFileAdapter(this);
     base.AddSubClass(this.LogFile);
     this.m_LayoutManager            = new PlotLayoutManager(this);
     this.m_Channels                 = new PlotChannelBaseCollection(this);
     this.m_DataViews                = new PlotDataViewCollection(this);
     this.m_XAxes                    = new PlotXAxisCollection(this);
     this.m_YAxes                    = new PlotYAxisCollection(this);
     this.m_Limits                   = new PlotLimitBaseCollection(this);
     this.m_DataCursors              = new PlotDataCursorBaseCollection(this);
     this.Channels.ObjectAdded      += this.m_Plot_ObjectAdded;
     this.Channels.ObjectRemoved    += this.m_Plot_ObjectRemoved;
     this.Channels.ObjectRenamed    += this.m_Plot_ObjectRenamed;
     this.DataViews.ObjectAdded     += this.m_Plot_ObjectAdded;
     this.DataViews.ObjectRemoved   += this.m_Plot_ObjectRemoved;
     this.DataViews.ObjectRenamed   += this.m_Plot_ObjectRenamed;
     this.XAxes.ObjectAdded         += this.m_Plot_ObjectAdded;
     this.XAxes.ObjectRemoved       += this.m_Plot_ObjectRemoved;
     this.XAxes.ObjectRenamed       += this.m_Plot_ObjectRenamed;
     this.YAxes.ObjectAdded         += this.m_Plot_ObjectAdded;
     this.YAxes.ObjectRemoved       += this.m_Plot_ObjectRemoved;
     this.YAxes.ObjectRenamed       += this.m_Plot_ObjectRenamed;
     base.Labels.ObjectAdded        += this.m_Plot_ObjectAdded;
     base.Labels.ObjectRemoved      += this.m_Plot_ObjectRemoved;
     base.Labels.ObjectRenamed      += this.m_Plot_ObjectRenamed;
     base.Legends.ObjectAdded       += this.m_Plot_ObjectAdded;
     base.Legends.ObjectRemoved     += this.m_Plot_ObjectRemoved;
     base.Legends.ObjectRenamed     += this.m_Plot_ObjectRenamed;
     base.Tables.ObjectAdded        += this.m_Plot_ObjectAdded;
     base.Tables.ObjectRemoved      += this.m_Plot_ObjectRemoved;
     base.Tables.ObjectRenamed      += this.m_Plot_ObjectRenamed;
     this.Limits.ObjectAdded        += this.m_Plot_ObjectAdded;
     this.Limits.ObjectRemoved      += this.m_Plot_ObjectRemoved;
     this.Limits.ObjectRenamed      += this.m_Plot_ObjectRenamed;
     base.Annotations.ObjectAdded   += this.m_Plot_ObjectAdded;
     base.Annotations.ObjectRemoved += this.m_Plot_ObjectRemoved;
     base.Annotations.ObjectRenamed += this.m_Plot_ObjectRenamed;
     this.DataCursors.ObjectAdded   += this.m_Plot_ObjectAdded;
     this.DataCursors.ObjectRemoved += this.m_Plot_ObjectRemoved;
     this.DataCursors.ObjectRenamed += this.m_Plot_ObjectRenamed;
 }
Beispiel #2
0
 private void ToolBarAdapter_Changed(object sender, EventArgs e)
 {
     if (this.Plot != null)
     {
         PlotToolBarAdapter toolBarAdapter = this.Plot.ToolBarAdapter;
         for (int i = 0; i < base.Buttons.Count; i++)
         {
             PlotToolBarButton plotToolBarButton = base.Buttons[i] as PlotToolBarButton;
             if (plotToolBarButton != null)
             {
                 PlotToolBarCommandStyle command = plotToolBarButton.Command;
                 if (command == PlotToolBarCommandStyle.TrackingResume)
                 {
                     plotToolBarButton.Enabled = toolBarAdapter.AxesTrackingAnyDisabled;
                 }
                 if (command == PlotToolBarCommandStyle.TrackingPause)
                 {
                     plotToolBarButton.Enabled = toolBarAdapter.AxesTrackingAnyEnabled;
                 }
                 if (command == PlotToolBarCommandStyle.AxesScroll)
                 {
                     plotToolBarButton.Pushed = (toolBarAdapter.AxisMouseMode == PlotAxisMouseMode.Scroll);
                 }
                 if (command == PlotToolBarCommandStyle.AxesZoom)
                 {
                     plotToolBarButton.Pushed = (toolBarAdapter.AxisMouseMode == PlotAxisMouseMode.Zoom);
                 }
                 if (command == PlotToolBarCommandStyle.Select)
                 {
                     plotToolBarButton.Pushed = (toolBarAdapter.DataViewMouseMode == PlotDataViewMouseMode.Select);
                 }
                 if (command == PlotToolBarCommandStyle.ZoomBox)
                 {
                     plotToolBarButton.Pushed = (toolBarAdapter.DataViewMouseMode == PlotDataViewMouseMode.ZoomBox);
                 }
                 if (command == PlotToolBarCommandStyle.DataCursor)
                 {
                     plotToolBarButton.Pushed = (toolBarAdapter.DataViewMouseMode == PlotDataViewMouseMode.DataCursor);
                 }
             }
         }
     }
 }