void OnCursorChangedHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            ZedGraphCursor cursor = args.Cursor;

            if (this.cursor1.Position < Convert.ToDouble(this.minNumericUpDown.Minimum))
            {
                this.cursor1.Position = Convert.ToDouble(this.minNumericUpDown.Minimum);
                this.zedGraphControl.Invalidate();
            }

            if (this.cursor2.Position > Convert.ToDouble(this.maxNumericUpDown.Maximum))
            {
                this.cursor2.Position = Convert.ToDouble(this.maxNumericUpDown.Maximum);
                this.zedGraphControl.Invalidate();
            }

            MosaicWindow.MosaicInfo.ScaleMinIntensity = this.cursor1.Position;
            MosaicWindow.MosaicInfo.ScaleMaxIntensity = this.cursor2.Position;

            this.minNumericUpDown.Value = Convert.ToDecimal(MosaicWindow.MosaicInfo.ScaleMinIntensity);
            this.maxNumericUpDown.Value = Convert.ToDecimal(MosaicWindow.MosaicInfo.ScaleMaxIntensity);

            this.mosaicWindow.TileView.Clear(); // This possibly clears the intermidiate image
            this.mosaicWindow.TileView.Redraw();
        }
        void OnCursorChangedHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            ZedGraphCursor cursor = args.Cursor;

            if (this.cursor1_1.Position < Convert.ToDouble(this.minNumericUpDown1.Minimum))
            {
                this.cursor1_1.Position = Convert.ToDouble(this.minNumericUpDown1.Minimum);
                this.zedGraphControl1.Invalidate();
            }

            if (this.cursor1_2.Position > Convert.ToDouble(this.maxNumericUpDown1.Maximum))
            {
                this.cursor1_2.Position = Convert.ToDouble(this.maxNumericUpDown1.Maximum);
                this.zedGraphControl1.Invalidate();
            }

            if (this.cursor2_1.Position < Convert.ToDouble(this.minNumericUpDown2.Minimum))
            {
                this.cursor2_1.Position = Convert.ToDouble(this.minNumericUpDown2.Minimum);
                this.zedGraphControl2.Invalidate();
            }

            if (this.cursor2_2.Position > Convert.ToDouble(this.maxNumericUpDown2.Maximum))
            {
                this.cursor2_2.Position = Convert.ToDouble(this.maxNumericUpDown2.Maximum);
                this.zedGraphControl2.Invalidate();
            }

            if (this.cursor3_1.Position < Convert.ToDouble(this.minNumericUpDown3.Minimum))
            {
                this.cursor3_1.Position = Convert.ToDouble(this.minNumericUpDown3.Minimum);
                this.zedGraphControl3.Invalidate();
            }

            if (this.cursor3_2.Position > Convert.ToDouble(this.maxNumericUpDown3.Maximum))
            {
                this.cursor3_2.Position = Convert.ToDouble(this.maxNumericUpDown3.Maximum);
                this.zedGraphControl3.Invalidate();
            }

            Tile.scaleMin[0] = this.cursor1_1.Position;
            Tile.scaleMax[0] = this.cursor1_2.Position;
            Tile.scaleMin[1] = this.cursor2_1.Position;
            Tile.scaleMax[1] = this.cursor2_2.Position;
            Tile.scaleMin[2] = this.cursor3_1.Position;
            Tile.scaleMax[2] = this.cursor3_2.Position;

            this.minNumericUpDown1.Value = Convert.ToDecimal(Tile.scaleMin[0]);
            this.maxNumericUpDown1.Value = Convert.ToDecimal(Tile.scaleMax[0]);
            this.minNumericUpDown2.Value = Convert.ToDecimal(Tile.scaleMin[1]);
            this.maxNumericUpDown2.Value = Convert.ToDecimal(Tile.scaleMax[1]);
            this.minNumericUpDown3.Value = Convert.ToDecimal(Tile.scaleMin[2]);
            this.maxNumericUpDown3.Value = Convert.ToDecimal(Tile.scaleMax[2]);

            this.mosaicWindow.TileView.Clear(); // This possibly clears the intermidiate image
            this.mosaicWindow.TileView.Redraw();
        }
        public VerticalZedGraphCursor(ZedGraphWithCursorsControl zedGraph, Color color)
        {
            this.zedGraph = zedGraph;
            this.color = color;

            GraphPane pane = this.zedGraph.GraphPane;

            this.x = pane.XAxis.Scale.Min;
            this.SetupFromGraph();
            pane.AxisChangeEvent += new GraphPane.AxisChangeEventHandler(OnAxisChangeEvent);
        }
        public VerticalZedGraphCursor(ZedGraphWithCursorsControl zedGraph, Color color)
        {
            this.zedGraph = zedGraph;
            this.color    = color;

            GraphPane pane = this.zedGraph.GraphPane;

            this.x = pane.XAxis.Scale.Min;
            this.SetupFromGraph();
            pane.AxisChangeEvent += new GraphPane.AxisChangeEventHandler(OnAxisChangeEvent);
        }
        void OnCursorChangingHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            // Don't allow the two cursors to overlap.
            ZedGraphCursor cursor = args.Cursor;

            if (cursor == this.cursor1_1)
            {
                if (this.cursor1_1.Position > this.cursor1_2.Position - this.cursor1_2.CursorSize)
                {
                    this.cursor1_1.Position = this.cursor1_2.Position - this.cursor1_2.CursorSize;
                }
                DisplayPlot(1);
            }
            else if (cursor == this.cursor1_2)
            {
                if (this.cursor1_2.Position < this.cursor1_1.Position + this.cursor1_1.CursorSize)
                {
                    this.cursor1_2.Position = this.cursor1_1.Position + this.cursor1_1.CursorSize;
                }
                DisplayPlot(1);
            }
            else if (cursor == this.cursor2_1)
            {
                if (this.cursor2_1.Position > this.cursor2_2.Position + this.cursor2_2.CursorSize)
                {
                    this.cursor2_1.Position = this.cursor2_2.Position + this.cursor2_2.CursorSize;
                }
                DisplayPlot(2);
            }
            else if (cursor == this.cursor2_2)
            {
                if (this.cursor2_2.Position < this.cursor2_1.Position + this.cursor2_1.CursorSize)
                {
                    this.cursor2_2.Position = this.cursor2_1.Position + this.cursor2_1.CursorSize;
                }
                DisplayPlot(2);
            }
            else if (cursor == this.cursor3_1)
            {
                if (this.cursor3_1.Position > this.cursor3_2.Position + this.cursor3_2.CursorSize)
                {
                    this.cursor3_1.Position = this.cursor3_2.Position + this.cursor3_2.CursorSize;
                }
                DisplayPlot(3);
            }
            else if (cursor == this.cursor3_2)
            {
                if (this.cursor3_2.Position < this.cursor3_1.Position + this.cursor3_1.CursorSize)
                {
                    this.cursor3_2.Position = this.cursor3_1.Position + this.cursor3_1.CursorSize;
                }
                DisplayPlot(3);
            }
        }
        void OnCursorChangingHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            // Don't allow the two cursors to overlap.
            ZedGraphCursor cursor = args.Cursor;

            if (cursor == this.cursor1)
            {
                if (this.cursor1.Position > this.cursor2.Position - this.cursor2.CursorSize)
                {
                    this.cursor1.Position = this.cursor2.Position - this.cursor2.CursorSize;
                }
            }
            else
            {
                if (this.cursor2.Position < this.cursor1.Position + this.cursor1.CursorSize)
                {
                    this.cursor2.Position = this.cursor1.Position + this.cursor1.CursorSize;
                }
            }
        }
Example #7
0
        void OnCursorChangingHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            // Don't allow the two cursors to overlap.
            ZedGraphCursor cursor = args.Cursor;

            if (cursor == this.cursor1)
            {
                if (this.cursor1.Position > this.cursor2.Position - this.cursor2.CursorSize)
                    this.cursor1.Position = this.cursor2.Position - this.cursor2.CursorSize;
            }
            else
            {
                if (this.cursor2.Position < this.cursor1.Position + this.cursor1.CursorSize)
                    this.cursor2.Position = this.cursor1.Position + this.cursor1.CursorSize;
            }
        }
Example #8
0
        void OnCursorChangedHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            ZedGraphCursor cursor = args.Cursor;

            if (this.cursor1.Position < Convert.ToDouble(this.minNumericUpDown.Minimum))
            {
                this.cursor1.Position = Convert.ToDouble(this.minNumericUpDown.Minimum);
                this.zedGraphControl.Invalidate();
            }

            if (this.cursor2.Position > Convert.ToDouble(this.maxNumericUpDown.Maximum))
            {
                this.cursor2.Position = Convert.ToDouble(this.maxNumericUpDown.Maximum);
                this.zedGraphControl.Invalidate();
            }

            MosaicWindow.MosaicInfo.ScaleMinIntensity = this.cursor1.Position;
            MosaicWindow.MosaicInfo.ScaleMaxIntensity = this.cursor2.Position;

            this.minNumericUpDown.Value = Convert.ToDecimal(MosaicWindow.MosaicInfo.ScaleMinIntensity);
            this.maxNumericUpDown.Value = Convert.ToDecimal(MosaicWindow.MosaicInfo.ScaleMaxIntensity);

            this.mosaicWindow.TileView.Clear(); // This possibly clears the intermidiate image
            this.mosaicWindow.TileView.Redraw();
        }
Example #9
0
        void OnCursorChangingHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            // Don't allow the two cursors to overlap.
            ZedGraphCursor cursor = args.Cursor;

            if (cursor == this.cursor1_1)
            {
                if (this.cursor1_1.Position > this.cursor1_2.Position - this.cursor1_2.CursorSize)
                    this.cursor1_1.Position = this.cursor1_2.Position - this.cursor1_2.CursorSize;
                DisplayPlot(1);
            }
            else if (cursor == this.cursor1_2)
            {
                if (this.cursor1_2.Position < this.cursor1_1.Position + this.cursor1_1.CursorSize)
                    this.cursor1_2.Position = this.cursor1_1.Position + this.cursor1_1.CursorSize;
                DisplayPlot(1);
            }
            else if (cursor == this.cursor2_1)
            {
                if (this.cursor2_1.Position > this.cursor2_2.Position + this.cursor2_2.CursorSize)
                    this.cursor2_1.Position = this.cursor2_2.Position + this.cursor2_2.CursorSize;
                DisplayPlot(2);
            }
            else if (cursor == this.cursor2_2)
            {
                if (this.cursor2_2.Position < this.cursor2_1.Position + this.cursor2_1.CursorSize)
                    this.cursor2_2.Position = this.cursor2_1.Position + this.cursor2_1.CursorSize;
                DisplayPlot(2);
            }
            else if (cursor == this.cursor3_1)
            {
                if (this.cursor3_1.Position > this.cursor3_2.Position + this.cursor3_2.CursorSize)
                    this.cursor3_1.Position = this.cursor3_2.Position + this.cursor3_2.CursorSize;
                DisplayPlot(3);
            }
            else if (cursor == this.cursor3_2)
            {
                if (this.cursor3_2.Position < this.cursor3_1.Position + this.cursor3_1.CursorSize)
                    this.cursor3_2.Position = this.cursor3_1.Position + this.cursor3_1.CursorSize;
                DisplayPlot(3);
            }
        }
Example #10
0
        void OnCursorChangedHandler(ZedGraphWithCursorsControl sender, ZedGraphCursorEventArgs args)
        {
            ZedGraphCursor cursor = args.Cursor;

            if (this.cursor1_1.Position < Convert.ToDouble(this.minNumericUpDown1.Minimum))
            {
                this.cursor1_1.Position = Convert.ToDouble(this.minNumericUpDown1.Minimum);
                this.zedGraphControl1.Invalidate();
            }

            if (this.cursor1_2.Position > Convert.ToDouble(this.maxNumericUpDown1.Maximum))
            {
                this.cursor1_2.Position = Convert.ToDouble(this.maxNumericUpDown1.Maximum);
                this.zedGraphControl1.Invalidate();
            }

            if (this.cursor2_1.Position < Convert.ToDouble(this.minNumericUpDown2.Minimum))
            {
                this.cursor2_1.Position = Convert.ToDouble(this.minNumericUpDown2.Minimum);
                this.zedGraphControl2.Invalidate();
            }

            if (this.cursor2_2.Position > Convert.ToDouble(this.maxNumericUpDown2.Maximum))
            {
                this.cursor2_2.Position = Convert.ToDouble(this.maxNumericUpDown2.Maximum);
                this.zedGraphControl2.Invalidate();
            }

            if (this.cursor3_1.Position < Convert.ToDouble(this.minNumericUpDown3.Minimum))
            {
                this.cursor3_1.Position = Convert.ToDouble(this.minNumericUpDown3.Minimum);
                this.zedGraphControl3.Invalidate();
            }

            if (this.cursor3_2.Position > Convert.ToDouble(this.maxNumericUpDown3.Maximum))
            {
                this.cursor3_2.Position = Convert.ToDouble(this.maxNumericUpDown3.Maximum);
                this.zedGraphControl3.Invalidate();
            }

            Tile.scaleMin[0] = this.cursor1_1.Position;
            Tile.scaleMax[0] = this.cursor1_2.Position;
            Tile.scaleMin[1] = this.cursor2_1.Position;
            Tile.scaleMax[1] = this.cursor2_2.Position;
            Tile.scaleMin[2] = this.cursor3_1.Position;
            Tile.scaleMax[2] = this.cursor3_2.Position;

            this.minNumericUpDown1.Value = Convert.ToDecimal(Tile.scaleMin[0]);
            this.maxNumericUpDown1.Value = Convert.ToDecimal(Tile.scaleMax[0]);
            this.minNumericUpDown2.Value = Convert.ToDecimal(Tile.scaleMin[1]);
            this.maxNumericUpDown2.Value = Convert.ToDecimal(Tile.scaleMax[1]);
            this.minNumericUpDown3.Value = Convert.ToDecimal(Tile.scaleMin[2]);
            this.maxNumericUpDown3.Value = Convert.ToDecimal(Tile.scaleMax[2]);

            this.mosaicWindow.TileView.Clear(); // This possibly clears the intermidiate image
            this.mosaicWindow.TileView.Redraw();
        }