public override string ToString() { if (type == PointType.Sharp) { return(type.ToString()); } else if (type == PointType.CircleCorner) { return(string.Format("{0}:{1}", type.ToString(), radius.ToString())); } else { return(string.Format("{0}:{1},{2}", type.ToString(), controlPrev.ToString(), controlNext.ToString())); } }
string CreateProfile() { XElement profile = new XElement("Params", new XAttribute("HaveDimmer", HaveDimmer.ToString()), new XAttribute("PointType", PointType.ToString()) ); return(profile.ToString()); }
public static void Equal(PointType expected, PointType actual, int precision) { if (!expected.Equals(actual, precision)) { throw new EqualException( string.Format(CultureInfo.CurrentCulture, "Expected : {0}", expected.ToString("F" + precision)), string.Format(CultureInfo.CurrentCulture, "Actual : {0}", actual.ToString("F" + precision)) ); } }
public override string ToString() { if (string.IsNullOrEmpty(Name)) { return(Coordinates.FormatDMS((((((RA)) / 360) * 24.0 + 12) % 24)) + ", " + Coordinates.FormatDMS(Dec) + ", " + PointType.ToString()); } else { return(Name + ", " + PointType.ToString()); } }
/// <summary> /// xml로 저장시 값을 저장해줌 /// </summary> /// <returns></returns> public override Telerik.Windows.Diagrams.Core.SerializationInfo Serialize() { var result = base.Serialize(); result["Index"] = Index.ToString(); result["PointType"] = PointType.ToString(); result["NaviPointX"] = NaviPointX.ToString(); result["NaviPointY"] = NaviPointY.ToString(); //result["Description1"] = Description1 == null ? "" : Description1; //result["Description2"] = Description2 == null ? "" : Description2; //result["Description3"] = Description3 == null ? "" : Description3; //result["Description4"] = Description4 == null ? "" : Description4; //result["Description5"] = Description5 == null ? "" : Description5; return(result); }
/// <summary> /// Draw anchor and control points. When an anchor point is clicked, show a x,y,z handle to move it around /// (handle points at control pt if local space is enabled on the editor). Control points can be moved /// around by clicking and dragging them around. /// </summary> /// <param name="index"> Index of the point to be drawn</param> /// <param name="type"> Which point should be moved? Anchor, Control Left or Control Right? </param> void DrawPoint(int index, PointType type) { Vector3 pointPos = TargetSpline.GetPointAt(index, type, SplineCreatorRef.transform); Handles.color = type == PointType.Anchor ? Color.green : Color.red; if (Handles.Button(pointPos, Quaternion.identity, 0.1f, 0.06f, Handles.SphereHandleCap)) { ActiveIndex = index; ActiveType = type; } Quaternion handleRotation = Quaternion.identity; if (Tools.pivotRotation == PivotRotation.Local && type == PointType.Anchor) { handleRotation = Quaternion.LookRotation(TargetSpline.GetPointsAt(index).GetForwardDirection(type, SplineCreatorRef.transform)); } Vector3 newPosition = Vector3.zero; if (type == PointType.Anchor) { if (ActiveIndex != index || ActiveType != type) { return; } newPosition = Handles.DoPositionHandle(pointPos, handleRotation); } else { newPosition = Handles.FreeMoveHandle(pointPos, Quaternion.identity, .1f, Vector2.zero, Handles.SphereHandleCap); } if (pointPos != newPosition) { RecordUndo(SplineCreatorRef, "Move " + type.ToString() + " Point"); TargetSpline.SetPointPosition(index, type, SplineCreatorRef.transform.InverseTransformPoint(newPosition)); } }
public override string ToString() { return(Type.ToString() + Location.ToString()); }
private void Awake() { nameBoard.text = pointType.ToString(); }
public Point(Coordinates coordinates, PointType type = PointType.COORDINATE) { latitude = coordinates.latitude; longitude = coordinates.longitude; this.type = type.ToString(); }