Beispiel #1
0
 protected override void InternalOnMouseUp(MouseEventArgs e)
 {
     if (base.Plot != null)
     {
         if (this.MouseMode == PlotDataViewMouseMode.ZoomBox)
         {
             if (base.IsMouseActive && Math2.Delta(this.m_ZoomBoxStartX, this.m_ZoomBoxStopX) >= 3 && Math2.Delta(this.m_ZoomBoxStartY, this.m_ZoomBoxStopY) >= 3)
             {
                 Rectangle r = iRectangle.FromLTRB(this.m_ZoomBoxStartX, this.m_ZoomBoxStartY, this.m_ZoomBoxStopX, this.m_ZoomBoxStopY);
                 if (this.BeforeZoomBox != null)
                 {
                     PlotDataViewZoomBoxEventArgs plotDataViewZoomBoxEventArgs = new PlotDataViewZoomBoxEventArgs(this, r);
                     this.BeforeZoomBox(this, plotDataViewZoomBoxEventArgs);
                     if (plotDataViewZoomBoxEventArgs.Cancel)
                     {
                         return;
                     }
                 }
                 this.DisableAllTracking();
                 foreach (PlotAxis zoomBoxAxis in this.m_ZoomBoxAxes)
                 {
                     zoomBoxAxis.Zoom(r);
                 }
             }
         }
         else
         {
             base.IsMouseActive = false;
             foreach (PlotAxis xAxis in base.Plot.XAxes)
             {
                 if (xAxis.Visible && base.IsDocked(xAxis))
                 {
                     ((IUIInput)xAxis).MouseUp(e);
                 }
             }
             foreach (PlotAxis yAxis in base.Plot.YAxes)
             {
                 if (yAxis.Visible && base.IsDocked(yAxis))
                 {
                     ((IUIInput)yAxis).MouseUp(e);
                 }
             }
         }
     }
 }