public void SaveTo(string filename) { var file = new IniFile(); file["PARAMETERS"]["WIDTH"] = Width.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["HEIGHT"] = Height.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["X_OFFSET"] = XOffset.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["Z_OFFSET"] = ZOffset.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["MARGIN"] = Margin.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["SCALE_FACTOR"] = ScaleFactor.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["DRAWING_SIZE"] = DrawingSize.ToString(CultureInfo.InvariantCulture); file.Save(filename); }
public override string ToString() { return($"{{{nameof(Offset)}={Offset.ToString("X")}, {nameof(XOffset)}={XOffset.ToString("X")}, {nameof(YOffset)}={YOffset.ToString("X")}, {nameof(ZOffset)}={ZOffset.ToString("X")}, {nameof(XStretch)}={XStretch.ToString("X")}, {nameof(YStretch)}={YStretch.ToString("X")}, {nameof(ZStretch)}={ZStretch.ToString("X")}, {nameof(Radius)}={Radius.ToString("X")}, {nameof(Data)}={Data.ToString("X")}, {nameof(Bone)}={Bone.ToString("X")}, {nameof(Enabled)}={Enabled.ToString("X")}, {nameof(Zone)}={Zone.ToString("X")}, {nameof(Region)}={Region.ToString("X")}}}"); }
public override Task Rebuild() { this.DebugDepth("Rebuild"); using (RebuildLock()) { ResetPositions(); this.Children.Modify(list => { if (list.Count == 0) { return; } var anchorBounds = AnchorBounds; var children = list.Where(c => c.GetType() != typeof(OperationSourceObject3D) && c.ID != SelectedChild.FirstOrDefault()); // align all the objects to the anchor foreach (var child in children) { AlignAxis(0, XAlign, GetAlignToOffset(anchorBounds, 0, (!Advanced || XAlignTo == Align.None) ? XAlign : XAlignTo), XOffset.Value(this), child); AlignAxis(1, YAlign, GetAlignToOffset(anchorBounds, 1, (!Advanced || YAlignTo == Align.None) ? YAlign : YAlignTo), YOffset.Value(this), child); AlignAxis(2, ZAlign, GetAlignToOffset(anchorBounds, 2, (!Advanced || ZAlignTo == Align.None) ? ZAlign : ZAlignTo), ZOffset.Value(this), child); } }); } Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Matrix)); return(Task.CompletedTask); }