Пример #1
0
 private void graphViewer1_MouseDown(InteractiveGraphViewer sender, GraphMouseEventArgs e)
 {
     if (((Control.ModifierKeys & Keys.Control) != Keys.None) && checkBox4.Checked)
     {
         graphViewer1.PreviewRectangle.X1 = e.DataX;
         graphViewer1.PreviewRectangle.Y1 = e.DataY;
         graphViewer1.PreviewRectangle.X2 = e.DataX;
         graphViewer1.PreviewRectangle.Y2 = e.DataY;
         graphViewer1.PreviewRectangle.Visible = true;
     }
     if ((e.Button == MouseButtons.Middle) && checkBox6.Checked)
     {
         graphViewer1.CreateOrCloseFullscreenClone();
     }
 }
        public FullscreenGraphForm(InteractiveGraphViewer viewer)
        {
            InitializeComponent();
            _OriginalParent = viewer.Parent;
            _OriginalLocation = viewer.Location;
            _OriginalSize = viewer.Size;
            _OriginalDock = viewer.Dock;
            _OriginalAnchors = viewer.Anchor;

            Text = viewer.MaximizedModeTitle;

            viewer.Parent = this;
            viewer.Dock = DockStyle.Fill;
            viewer._Maximized = true;
            _Viewer = viewer;
        }
Пример #3
0
 private void graphViewer1_MouseUp(InteractiveGraphViewer sender, GraphMouseEventArgs e)
 {
     if ((e.Button == MouseButtons.Left && graphViewer1.PreviewRectangle.Visible))
         graphViewer1.ForceNewBounds(graphViewer1.PreviewRectangle.MinX, graphViewer1.PreviewRectangle.MaxX, graphViewer1.PreviewRectangle.MinY, graphViewer1.PreviewRectangle.MaxY);
     else
         graphViewer1.ForceCustomBounds = false;
     graphViewer1.PreviewRectangle.Visible = false;
 }
Пример #4
0
        private void graphViewer1_MouseMove(InteractiveGraphViewer sender, GraphMouseEventArgs e)
        {
            if (checkBox1.Checked)
            {
                m_MouseLocationTracker.X = e.DataX;
                m_MouseLocationTracker.Y = e.DataY;
                m_MouseLocationTracker.Hidden = false;
            }
            else
                m_MouseLocationTracker.Hidden = true;

            m_Hint.Hidden = true;
            if (m_HighlightedPoint != null)
                m_HighlightedPoint.MarkerStyle = GraphViewer.DisplayedGraph.PointMarkingStyle.Undefined;    //Default
            if (checkBox2.Checked)
            {
                int distanceSquare;
                var point = graphViewer1.FindNearestGraphPoint(e.DataX, e.DataY, false, out distanceSquare);
                if (point != null && distanceSquare <= 400)
                {
                    m_HighlightedPoint = point.NearestReferencePoint;
                    point.NearestReferencePoint.MarkerStyle = GraphViewer.DisplayedGraph.PointMarkingStyle.Square;

                    if (checkBox3.Checked && (point != null))
                    {
                        m_Hint.FillColor = Color.FromArgb(200, Color.LightGreen);
                        m_Hint.Show(e, string.Format("{2}\nNearest X = {0:f2}\nNearest Y = {1:f2}", m_HighlightedPoint.X, m_HighlightedPoint.Y, point.Graph.Hint));
                    }
                }
                else
                {
                    if (checkBox3.Checked && (point != null))
                    {
                        m_Hint.FillColor = Color.FromArgb(200, Color.LightYellow);
                        m_Hint.Show(e, string.Format("{2}\nX = {0:f2}\nY (interpolated)={1:f2}", point.X, point.Y, point.Graph.Hint));
                    }
                }
            }
            if (graphViewer1.PreviewRectangle.Visible)
            {
                graphViewer1.PreviewRectangle.X2 = e.DataX;
                graphViewer1.PreviewRectangle.Y2 = e.DataY;
            }
        }
 internal Tracker(InteractiveGraphViewer viewer)
 {
     _Viewer = viewer;
 }
 internal PreviewRect(InteractiveGraphViewer viewer)
 {
     _Viewer = viewer;
 }
 public FloatingHint(InteractiveGraphViewer viewer)
 {
     _Viewer = viewer;
 }
 internal DistanceMeasurer(InteractiveGraphViewer viewer)
 {
     _Viewer = viewer;
 }