예제 #1
0
        public DrawingPlane(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null)
        {
            // Decoration
            styleHelper.Color         = Color.Empty;
            styleHelper.GridDivisions = 8;
            styleHelper.Perspective   = true;
            styleHelper.ValueChanged += StyleHelper_ValueChanged;
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Plane");
            }

            style = preset.Clone();
            BindStyle();

            infosFading               = new InfosFading(timestamp, averageTimeStampsPerFrame);
            infosFading.UseDefault    = false;
            infosFading.AlwaysVisible = true;

            planeWidth  = 100;
            planeHeight = 100;
            quadPlane   = new QuadrilateralF(planeWidth, planeHeight);

            mnuCalibrate.Click += new EventHandler(mnuCalibrate_Click);
            mnuCalibrate.Image  = Properties.Drawings.linecalibrate;
        }
예제 #2
0
        public DrawingLine(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            points["a"]  = origin;
            points["b"]  = origin.Translate(10, 0);
            labelMeasure = new KeyframeLabel(GetMiddlePoint(), Color.Black, transformer);

            styleHelper.Color    = Color.DarkSlateGray;
            styleHelper.LineSize = 1;

            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Line");
            }

            style = preset.Clone();
            BindStyle();

            // Fading
            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            // Context menu
            mnuShowMeasure.Click += mnuShowMeasure_Click;
            mnuShowMeasure.Image  = Properties.Drawings.measure;
            mnuSealMeasure.Click += mnuSealMeasure_Click;
            mnuSealMeasure.Image  = Properties.Drawings.linecalibrate;
        }
예제 #3
0
        public DrawingPolyline(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null)
        {
            points["0"] = origin;
            points["1"] = origin;

            styleHelper.Color    = Color.DarkSlateGray;
            styleHelper.LineSize = 1;

            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Polyline");
            }

            style = preset.Clone();
            BindStyle();

            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            mnuFinish.Click        += mnuFinish_Click;
            mnuAddThenFinish.Click += mnuAddThenFinish_Click;
            mnuCloseMenu.Click     += mnuCloseMenu_Click;

            mnuFinish.Image        = Properties.Drawings.tick_small;
            mnuAddThenFinish.Image = Properties.Drawings.plus_small;
            mnuCloseMenu.Image     = Properties.Drawings.cross_small;
        }
예제 #4
0
        public DrawingText(Point p, long _iTimestamp, long _iAverageTimeStampsPerFrame, DrawingStyle _preset)
        {
            m_Text = " ";
            m_Background.Rectangle = new Rectangle(p, Size.Empty);

            // Decoration & binding with editors
            m_StyleHelper.Bicolor = new Bicolor(Color.Black);
            m_StyleHelper.Font    = new Font("Arial", m_iDefaultFontSize, FontStyle.Bold);
            if (_preset != null)
            {
                m_Style = _preset.Clone();
                BindStyle();
            }

            m_InfosFading = new InfosFading(_iTimestamp, _iAverageTimeStampsPerFrame);
            m_bEditMode   = false;

            m_TextBox = new TextBox()
            {
                Visible     = false,
                BackColor   = Color.White,
                BorderStyle = BorderStyle.None,
                Multiline   = true,
                Text        = m_Text,
                Font        = m_StyleHelper.GetFontDefaultSize(m_iDefaultFontSize)
            };

            m_TextBox.TextChanged += new EventHandler(TextBox_TextChanged);

            UpdateLabelRectangle();
        }
예제 #5
0
 public DrawingToolLine2D()
 {
     m_DefaultStylePreset.Elements.Add("color", new StyleElementColor(Color.LightGreen));
     m_DefaultStylePreset.Elements.Add("line size", new StyleElementLineSize(2));
     m_DefaultStylePreset.Elements.Add("arrows", new StyleElementLineEnding(LineEnding.None));
     m_StylePreset = m_DefaultStylePreset.Clone();
 }
예제 #6
0
        public DrawingAngle(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            int length = 50;

            if (transformer != null)
            {
                length = transformer.Untransform(50);
            }

            points.Add("o", origin);
            points.Add("a", origin.Translate(0, -length));
            points.Add("b", origin.Translate(length, 0));

            styleHelper.Bicolor = new Bicolor(Color.Empty);
            styleHelper.Font    = new Font("Arial", 12, FontStyle.Bold);

            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Angle");
            }

            style = preset.Clone();
            BindStyle();

            // Fading
            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            mnuInvertAngle.Click += mnuInvertAngle_Click;
            mnuInvertAngle.Image  = Properties.Drawings.angleinvert;
        }
예제 #7
0
        //------------------------------------------------------
        // Note:
        // When using the planar calibration, the projection of the circle in world space and back in image space
        // creates an ellipse whose center is not exactly on the center of the original circle.
        // This is why there are extra checks to move the minilabel attachment point everytime the drawing moves,
        // changes size, or when the calibration changes.
        //------------------------------------------------------

        #region Constructor
        public DrawingCircle(PointF center, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            this.center = center;
            miniLabel.SetAttach(center, true);

            if (transformer != null)
            {
                this.radius = transformer.Untransform(25);
            }

            this.radius      = Math.Min(radius, 10);
            this.infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            styleHelper.Color         = Color.Empty;
            styleHelper.LineSize      = 1;
            styleHelper.PenShape      = PenShape.Solid;
            styleHelper.ValueChanged += StyleHelper_ValueChanged;
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Circle");
            }

            style = preset.Clone();
            BindStyle();

            ReinitializeMenu();
        }
예제 #8
0
        public DrawingLine(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            points["a"] = origin;
            points["b"] = origin.Translate(10, 0);
            miniLabel.SetAttach(GetMiddlePoint(), true);

            styleHelper.Color         = Color.DarkSlateGray;
            styleHelper.LineSize      = 1;
            styleHelper.LineShape     = LineShape.Solid;
            styleHelper.LineEnding    = LineEnding.None;
            styleHelper.ValueChanged += StyleHelper_ValueChanged;
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Line");
            }

            style = preset.Clone();
            BindStyle();

            // Fading
            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            // Context menu
            ReinitializeMenu();
            mnuCalibrate.Click += mnuCalibrate_Click;
            mnuCalibrate.Image  = Properties.Drawings.linecalibrate;
        }
예제 #9
0
        public DrawingChrono(Point p, long start, long _AverageTimeStampsPerFrame, DrawingStyle _preset)
        {
            // Core
            m_iVisibleTimestamp       = start;
            m_iStartCountingTimestamp = long.MaxValue;
            m_iStopCountingTimestamp  = long.MaxValue;
            m_iInvisibleTimestamp     = long.MaxValue;
            m_bCountdown = false;
            m_MainBackground.Rectangle = new Rectangle(p, Size.Empty);

            m_Timecode = "error";

            m_StyleHelper.Bicolor = new Bicolor(Color.Black);
            m_StyleHelper.Font    = new Font("Arial", 16, FontStyle.Bold);
            if (_preset != null)
            {
                m_Style = _preset.Clone();
                BindStyle();
            }

            m_Label      = "";
            m_bShowLabel = true;

            // We use the InfosFading utility to fade the chrono away.
            // The refererence frame will be the frame at which fading start.
            // Must be updated on "Hide" menu.
            m_InfosFading = new InfosFading(m_iInvisibleTimestamp, _AverageTimeStampsPerFrame);
            m_InfosFading.FadingFrames = m_iAllowedFramesOver;
            m_InfosFading.UseDefault   = false;
        }
예제 #10
0
        public DrawingToolText()
        {
            m_DefaultStylePreset.Elements.Add("back color", new StyleElementColor(Color.CornflowerBlue));
            m_DefaultStylePreset.Elements.Add("font size", new StyleElementFontSize(12));

            m_StylePreset = m_DefaultStylePreset.Clone();
        }
예제 #11
0
        public DrawingText(PointF p, long timestamp, long averageTimeStampsPerFrame, DrawingStyle stylePreset)
        {
            text = " ";
            background.Rectangle = new RectangleF(p, SizeF.Empty);

            styleHelper.Bicolor = new Bicolor(Color.Black);
            styleHelper.Font    = new Font("Arial", defaultFontSize, FontStyle.Bold);

            if (stylePreset != null)
            {
                style = stylePreset.Clone();
                BindStyle();
            }

            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);
            editing     = false;

            textBox = new TextBox()
            {
                Visible     = false,
                BackColor   = Color.White,
                BorderStyle = BorderStyle.None,
                Multiline   = true,
                Text        = text,
                Font        = styleHelper.GetFontDefaultSize(defaultFontSize)
            };

            textBox.TextChanged += TextBox_TextChanged;
            UpdateLabelRectangle();
        }
예제 #12
0
        public DrawingAngle(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            int length = 50;

            if (transformer != null)
            {
                length = transformer.Untransform(50);
            }

            points.Add("o", origin);
            points.Add("a", origin.Translate(length, 0));
            points.Add("b", origin.Translate(0, -length));

            styleHelper.Bicolor = new Bicolor(Color.Empty);
            styleHelper.Font    = new Font("Arial", 12, FontStyle.Bold);

            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Angle");
            }

            style = preset.Clone();
            BindStyle();

            // Fading
            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            mnuSignedAngle.Click         += mnuSignedAngle_Click;
            mnuSignedAngle.Checked        = signedAngle;
            mnuCounterClockwise.Click    += mnuCounterClockwise_Click;
            mnuCounterClockwise.Checked   = counterClockwise;
            mnuSupplementaryAngle.Click  += mnuSupplementaryAngle_Click;
            mnuSupplementaryAngle.Checked = supplementaryAngle;
        }
예제 #13
0
        public DrawingChrono(PointF p, long start, long averageTimeStampsPerFrame, DrawingStyle preset = null)
        {
            // Core
            visibleTimestamp       = start;
            startCountingTimestamp = long.MaxValue;
            stopCountingTimestamp  = long.MaxValue;
            invisibleTimestamp     = long.MaxValue;
            countdown = false;
            mainBackground.Rectangle = new RectangleF(p, SizeF.Empty);

            timecode = "error";

            styleHelper.Bicolor = new Bicolor(Color.Black);
            styleHelper.Font    = new Font("Arial", 16, FontStyle.Bold);

            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Chrono");
            }

            style = preset.Clone();
            BindStyle();

            label     = "";
            showLabel = true;

            // We use the InfosFading utility to fade the chrono away.
            // The refererence frame will be the frame at which fading start.
            // Must be updated on "Hide" menu.
            infosFading = new InfosFading(invisibleTimestamp, averageTimeStampsPerFrame);
            infosFading.FadingFrames = allowedFramesOver;
            infosFading.UseDefault   = false;
        }
예제 #14
0
 public AutoNumberManager(DrawingStyle preset)
 {
     styleHelper.Bicolor = new Bicolor(Color.Black);
     styleHelper.Font    = new Font("Arial", defaultFontSize, FontStyle.Bold);
     if (preset != null)
     {
         style = preset.Clone();
         BindStyle();
     }
 }
예제 #15
0
        public DrawingChrono(PointF p, long start, long averageTimeStampsPerFrame, DrawingStyle preset = null)
        {
            // Core
            visibleTimestamp         = 0;
            startCountingTimestamp   = long.MaxValue;
            stopCountingTimestamp    = long.MaxValue;
            invisibleTimestamp       = long.MaxValue;
            clockOriginTimestamp     = long.MaxValue;
            mainBackground.Rectangle = new RectangleF(p, SizeF.Empty);

            timecode = "error";

            styleHelper.Bicolor = new Bicolor(Color.Black);
            styleHelper.Font    = new Font("Arial", 16, FontStyle.Bold);
            styleHelper.Clock   = false;
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Chrono");
            }

            style = preset.Clone();
            BindStyle();

            label     = "";
            showLabel = true;

            // We use the InfosFading utility to fade the chrono away.
            // The refererence frame will be the frame at which fading start.
            // Must be updated on "Hide" menu.
            infosFading = new InfosFading(invisibleTimestamp, averageTimeStampsPerFrame);
            infosFading.FadingFrames = allowedFramesOver;
            infosFading.UseDefault   = false;

            mnuVisibility.Image  = Properties.Drawings.persistence;
            mnuShowBefore.Image  = Properties.Drawings.showbefore;
            mnuShowAfter.Image   = Properties.Drawings.showafter;
            mnuHideBefore.Image  = Properties.Drawings.hidebefore;
            mnuHideAfter.Image   = Properties.Drawings.hideafter;
            mnuShowBefore.Click += MnuShowBefore_Click;
            mnuShowAfter.Click  += MnuShowAfter_Click;
            mnuHideBefore.Click += MnuHideBefore_Click;
            mnuHideAfter.Click  += MnuHideAfter_Click;
            mnuVisibility.DropDownItems.AddRange(new ToolStripItem[] { mnuShowBefore, mnuShowAfter, new ToolStripSeparator(), mnuHideBefore, mnuHideAfter });

            mnuStart.Image       = Properties.Drawings.chronostart;
            mnuStop.Image        = Properties.Drawings.chronostop;
            mnuMarkOrigin.Image  = Properties.Resources.marker;
            mnuStart.Click      += mnuStart_Click;
            mnuStop.Click       += mnuStop_Click;
            mnuMarkOrigin.Click += mnuMarkOrigin_Click;
        }
예제 #16
0
        public DrawingPencil(Point _origin, Point _second, long _iTimestamp, long _AverageTimeStampsPerFrame, DrawingStyle _preset)
        {
            m_PointList.Add(_origin);
            m_PointList.Add(_second);
            m_InfosFading = new InfosFading(_iTimestamp, _AverageTimeStampsPerFrame);

            m_StyleHelper.Color    = Color.Black;
            m_StyleHelper.LineSize = 1;
            if (_preset != null)
            {
                m_Style = _preset.Clone();
                BindStyle();
            }
        }
예제 #17
0
        public DrawingTool(Guid id, string name, string displayName, Bitmap icon, Type drawingType, bool attached, bool keepToolAfterDrawingCreation, bool keepToolAfterFrameChange, DrawingStyle defaultStyle)
        {
            this.id          = id;
            this.name        = name;
            this.displayName = displayName;
            this.icon        = icon;
            this.drawingType = drawingType;
            this.attached    = attached;
            this.keepToolAfterDrawingCreation = keepToolAfterDrawingCreation;
            this.keepToolAfterFrameChange     = keepToolAfterFrameChange;
            this.defaultStyle = defaultStyle;

            this.currentStyle = defaultStyle.Clone();
        }
예제 #18
0
        public DrawingPencil(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            pointList.Add(origin);
            pointList.Add(origin.Translate(1, 0));
            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            styleHelper.Color    = Color.Black;
            styleHelper.LineSize = 1;
            if (preset != null)
            {
                style = preset.Clone();
                BindStyle();
            }
        }
예제 #19
0
        public DrawingCircle(Point _center, int radius, long _iTimestamp, long _iAverageTimeStampsPerFrame, DrawingStyle _preset)
        {
            m_Center      = _center;
            m_iRadius     = Math.Min(radius, 10);
            m_InfosFading = new InfosFading(_iTimestamp, _iAverageTimeStampsPerFrame);

            m_StyleHelper.Color    = Color.Empty;
            m_StyleHelper.LineSize = 1;
            if (_preset != null)
            {
                m_Style = _preset.Clone();
                BindStyle();
            }
        }
예제 #20
0
        public DrawingRectangle(PointF origin, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            quadImage = new QuadrilateralF(origin, origin.Translate(50, 0), origin.Translate(50, 50), origin.Translate(0, 50));

            styleHelper.Color    = Color.Empty;
            styleHelper.LineSize = 1;
            styleHelper.PenShape = PenShape.Solid;
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Rectangle");
            }

            style = preset.Clone();
            BindStyle();

            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);
        }
        public DrawingDistortionGrid(PointF point, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null)
        {
            styleHelper.Color = Color.Empty;
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("DistortionGrid");
            }

            style = preset.Clone();
            BindStyle();

            infosFading               = new InfosFading(timestamp, averageTimeStampsPerFrame);
            infosFading.UseDefault    = true;
            infosFading.AlwaysVisible = false;

            mnuCalibrate.Click += new EventHandler(mnuCalibrate_Click);
            mnuCalibrate.Image  = Properties.Drawings.linecalibrate;
        }
예제 #22
0
        public DrawingPlane(int _divisions, bool _support3D, long _iTimestamp, long _iAverageTimeStampsPerFrame, DrawingStyle _preset)
        {
            m_iDivisions = _divisions == 0 ? m_iDefaultDivisions : _divisions;
            m_bSupport3D = _support3D;

            // Decoration
            m_StyleHelper.Color = Color.Empty;
            if (_preset != null)
            {
                m_Style = _preset.Clone();
                BindStyle();
            }

            m_InfosFading               = new InfosFading(_iTimestamp, _iAverageTimeStampsPerFrame);
            m_InfosFading.UseDefault    = false;
            m_InfosFading.AlwaysVisible = true;

            RedefineHomography();
        }
예제 #23
0
        public DrawingCrossMark(PointF center, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset, IImageToViewportTransformer transformer)
        {
            points["0"]      = center;
            labelCoordinates = new KeyframeLabel(points["0"], Color.Black, transformer);

            // Decoration & binding with editors
            styleHelper.Color = Color.CornflowerBlue;
            if (preset != null)
            {
                style = preset.Clone();
                BindStyle();
            }

            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            // Context menu
            mnuShowCoordinates.Click += new EventHandler(mnuShowCoordinates_Click);
            mnuShowCoordinates.Image  = Properties.Drawings.measure;
        }
예제 #24
0
        public DrawingCross2D(Point _center, long _iTimestamp, long _iAverageTimeStampsPerFrame, DrawingStyle _preset)
        {
            m_Center           = _center;
            m_LabelCoordinates = new KeyframeLabel(m_Center, Color.Black);

            // Decoration & binding with editors
            m_StyleHelper.Color = Color.CornflowerBlue;
            if (_preset != null)
            {
                m_Style = _preset.Clone();
                BindStyle();
            }

            m_InfosFading = new InfosFading(_iTimestamp, _iAverageTimeStampsPerFrame);

            // Context menu
            mnuShowCoordinates.Click += new EventHandler(mnuShowCoordinates_Click);
            mnuShowCoordinates.Image  = Properties.Drawings.measure;
        }
예제 #25
0
        public DrawingText(PointF p, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null)
        {
            text = "";
            background.Rectangle = new RectangleF(p, SizeF.Empty);
            arrowEnd             = p.Translate(-50, -50);
            showArrow            = false;

            styleHelper.Bicolor = new Bicolor(Color.Black);
            styleHelper.Font    = new Font("Arial", defaultFontSize, FontStyle.Bold);
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Label");
            }

            style = preset.Clone();
            BindStyle();

            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);
            editing     = false;

            fontText = styleHelper.GetFontDefaultSize(defaultFontSize);

            textBox = new TextBox()
            {
                Visible     = false,
                BackColor   = Color.White,
                BorderStyle = BorderStyle.None,
                Multiline   = true,
                Text        = text,
                Font        = fontText
            };

            textBox.Margin    = new Padding(0, 0, 0, 0);
            textBox.TextAlign = HorizontalAlignment.Left;
            textBox.WordWrap  = false;

            textBox.TextChanged += TextBox_TextChanged;
            UpdateLabelRectangle();

            mnuShowArrow.Click += new EventHandler(mnuShowArrow_Click);
            mnuShowArrow.Image  = Properties.Drawings.arrow;
        }
예제 #26
0
        public DrawingCrossMark(PointF center, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            points["0"] = center;
            miniLabel   = new MiniLabel(points["0"], Color.Black, transformer);

            // Decoration & binding with editors
            styleHelper.Color         = Color.CornflowerBlue;
            styleHelper.ValueChanged += StyleHelper_ValueChanged;
            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("CrossMark");
            }

            style = preset.Clone();
            BindStyle();

            infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            ReinitializeMenu();
        }
예제 #27
0
        public DrawingCircle(PointF center, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset = null, IImageToViewportTransformer transformer = null)
        {
            this.center = center;

            if (transformer != null)
            {
                this.radius = transformer.Untransform(25);
            }

            this.radius      = Math.Min(radius, 10);
            this.infosFading = new InfosFading(timestamp, averageTimeStampsPerFrame);

            styleHelper.Color    = Color.Empty;
            styleHelper.LineSize = 1;

            if (preset == null)
            {
                preset = ToolManager.GetStylePreset("Circle");
            }

            style = preset.Clone();
            BindStyle();
        }
예제 #28
0
        public DrawingPlane(bool inPerspective, long timestamp, long averageTimeStampsPerFrame, DrawingStyle preset)
        {
            this.inPerspective = inPerspective;

            // Decoration
            styleHelper.Color         = Color.Empty;
            styleHelper.GridDivisions = 8;
            if (preset != null)
            {
                style = preset.Clone();
                BindStyle();
            }

            infosFading               = new InfosFading(timestamp, averageTimeStampsPerFrame);
            infosFading.UseDefault    = false;
            infosFading.AlwaysVisible = true;

            planeWidth  = 100;
            planeHeight = 100;
            quadPlane   = new QuadrilateralF(planeWidth, planeHeight);

            mnuCalibrate.Click += new EventHandler(mnuCalibrate_Click);
            mnuCalibrate.Image  = Properties.Drawings.linecalibrate;
        }
        public DrawingCoordinateSystem(Point origin, DrawingStyle stylePreset)
        {
            points["0"] = origin;

            // Decoration & binding with editors
            styleHelper.Bicolor = new Bicolor(Color.Empty);
            styleHelper.Font    = new Font("Arial", 8, FontStyle.Bold);
            if (stylePreset != null)
            {
                style = stylePreset.Clone();
                BindStyle();
            }

            // Context menu
            menuShowAxis.Click        += menuShowAxis_Click;
            menuShowGrid.Click        += menuShowGrid_Click;
            menuShowGraduations.Click += menuShowGraduations_Click;
            menuHide.Click            += menuHide_Click;

            menuShowAxis.Image        = Properties.Drawings.coordinates_axis;
            menuShowGrid.Image        = Properties.Drawings.coordinates_grid;
            menuShowGraduations.Image = Properties.Drawings.coordinates_graduations;
            menuHide.Image            = Properties.Drawings.hide;
        }
예제 #30
0
        public DrawingAngle2D(Point o, Point a, Point b, long _iTimestamp, long _iAverageTimeStampsPerFrame, DrawingStyle _stylePreset)
        {
            // Core
            m_PointO = o;
            m_PointA = a;
            m_PointB = b;
            ComputeValues();

            // Decoration and binding to mini editors.
            m_StyleHelper.Bicolor = new Bicolor(Color.Empty);
            m_StyleHelper.Font    = new Font("Arial", 12, FontStyle.Bold);
            if (_stylePreset != null)
            {
                m_Style = _stylePreset.Clone();
                BindStyle();
            }

            // Fading
            m_InfosFading = new InfosFading(_iTimestamp, _iAverageTimeStampsPerFrame);

            // Context menu
            m_mnuInvertAngle.Click += new EventHandler(mnuInvertAngle_Click);
            m_mnuInvertAngle.Image  = Properties.Drawings.angleinvert;
        }