Beispiel #1
0
        /// <summary>
        /// 启动测量命令
        /// </summary>
        /// <returns></returns>
        public MeasureCommand MeasureCommand()
        {
            var c = new MeasureCommand();

            DrawingControl.SetAction(c);
            return(c);
        }
Beispiel #2
0
        /// <summary>
        /// 显示测量线
        /// </summary>
        public MeasureCommand MeasureAction(Color?penColor = null, int lineWidth = 1, Color?fill = null, dynamic Element = null)
        {
            if (penColor == null)
            {
                penColor = Colors.Black;
            }
            var a = new MeasureCommand();

            a.Geometry.PenColor  = penColor.Value;
            a.Geometry.LineWidth = lineWidth;
            a.Geometry.Element   = Element;
            if (fill != null)
            {
                a.Geometry.FillColor = fill.Value;
            }
            DrawingControl.SetAction(a);
            LastAction = a;
            return(a);
        }
Beispiel #3
0
 /// <summary>
 /// 测量命令
 /// </summary>
 /// <param name="c"></param>
 private void SetAction(MeasureCommand c)
 {
     tip = new SubMeasureTip(DrawingControl, textTip);
     tip.Attention(c);
 }