• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# PointFeature类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AngleDirection

 /// <summary>
 /// Initializes a new instance of the <see cref="AngleDirection"/> class
 /// using the data read from persistent storage.
 /// </summary>
 /// <param name="editDeserializer">The mechanism for reading back content.</param>
 internal AngleDirection(EditDeserializer editDeserializer)
     : base(editDeserializer)
 {
     m_Backsight = editDeserializer.ReadFeatureRef<PointFeature>(this, DataField.Backsight);
     m_From = editDeserializer.ReadFeatureRef<PointFeature>(this, DataField.From);
     m_Observation = editDeserializer.ReadRadians(DataField.Value);
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:12,代码来源:AngleDirection.cs


示例2: NewLineUI

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="cc">Object for holding any displayed dialogs</param>
 /// <param name="action">The action that initiated this command</param>
 /// <param name="start">Point initially selected at start of command</param>
 internal NewLineUI(IControlContainer cc, IUserAction action, PointFeature start)
     : base(cc, action)
 {
     m_Start = start;
     m_End = null;
     m_CurrentPoint = start;
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:13,代码来源:NewLineUI.cs


示例3: ParallelDirection

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="from">The point the direction is from.</param>
 /// <param name="par1">The first point in the definition of the parallel line.</param>
 /// <param name="par2">The second point defining the parallel line.</param>
 internal ParallelDirection(PointFeature from, PointFeature par1, PointFeature par2)
     : base()
 {
     m_From = from;
     m_Par1 = par1;
     m_Par2 = par2;
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:13,代码来源:ParallelDirection.cs


示例4: NewCircularArcUI

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="cc">Object for holding any displayed dialogs</param>
 /// <param name="action">The action that initiated this command</param>
 /// <param name="start">Point initially selected at start of command</param>
 internal NewCircularArcUI(IControlContainer cc, IUserAction action, PointFeature start)
     : base(cc, action, start)
 {
     m_IsShortArc = true;
     m_Circles = null;
     m_NewArcCircle = null;
     m_Geom = null;
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:14,代码来源:NewCircularArcUI.cs


示例5: RadialUI

        /// <summary>
        /// Constructor for performing a sideshot from the currently selected point.
        /// </summary>
        /// <param name="cc">The container for any dialogs</param>
        /// <param name="action">The action that initiated this command</param>
        /// <exception cref="InvalidOperationException">If a specific point is not currently selected</exception>
        internal RadialUI(IControlContainer cc, IUserAction action)
            : base(cc, action)
        {
            PointFeature from = EditingController.SelectedPoint;
            if (from == null)
                throw new InvalidOperationException("You must initially select the point the sideshot radiates from.");

            m_Dialog = null;
            m_From = from;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:16,代码来源:RadialUI.cs


示例6: PathOperation

        /// <summary>
        /// Initializes a new instance of the <see cref="PathOperation"/> class
        /// </summary>
        /// <param name="from"></param>
        /// <param name="to"></param>
        /// <param name="entryString"></param>
        internal PathOperation(PointFeature from, PointFeature to, string entryString, DistanceUnit defaultEntryUnit)
            : base()
        {
            m_From = from;
            m_To = to;
            m_EntryString = entryString;
            m_DefaultEntryUnit = defaultEntryUnit;

            Leg[] legs = PathParser.CreateLegs(m_EntryString, m_DefaultEntryUnit);
            uint lastId = PrepareLegs(this.EditSequence, legs);
            EditingController.Current.Project.SetLastItem(lastId);

            m_Legs = new List<Leg>(legs);
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:20,代码来源:PathOperation.cs


示例7: Execute

        /// <summary>
        /// Creates a new simple line segment.
        /// </summary>
        /// <param name="start">The point at the start of the new line.</param>
        /// <param name="end">The point at the end of the new line.</param>
        /// <remarks>When you add a new line segment, the two end points will be referenced both to the
        /// new line, and to the editing operation that defined the line. While this is a bit verbose,
        /// it's consistent.</remarks>
        internal void Execute(PointFeature start, PointFeature end)
        {
            // Disallow an attempt to add a null line.
            if (start.Geometry.IsCoincident(end.Geometry))
                throw new Exception("NewLineOperation.Execute - Attempt to add null line.");

            // Add the new line with default entity type.
            CadastralMapModel mapModel = this.MapModel;
            LineFeature newLine = mapModel.AddLine(start, end, mapModel.DefaultLineType, this);
            base.SetNewLine(newLine);

            // Peform standard completion steps
            Complete();
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:22,代码来源:NewSegmentOperation.cs


示例8: OnSelectPoint

        internal void OnSelectPoint(PointFeature point)
        {
            // Return if point is not defined.
            if (point==null)
                return;

            // Get rid of any existing offset.
            m_Offset = null;

            // Create an offset point object.
            m_Offset = new OffsetPoint(point);

            // Display the key of the offset point.
            offsetTextBox.Text = String.Format("+{0}", point.FormattedKey);

            // Disable the left-right radio buttons.
            leftRadioButton.Enabled = rightRadioButton.Enabled = false;

            // Tell the command.
            m_Cmd.SetOffset(m_Offset);
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:21,代码来源:GetOffsetForm.cs


示例9: 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


示例10: 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


示例11: AddNewLine

        /// <summary>
        /// Adds a new circular arc feature.
        /// </summary>
        /// <param name="end"></param>
        internal override void AddNewLine(PointFeature end)
        {
            NewArcOperation op = null;

            try
            {
                op = new NewArcOperation();
                op.Execute(StartPoint, end, m_NewArcCircle, m_IsShortArc);
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace, ex.Message);
            }
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:19,代码来源:NewCircularArcUI.cs


示例12: Paint

        /// <summary>
        /// Do any command-specific drawing.
        /// </summary>
        /// <param name="point">The specific point (if any) that the parent window has drawn.
        /// Not used.</param>
        internal override void Paint(PointFeature point)
        {
            if (m_LastPosition != null)
            {
                // Draw gray text in the original position
                ISpatialDisplay display = ActiveDisplay;
                m_Text.Draw(display, Color.Gray);

                // Draw the text at the last mouse position
                IPointGeometry p = m_Text.Position;
                try
                {
                    m_Text.TextGeometry.Position = m_LastPosition;
                    m_Text.Draw(display, Color.Red);
                }

                finally
                {
                    m_Text.TextGeometry.Position = p;
                }
            }
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:27,代码来源:MoveTextUI.cs


示例13: SetNormalColor

 /// <summary>
 /// Ensure that a point is drawn with it's "normal" color.
 /// </summary>
 /// <param name="point">The point to set the color for.</param>
 void SetNormalColor(PointFeature point)
 {
     // Redraw in idle time
     if (point!=null)
         ErasePainting();
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:10,代码来源:NewCircleForm.cs


示例14: NewCircleOperation

 /// <summary>
 /// Initializes a new instance of the <see cref="NewCircleOperation"/> class
 /// </summary>
 /// <param name="center">The point at the center of the circle.</param>
 /// <param name="radius">The radius of the circle (either a <see cref="Distance"/> object,
 /// or an <see cref="OffsetPoint"/> that sits on the circumference of the circle.</param>
 internal NewCircleOperation(PointFeature center, Observation radius)
     : base()
 {
     m_Center = center;
     m_Radius = radius;
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:12,代码来源:NewCircleOperation.cs


示例15: ApplyFeatureRef

        /// <summary>
        /// Ensures that a persistent field has been associated with a spatial feature.
        /// </summary>
        /// <param name="field">A tag associated with the item</param>
        /// <param name="feature">The feature to assign to the field (not null).</param>
        /// <returns>
        /// True if a matching field was processed. False if the field is not known to this
        /// class (may be known to another class in the type hierarchy).
        /// </returns>
        public bool ApplyFeatureRef(DataField field, Feature feature)
        {
            switch (field)
            {
                case DataField.Backsight:
                    m_Backsight = (PointFeature)feature;
                    return true;

                case DataField.From:
                    m_From = (PointFeature)feature;
                    return true;

            }

            return false;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:25,代码来源:AngleDirection.cs


示例16: AppendToLine

        /// <summary>
        /// Appends a point to the new line. If it's the second point, the new line
        /// will be added to the map.
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        internal override bool AppendToLine(PointFeature p)
        {
            // If the start point is not defined, just remember it (ensuring
            // that the point coincides with at least one circle).
            if (StartPoint == null)
            {
                m_Circles = CadastralMapModel.Current.FindCircles(p, CircleTolerance);
                if (m_Circles.Count == 0)
                {
                    MessageBox.Show("Selected point does not coincide with any circles.");
                    return false;
                }

                return base.AppendToLine(p);
            }

            // Get the circles that pass through the selected point.
            List<Circle> circles = CadastralMapModel.Current.FindCircles(p, CircleTolerance);
            if (circles.Count == 0)
            {
                MessageBox.Show("Selected point does not coincide with any circles.");
                //SetLineCursor();
                return false;
            }

            // The point MUST coincide with one of the circles that
            // were found at the start point.
            List<Circle> comlist = Circle.GetCommonCircles(m_Circles, circles);
            if (comlist.Count == 0)
            {
                string msg = String.Empty;
                msg += ("Selected end point does not coincide with any of" + System.Environment.NewLine);
                msg += ("the circles that pass through the start point.");
                MessageBox.Show(msg);
                //SetLineCursor();
                return false;
            }

            // Could we have more than 1 to choose from?
            if (comlist.Count > 1)
            {
                string msg = String.Empty;
                msg += ("More than one circle is common to the start" + System.Environment.NewLine);
                msg += ("and the end point. Don't know what to do.");
                MessageBox.Show(msg);
                //SetLineCursor();
                return false;
            }

            // Remember the common circle (for the AddNewLine override)
            m_NewArcCircle = comlist[0];

            return base.AppendToLine(p);
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:60,代码来源:NewCircularArcUI.cs


示例17: Paint

        internal override void Paint(PointFeature point)
        {
            // If applicable circles are defined, ensure they show
            if (m_Circles != null)
            {
                ISpatialDisplay display = ActiveDisplay;
                IDrawStyle style = new DottedStyle(Color.Magenta);
                foreach (Circle c in m_Circles)
                    c.Render(display, style);
            }

            base.Paint(point);
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:13,代码来源:NewCircularArcUI.cs


示例18: InverseDistanceForm

        internal InverseDistanceForm()
        {
            InitializeComponent();
            color1Button.BackColor = InverseColors[0];
            color2Button.BackColor = InverseColors[1];

            m_Point1 = m_Point2 = null;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:8,代码来源:InverseDistanceForm.cs


示例19: InverseDistanceAngleForm

        public InverseDistanceAngleForm()
        {
            InitializeComponent();
            color1Button.BackColor = InverseColors[0];
            color2Button.BackColor = InverseColors[1];
            color3Button.BackColor = InverseColors[2];

            m_Point1 = m_Point2 = m_Point3 = null;
            m_Clockwise = true;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:10,代码来源:InverseDistanceAngleForm.cs


示例20: AttachPointOperation

        /// <summary>
        /// Initializes a new instance of the <see cref="AttachPointOperation"/> class.
        /// </summary>
        /// <param name="line">The line the point should appear on.</param>
        /// <param name="positionRatio">The position ratio of the attached point. A point coincident with the start
        /// of the line is a value of 0. A point at the end of the line is a value of
        /// 1 billion  (1,000,000,000).</param>
        internal AttachPointOperation(LineFeature line, uint positionRatio)
            : base()
        {
            if (line == null)
                throw new ArgumentNullException();

            m_Line = line;
            m_PositionRatio = positionRatio;
            m_Point = null;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:17,代码来源:AttachPointOperation.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PointLatLng类代码示例发布时间:2022-05-24
下一篇:
C# PointF类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap