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


C# PointFeature类代码示例

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


PointFeature类属于命名空间,在下文中一共展示了PointFeature类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: InverseDistanceForm

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

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

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

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

示例14: LineExtensionOperation

        /// <summary>
        /// Initializes a new instance of the <see cref="LineExtensionOperation"/> class
        /// </summary>
        /// <param name="extendLine">The line that's being extended.</param>
        /// <param name="isFromEnd">True if extending from the end | False from the start.</param>
        /// <param name="length">The length of the extension.</param>
        internal LineExtensionOperation(LineFeature extendLine, bool isFromEnd, Distance length)
            : base()
        {
            m_ExtendLine = extendLine;
            m_IsExtendFromEnd = isFromEnd;
            m_Length = length;

            m_NewLine = null;
            m_NewPoint = null;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:16,代码来源:LineExtensionOperation.cs

示例15: GetPointForm

        /// <summary>
        /// Creates a new <c>GetPointForm</c>
        /// </summary>
        /// <param name="cmd">The parent command.</param>
        /// <param name="title">The title for the window.</param>
        /// <param name="col">The color hint for the point.</param>
        /// <param name="enableBack">Should the "back" button be enabled?</param>
        internal GetPointForm(PathUI cmd, string title, Color col, bool enableBack)
        {
            InitializeComponent();

            m_Parent = cmd;
            m_Point = null;
            m_Color = col;
            m_Title = title;
            m_IsPointed = false;
            m_IsBackEnabled = enableBack;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:18,代码来源:GetPointForm.cs


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