当前位置: 首页>>代码示例>>C#>>正文


C# PointFeature.Draw方法代码示例

本文整理汇总了C#中PointFeature.Draw方法的典型用法代码示例。如果您正苦于以下问题:C# PointFeature.Draw方法的具体用法?C# PointFeature.Draw怎么用?C# PointFeature.Draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PointFeature的用法示例。


在下文中一共展示了PointFeature.Draw方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnSelectPoint

        /// <summary>
        /// Reacts to selection of a point on the map.
        /// </summary>
        /// <param name="point"></param>
        internal void OnSelectPoint(PointFeature point)
        {
            // Return if point is not defined.
            if (point==null)
                return;

            // Handle the pointing, depending on what field we were last in.
            if (m_Focus == centerTextBox)
            {
                // Draw any previously selected center point normally.
                SetNormalColor(m_Center);

                // Grab the new centre point.
                m_Center = point;

                // Draw the point in appropriate color.
                m_Center.Draw(ActiveDisplay, Color.Cyan);

                // Display its key (causes a call to OnChangeCentre).
                centerTextBox.Text = String.Format("+{0}", m_Center.FormattedKey);

                // Move focus to the radius field.
                radiusTextBox.Focus();
            }
            else if (m_Focus == radiusTextBox)
            {
                // The radius must be getting specified by pointing at an offset point.

                // Ensure that any previously selected offset point is
                // drawn in its normal colout.
                SetNormalColor(m_RadiusPoint);

                // Grab the new offset point.
                m_RadiusPoint = point;

                // Draw the point in appropriate colour.
                m_RadiusPoint.Draw(ActiveDisplay, Color.Yellow);

                // Display the point number.
                radiusTextBox.Text = String.Format("+{0}", m_RadiusPoint.FormattedKey);

                // Ensure any radius circle has been refreshed.
                OnChange();

                // Move focus to the OK button.
                okButton.Focus();
            }
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:52,代码来源:NewCircleForm.cs

示例2: SetColor

        /// <summary>
        /// Draws the supplied point with a color that's consistent with the
        /// meaning of a control appearing on this dialog.
        /// </summary>
        /// <param name="point">The point to draw</param>
        /// <param name="field">The control the point relates to
        /// (default was the field that currently has the focus)
        /// </param>
        void SetColor(PointFeature point, Control field)
        {
            // Return if point not specified.
            if (point==null)
                return;

            // Determine the color.
            Color col;

            if (field == backsightTextBox)
                col = Color.DarkBlue;
            else if (field == fromPointTextBox)
                col = Color.Cyan;
            else if (field == directionTextBox)
                col = Color.Yellow;
            else if (field == offsetTextBox)
                col = Color.LightGreen;
            else
                return;

            // Draw the point in the proper color.
            point.Draw(ActiveDisplay, col);
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:31,代码来源:GetDirectionControl.cs

示例3: Draw

 internal void Draw(PointFeature point)
 {
     if (point==null)
         PaintAll();
     else
     {
         if (Object.ReferenceEquals(point, m_Center))
             point.Draw(ActiveDisplay, Color.Cyan);
         else if (Object.ReferenceEquals(point, m_RadiusPoint))
             point.Draw(ActiveDisplay, Color.Yellow);
     }
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:12,代码来源:NewCircleForm.cs

示例4: SetColor

        /// <summary>
        /// Draws the supplied point with a color that's consistent with the
        /// meaning of a control appearing on this dialog.
        /// </summary>
        /// <param name="point">The point to draw</param>
        /// <param name="field">The control the point relates to
        /// (default was the field that currently has the focus)
        /// </param>
        void SetColor(PointFeature point, Control field)
        {
            // Return if point not specified.
            if (point==null)
                return;

            // Determine the color.
            Color col;

            if (field == fromPointTextBox)
                col = Color.Cyan;
            else if (field == distanceTextBox)
                col = Color.Yellow;
            else
                return;

            // Draw the point in the proper color.
            point.Draw(ActiveDisplay, col);
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:27,代码来源:GetDistanceControl.cs


注:本文中的PointFeature.Draw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。