private void EndSelect(object sender, MouseEventArgs e) { var pb = CheckCanDrawRect(sender, e); if (pb == null) { return; } var currentPoint = new Point(e.X, e.Y); _mouseMovingState.End = currentPoint; var rect = GetRectangle(_mouseMovingState.Start, _mouseMovingState.End); if ((rect.Width < 2 || rect.Height < 2) && _analisysMode != AnalisysMode.TrackPoint) { _mouseMovingState = null; return; } DrawRectangle(rect); var pt1 = _processor.Current.MapToRGFrame(new Point(rect.Left, rect.Bottom)); var pt2 = _processor.Current.MapToRGFrame(new Point(rect.Right, rect.Top)); var rectF = new RectangleF(pt1.X, pt1.Y, pt2.X - pt1.X, pt2.Y - pt1.Y); switch (_analisysMode) { case AnalisysMode.Zoom: _processor.CreateNew(rectF, _plotPanel.Size); _processor.Draw(); break; case AnalisysMode.TrackPoint: _processor.StartTrackPoint(pt1, _plotPanel.Size); _processor.Draw(); var dynT = new Dyn(this); dynT.Show(); break; case AnalisysMode.TrackBoundary: _processor.StartBoundaryAnalysis(rectF, _plotPanel.Size); _processor.Draw(); var dyn = new Dyn(this); dyn.Show(); break; } _mouseMovingState = null; }
private void DrawMarkupDynamics(object sender, EventArgs e) { var d = new Dyn(this); d.Show(); }