public override void WriteGroupCodes() { int flags; WriteGroupCodeValue(10, X0.ToString().Trim()); WriteGroupCodeValue(20, Y0.ToString().Trim()); WriteGroupCodeValue(30, Z0.ToString().Trim()); WriteGroupCodeValue(11, X1.ToString().Trim()); WriteGroupCodeValue(21, Y1.ToString().Trim()); WriteGroupCodeValue(31, Z1.ToString().Trim()); WriteGroupCodeValue(12, X2.ToString().Trim()); WriteGroupCodeValue(22, Y2.ToString().Trim()); WriteGroupCodeValue(32, Z2.ToString().Trim()); WriteGroupCodeValue(13, X3.ToString().Trim()); WriteGroupCodeValue(23, Y3.ToString().Trim()); WriteGroupCodeValue(33, Z3.ToString().Trim()); flags = 0; if(Edge1Invisible) flags += 1; if(Edge2Invisible) flags += 2; if(Edge3Invisible) flags += 4; if(Edge4Invisible) flags += 8; WriteGroupCodeValue(70, flags.ToString().Trim()); }
public bool Equals([AllowNull] Shape other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) && (Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) && (Layer == other.Layer && Layer != null && other.Layer != null && Layer.Equals(other.Layer)) && (XRef == other.XRef && XRef != null && other.XRef != null && XRef.Equals(other.XRef)) && (XSizeMode == other.XSizeMode && XSizeMode != null && other.XSizeMode != null && XSizeMode.Equals(other.XSizeMode)) && (XAnchor == other.XAnchor && XAnchor != null && other.XAnchor != null && XAnchor.Equals(other.XAnchor)) && (X0 == other.X0 && X0 != null && other.X0 != null && X0.Equals(other.X0)) && (X1 == other.X1 && X1 != null && other.X1 != null && X1.Equals(other.X1)) && (YRef == other.YRef && YRef != null && other.YRef != null && YRef.Equals(other.YRef)) && (YSizeMode == other.YSizeMode && YSizeMode != null && other.YSizeMode != null && YSizeMode.Equals(other.YSizeMode)) && (YAnchor == other.YAnchor && YAnchor != null && other.YAnchor != null && YAnchor.Equals(other.YAnchor)) && (Y0 == other.Y0 && Y0 != null && other.Y0 != null && Y0.Equals(other.Y0)) && (Y1 == other.Y1 && Y1 != null && other.Y1 != null && Y1.Equals(other.Y1)) && (Path == other.Path && Path != null && other.Path != null && Path.Equals(other.Path)) && (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) && (Line == other.Line && Line != null && other.Line != null && Line.Equals(other.Line)) && (FillColor == other.FillColor && FillColor != null && other.FillColor != null && FillColor.Equals(other.FillColor)) && (FillRule == other.FillRule && FillRule != null && other.FillRule != null && FillRule.Equals(other.FillRule)) && (Editable == other.Editable && Editable != null && other.Editable != null && Editable.Equals(other.Editable)) && (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) && (TemplateItemName == other.TemplateItemName && TemplateItemName != null && other.TemplateItemName != null && TemplateItemName.Equals(other.TemplateItemName))); }
public void ConvertBadStateValuesToZero() { X1 = X1.ConvertBadValuesToZero(); X2 = X2.ConvertBadValuesToZero(); Y1 = Y1.ConvertBadValuesToZero(); Y2 = Y2.ConvertBadValuesToZero(); }
public override void Update(ICoordinateCalculator <double> xCoordCalc, ICoordinateCalculator <double> yCoordCalc) { base.Update(xCoordCalc, yCoordCalc); if (Y1.CompareTo(Y2) > 0) { MeasureText.VerticalAnchorPoint = VerticalAnchorPoint.Top; MeasureText.Margin = new Thickness(0, 5, 0, 0); } else { MeasureText.VerticalAnchorPoint = VerticalAnchorPoint.Bottom; MeasureText.Margin = new Thickness(0, -5, 0, 0); } var rangeX = X1.CompareTo(X2) > 0 ? RangeFactory.NewRange(X2, X1) : RangeFactory.NewRange(X1, X2); var rangeY = Y1.CompareTo(Y2) > 0 ? RangeFactory.NewRange(Y2, Y1) : RangeFactory.NewRange(Y1, Y2); string xText; if (xCoordCalc is ICategoryCoordinateCalculator <DateTime> ) { var categoryCalc = (ICategoryCoordinateCalculator <DateTime>)xCoordCalc; var indexRange = (IntegerRange)rangeX; var difference = categoryCalc.TransformIndexToData(indexRange.Max) - categoryCalc.TransformIndexToData(indexRange.Min); xText = string.Format("{0:dd} days", difference); } else { xText = rangeX.Diff.ToString(); } MeasureText.Text = string.Format("{0:#.##}\n{1}", rangeY.Diff, xText); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; hashCode = hashCode * 59 + Type.GetHashCode(); hashCode = hashCode * 59 + Barcode1DSymbology.GetHashCode(); if (Data != null) { hashCode = hashCode * 59 + Data.GetHashCode(); } hashCode = hashCode * 59 + X1.GetHashCode(); hashCode = hashCode * 59 + X2.GetHashCode(); hashCode = hashCode * 59 + X3.GetHashCode(); hashCode = hashCode * 59 + X4.GetHashCode(); hashCode = hashCode * 59 + Y1.GetHashCode(); hashCode = hashCode * 59 + Y2.GetHashCode(); hashCode = hashCode * 59 + Y3.GetHashCode(); hashCode = hashCode * 59 + Y4.GetHashCode(); hashCode = hashCode * 59 + BboxLeftInches.GetHashCode(); hashCode = hashCode * 59 + BboxTopInches.GetHashCode(); hashCode = hashCode * 59 + BboxWidthInches.GetHashCode(); hashCode = hashCode * 59 + BboxHeightInches.GetHashCode(); hashCode = hashCode * 59 + PageNumber.GetHashCode(); hashCode = hashCode * 59 + PagePixelWidth.GetHashCode(); hashCode = hashCode * 59 + PagePixelHeight.GetHashCode(); hashCode = hashCode * 59 + PageHorizontalResolution.GetHashCode(); hashCode = hashCode * 59 + PageVerticalResolution.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (X1 != 0) { hash ^= X1.GetHashCode(); } if (Y1 != 0) { hash ^= Y1.GetHashCode(); } if (X2 != 0) { hash ^= X2.GetHashCode(); } if (Y2 != 0) { hash ^= Y2.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override IEnumerable <SvgAttribute> GetAttributes() { var baseAttributes = base.GetAttributes(); if (baseAttributes != null) { foreach (var attr in baseAttributes) { yield return(attr); } } var ci = CultureInfo.InvariantCulture; yield return(new SvgAttribute("x1", "0", () => X1.ToString(ci), v => X1 = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("y1", "0", () => Y1.ToString(ci), v => Y1 = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("x2", "0", () => X2.ToString(ci), v => X2 = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("y2", "0", () => Y2.ToString(ci), v => Y2 = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("stroke-width", () => StrokeWidth.ToString(ci), v => StrokeWidth = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("stroke", () => Stroke == Color.Empty ? "none" : ColorTranslator.ToSvg(Stroke), v => Stroke = SvgAttribute.ParseColorAttribute(v, Stroke.A) )); yield return(new SvgAttribute("stroke-opacity", "1", () => ((double)Stroke.A / 255).ToString(ci), v => Stroke = SvgAttribute.ParseOpacityAttribute(v, Stroke) )); yield return(new SvgAttribute("stroke-dashoffset", () => StrokeDashOffset.ToString(ci), v => StrokeDashOffset = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("stroke-dasharray", () => DashArrayToString(), v => StrokeDashArray = SvgAttribute.ParseFloatArray(v) )); }
/// <summary> /// Return a string representation of this object. /// </summary> public override String ToString() { return(String.Format("Line2D: X1={0}, Y1={1}, X2={2}, Y2={3}", X1.ToString(), Y1.ToString(), X2.ToString(), Y2.ToString())); }
private void LastExecutedCommand() { TbMR2n.Text = N.ToString(); TbMR2x.Text = X1.ToString(); TbMR2y.Text = Y1.ToString(); TbMR2t.Text = T1.ToString(); TbMR2g.Text = G1.ToString(); TbMR2l.Text = L1.ToString(); }
public virtual void Render(Graphics g) { Bitmap bmp = GetBitmap(); if (bmp != null) { g.DrawImage(bmp, X1.Floor(), Y1.Floor(), (float)bmp.Width, (float)bmp.Height); } }
public override int GetHashCode() { var hashCode = 1982840186; hashCode = hashCode * -1521134295 + X1.GetHashCode(); hashCode = hashCode * -1521134295 + X2.GetHashCode(); hashCode = hashCode * -1521134295 + Y1.GetHashCode(); hashCode = hashCode * -1521134295 + Y2.GetHashCode(); return(hashCode); }
public override void WriteGroupCodes() { WriteGroupCodeValue(10, X0.ToString().Trim()); WriteGroupCodeValue(20, Y0.ToString().Trim()); WriteGroupCodeValue(30, Z0.ToString().Trim()); WriteGroupCodeValue(11, X1.ToString().Trim()); WriteGroupCodeValue(21, Y1.ToString().Trim()); WriteGroupCodeValue(31, Z1.ToString().Trim()); }
public override bool Equals(ColorSpace other) { var otherColor = other as Yxy; if (otherColor != null) { return(Y1.Equals(otherColor.Y1) && X.Equals(otherColor.X) && Y2.Equals(otherColor.Y2)); } return(false); }
public override int GetHashCode() { var hashCode = 268039418; hashCode = hashCode * -1521134295 + X1.GetHashCode(); hashCode = hashCode * -1521134295 + Y1.GetHashCode(); hashCode = hashCode * -1521134295 + X2.GetHashCode(); hashCode = hashCode * -1521134295 + Y2.GetHashCode(); return(hashCode); }
/// <summary> /// Serves as the default hash function. /// </summary> /// <returns> /// A hash code for the current object. /// </returns> public override int GetHashCode() { unchecked { var hashCode = X1.GetHashCode(); hashCode = (hashCode * 397) ^ Y1.GetHashCode(); hashCode = (hashCode * 397) ^ X2.GetHashCode(); hashCode = (hashCode * 397) ^ Y2.GetHashCode(); return(hashCode); } }
/// <summary> /// Gets the hash code for this <see cref='AbsoluteGraphicsPlatform.Metrics.AbsoluteLine'/>. /// </summary> public override int GetHashCode() { unchecked { return (29 * 17 * X1.GetHashCode() * 17 * Y1.GetHashCode() * 17 * X2.GetHashCode() * 17 * Y2.GetHashCode()); } }
public override bool VirtuallyEquals(ColorSpace other) { var otherColor = other as Yxy; if (otherColor != null) { return(Y1.ApproximatelyEquals(otherColor.Y1) && X.ApproximatelyEquals(otherColor.X) && Y2.ApproximatelyEquals(otherColor.Y2)); } return(false); }
public override int GetHashCode() { int prime = 37; int hash = 1; hash = prime * hash + X1.GetHashCode(); hash = prime * hash + X2.GetHashCode(); hash = prime * hash + X3.GetHashCode(); hash = prime * hash + Y1.GetHashCode(); hash = prime * hash + Y2.GetHashCode(); return(prime * hash + Y3.GetHashCode()); }
public override int GetHashCode() { unchecked { // properties are, practically, readonly // ReSharper disable NonReadonlyMemberInGetHashCode var hashCode = X1.GetHashCode(); hashCode = (hashCode * 397) ^ Y1.GetHashCode(); hashCode = (hashCode * 397) ^ X2.GetHashCode(); hashCode = (hashCode * 397) ^ Y2.GetHashCode(); return(hashCode); // ReSharper restore NonReadonlyMemberInGetHashCode } }
public override int GetHashCode() { var hashCode = 0; unchecked { hashCode += 1000000007 * X1.GetHashCode(); hashCode += 1000000009 * Y1.GetHashCode(); hashCode += 1000000021 * Width.GetHashCode(); hashCode += 1000000033 * Height.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { var prime = 37; var hash = 1; hash = prime * hash + X1.GetHashCode(); hash = prime * hash + Y1.GetHashCode(); hash = prime * hash + X2.GetHashCode(); hash = prime * hash + Y2.GetHashCode(); hash = prime * hash + X3.GetHashCode(); hash = prime * hash + Y3.GetHashCode(); return(hash); }
private bool ParseMoveByte_CheckForEmpty(byte[] move) { bool check = true; if (move == Constants.CMD_EMPTY_DATA) { check = false; } X1 = Convert.ToInt32(move[1]); Y1 = (Convert.ToInt32(move[2])); X2 = (Convert.ToInt32(move[3])); Y2 = Convert.ToInt32(move[4]); Console.WriteLine(X1.ToString() + " " + Y1.ToString() + " " + X2.ToString() + " " + Y2.ToString()); return(check); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("SinuousFaultGene ["); sb.AppendFormat("\n X0 = {0}", X0.ToString()); sb.AppendFormat("\n Y0 = {0}", Y0.ToString()); sb.AppendFormat("\n Phi0 = {0}", Phi0.ToString()); sb.AppendFormat("\n X1 = {0}", X1.ToString()); sb.AppendFormat("\n Y1 = {0}", Y1.ToString()); sb.AppendFormat("\n Phi1 = {0}", Phi1.ToString()); sb.AppendFormat("\n DetachDepth = {0}", DetachDepth.ToString()); sb.AppendFormat("\n MaxHeave = {0}", MaxHeave.ToString()); sb.AppendFormat("\n Dip = {0}", Dip.ToString()); sb.Append("\n ]\n"); return(sb.ToString()); }
public override void WriteGroupCodes() { WriteGroupCodeValue(10, X0.ToString().Trim()); WriteGroupCodeValue(20, Y0.ToString().Trim()); WriteGroupCodeValue(30, Z0.ToString().Trim()); WriteGroupCodeValue(11, X1.ToString().Trim()); WriteGroupCodeValue(21, Y1.ToString().Trim()); WriteGroupCodeValue(31, Z1.ToString().Trim()); WriteGroupCodeValue(12, X2.ToString().Trim()); WriteGroupCodeValue(22, Y2.ToString().Trim()); WriteGroupCodeValue(32, Z2.ToString().Trim()); WriteGroupCodeValue(13, X3.ToString().Trim()); WriteGroupCodeValue(23, Y3.ToString().Trim()); WriteGroupCodeValue(33, Z3.ToString().Trim()); }
public int CompareTo(VectorPoint other) { int result = X1.CompareTo(other.X1); if (result == 0) { result = Y1.CompareTo(other.Y1); } else if (result == 0) { result = X2.CompareTo(other.X2); } else if (result == 0) { result = Y2.CompareTo(other.Y2); } return(result); }
public bool Equals(Garage other) { if (other == null) { return(false); } return(Type.Equals(other.Type) && State.Equals(other.State) && Field02h.Equals(other.Field02h) && ClosingWithoutTargetVehicle.Equals(other.ClosingWithoutTargetVehicle) && Deactivated.Equals(other.Deactivated) && ResprayHappened.Equals(other.ResprayHappened) && TargetModelIndex.Equals(other.TargetModelIndex) && Door1Pointer.Equals(other.Door1Pointer) && Door2Pointer.Equals(other.Door2Pointer) && Door1Handle.Equals(other.Door1Handle) && Door2Handle.Equals(other.Door2Handle) && IsDoor1Dummy.Equals(other.IsDoor1Dummy) && IsDoor2Dummy.Equals(other.IsDoor2Dummy) && RecreateDoorOnNextRefresh.Equals(other.RecreateDoorOnNextRefresh) && RotatingDoor.Equals(other.RotatingDoor) && CameraFollowsPlayer.Equals(other.CameraFollowsPlayer) && X1.Equals(other.X1) && X2.Equals(other.X2) && Y1.Equals(other.Y1) && Y2.Equals(other.Y2) && Z1.Equals(other.Z1) && Z2.Equals(other.Z2) && DoorOpenOffset.Equals(other.DoorOpenOffset) && DoorOpenMax.Equals(other.DoorOpenMax) && Door1X.Equals(other.Door1X) && Door1Y.Equals(other.Door1Y) && Door2X.Equals(other.Door2X) && Door2Y.Equals(other.Door2Y) && Door1Z.Equals(other.Door1Z) && Door2Z.Equals(other.Door2Z) && Timer.Equals(other.Timer) && CollectedCarsState.Equals(other.CollectedCarsState) && TargetCarPointer.Equals(other.TargetCarPointer) && Field96h.Equals(other.Field96h) && StoredCar.Equals(other.StoredCar)); }
bool WriteFromGRDECL(string file) { try { using (StreamWriter sw = new StreamWriter(file, true)) { sw.WriteLine(string.Empty); sw.WriteLine(grdecl_kw_mapaxes); sw.WriteLine(X1.ToString() + " " + Y1.ToString() + " " + X2.ToString() + " " + Y2.ToString() + " " + X3.ToString() + " " + Y3.ToString() + " /"); } } catch (Exception) { return(false); } return(true); }
public bool Equals(Garage other) { if (other == null) { return(false); } return(Type.Equals(other.Type) && State.Equals(other.State) && MaxCarsAllowed.Equals(other.MaxCarsAllowed) && ClosingWithoutTargetVehicle.Equals(other.ClosingWithoutTargetVehicle) && Deactivated.Equals(other.Deactivated) && ResprayHappened.Equals(other.ResprayHappened) && Door1Pointer.Equals(other.Door1Pointer) && Door2Pointer.Equals(other.Door2Pointer) && Door1Handle.Equals(other.Door1Handle) && Door2Handle.Equals(other.Door2Handle) && IsDoor1Dummy.Equals(other.IsDoor1Dummy) && IsDoor2Dummy.Equals(other.IsDoor2Dummy) && RecreateDoorOnNextRefresh.Equals(other.RecreateDoorOnNextRefresh) && RotatingDoor.Equals(other.RotatingDoor) && CameraFollowsPlayer.Equals(other.CameraFollowsPlayer) && Position.Equals(other.Position) && Rotation.Equals(other.Rotation) && CeilingZ.Equals(other.CeilingZ) && DoorRelated1.Equals(other.DoorRelated1) && DoorRelated2.Equals(other.DoorRelated2) && X1.Equals(other.X1) && X2.Equals(other.X2) && Y1.Equals(other.Y1) && Y2.Equals(other.Y2) && DoorOpenOffset.Equals(other.DoorOpenOffset) && DoorOpenMax.Equals(other.DoorOpenMax) && Door1X.Equals(other.Door1X) && Door1Y.Equals(other.Door1Y) && Door2X.Equals(other.Door2X) && Door2Y.Equals(other.Door2Y) && Door1Z.Equals(other.Door1Z) && Door2Z.Equals(other.Door2Z) && Timer.Equals(other.Timer)); }
public override void Update(ICoordinateCalculator <double> xCoordCalc, ICoordinateCalculator <double> yCoordCalc) { base.Update(xCoordCalc, yCoordCalc); if (Y1.CompareTo(Y2) > 0) { MeasureText.VerticalAnchorPoint = VerticalAnchorPoint.Top; MeasureText.Margin = new Thickness(0, 5, 0, 0); } else { MeasureText.VerticalAnchorPoint = VerticalAnchorPoint.Bottom; MeasureText.Margin = new Thickness(0, -5, 0, 0); } var range = Y1.CompareTo(Y2) > 0 ? RangeFactory.NewRange(Y2, Y1) : RangeFactory.NewRange(Y1, Y2); MeasureText.Text = string.Format("{0:#.##}", range.Diff); }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Point1/X", true, out subEle); subEle.Value = X1.ToString(); ele.TryPathTo("Point1/Y", true, out subEle); subEle.Value = Y1.ToString(); ele.TryPathTo("Point1/Z", true, out subEle); subEle.Value = Z1.ToString(); ele.TryPathTo("Point2/X", true, out subEle); subEle.Value = X2.ToString(); ele.TryPathTo("Point2/Y", true, out subEle); subEle.Value = Y2.ToString(); ele.TryPathTo("Point2/Z", true, out subEle); subEle.Value = Z2.ToString(); }