//public int NewNo { get; set; } // Display Info of the RFEM Objects on Panels // Parameters are separated by ";". The component split text can be used to break the string down into a list. public override string ToString() { return(string.Format($"RFEM-LineSupport;No:{No};Ux:{Tx.DOF("kN/m")};Uy:{Ty.DOF("kN/m")};Uz:{Tz.DOF("kN/m")};" + $"φx:{Rx.DOF("kNm/rad")};φy:{Ry.DOF("kNm/rad")};φz:{Rz.DOF("kNm/rad")};Tag:{((Tag == "") ? "-" : Tag)};" + $"LineList:{((LineList == "") ? "-" : LineList)};IsValid:{IsValid};ID:{((ID == "") ? "-" : ID)};ReferenceSystemType:{RSType.ToString()};" + $"ToModify:{ToModify};ToDelete:{ToDelete};Comment:{((Comment == "") ? "-" : Comment)};")); }
public override int GetHashCode() { int hash = 1; if (X != 0) { hash ^= X.GetHashCode(); } if (Z != 0) { hash ^= Z.GetHashCode(); } if (Ry != 0) { hash ^= Ry.GetHashCode(); } if (Speed != 0) { hash ^= Speed.GetHashCode(); } if (Professsional != 0) { hash ^= Professsional.GetHashCode(); } if (Playerid != 0) { hash ^= Playerid.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (X != 0) { hash ^= X.GetHashCode(); } if (Z != 0) { hash ^= Z.GetHashCode(); } if (Ry != 0) { hash ^= Ry.GetHashCode(); } if (Playerid != 0) { hash ^= Playerid.GetHashCode(); } if (State != 0) { hash ^= State.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
//public int NewNo { get; set; } // Display Info of the RFEM Objects on Panels // Parameters are separated by ";". The component split text can be used to break the string down into a list. public override string ToString() { return(string.Format($"RFEM-LineHinge;No:{No};Ux:{Tx.DOF("kN/m")};Uy:{Ty.DOF("kN/m")};Uz:{Tz.DOF("kN/m")};" + $"φx:{Rx.DOF("kNm/rad")};φy:{Ry.DOF("kNm/rad")};φz:{Rz.DOF("kNm/rad")};Tag:{((Tag == "") ? "-" : Tag)};" + $"LineNo:{LineNo};SfcNo:{SfcNo}IsValid:{IsValid};ID:{((ID == "") ? "-" : ID)};Side:{Side.ToString()};" + $"ToModify:{ToModify};ToDelete:{ToDelete};Comment:{((Comment == "") ? "-" : Comment)};")); }
public override void Draw(Canvas canvas, RectangleF rectangle, Color color) { canvas.FillRect(rectangle, color * BackgroundTint); var padding = Padding.Calculate(); var size = Math.Min(rectangle.Width, rectangle.Height) - padding * 2; var spacing = Spacing.Calculate(); var rx = Rx.Calculate(size); var ry = Ry.Calculate(size); Vector2 step = Vector2.Zero; if (rectangle.Width > rectangle.Height) { step = new Vector2(size + spacing, 0); } else { step = new Vector2(0, size + spacing); } var startC = rectangle.Center - step * Count / 2f; var bounds = new RectangleF(startC.X - size / 2, startC.Y - size / 2, size, size); for (var idx = 0; idx < Count; ++idx) { canvas.FillRoundRect(bounds, new Vector2(rx, ry), color); bounds = bounds.Offset(step); } }
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("cx", "0", () => Cx.ToString(ci), v => Cx = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("cy", "0", () => Cy.ToString(ci), v => Cy = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("rx", "0", () => Rx.ToString(ci), v => Rx = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("ry", "0", () => Ry.ToString(ci), v => Ry = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("stroke-width", () => StrokeWidth.ToString(ci), v => StrokeWidth = SvgAttribute.ParseFloatAttribute(v) )); yield return(new SvgAttribute("stroke", () => 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("fill", () => Fill.A == 0 ? "none" : ColorTranslator.ToSvg(Fill), v => Fill = SvgAttribute.ParseColorAttribute(v, Fill.A) )); yield return(new SvgAttribute("fill-opacity", "1", () => ((double)Fill.A / 255).ToString(ci), v => Fill = SvgAttribute.ParseOpacityAttribute(v, Fill) )); }
//public int NewNo { get; set; } // Display Info of the RFEM Objects on Panels // Parameters are separated by ";". The component split text can be used to break the string down into a list. public override string ToString() { return(string.Format($"RFEM-NodalSupport;No:{No};Ux:{Tx.DOF("kN/m")};Uy:{Ty.DOF("kN/m")};Uz:{Tz.DOF("kN/m")};" + $"φx:{Rx.DOF("kNm/rad")};φy:{Ry.DOF("kNm/rad")};φz:{Rz.DOF("kNm/rad")};Tag:{((Tag == "") ? "-" : Tag)};" + $"NodeList:{((NodeList == "") ? "-" : NodeList)};IsValid:{IsValid};ID:{((ID == "") ? "-" : ID)};ReferenceSystemType:{RSType.ToString()};" + $"Orientation:{Orientation.ToLabelString()};RSeq:{RSeq};RotX:{RotX};RotY:{RotY};RotZ:{RotZ};" + $"ToModify:{ToModify};ToDelete:{ToDelete};Comment:{((Comment == "") ? "-" : Comment)};")); }
/// <summary> /// Returns a string array containing all token attributes. /// </summary> /// <returns> A <code>string[]</code> of all attributes. /// </returns> public string[] GetParameters() { return(new string[] { Cx.ToString(), Cy.ToString(), Rx.ToString(), Ry.ToString() }); }
public override void Draw(Canvas canvas, RectangleF rectangle, Color color) { rectangle = rectangle.Deflate(Padding); var rx = Rx.Calculate(rectangle.Width); var ry = Ry.Calculate(rectangle.Height); if (FillColor.A > 0) { canvas.FillRoundRect(rectangle, new System.Numerics.Vector2(rx, ry), FillColor * color); } if (StrokeColor.A > 0) { canvas.DrawRoundRect(rectangle, new System.Numerics.Vector2(rx, ry), StrokeColor * color, StrokeThickness.Calculate()); } }