本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
示例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);
}
示例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();
}
}
示例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);
}
}
示例11: InverseDistanceForm
internal InverseDistanceForm()
{
InitializeComponent();
color1Button.BackColor = InverseColors[0];
color2Button.BackColor = InverseColors[1];
m_Point1 = m_Point2 = null;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}