private static void SaveObjectPlacementLookAndFeel(XmlTextWriter xmlWriter, Octave3DConfigSaveLoadSettings saveSettings) { if (saveSettings.ObjectPlacementLookAndFeel) { ObjectPivotPointsRenderSettings pivotPointsRenderSettings = ObjectPlacement.Get().GuidePivotPointsRenderSettings; ProjectedBoxFacePivotPointsRenderSettings projectedPivotPointRenderSettings = pivotPointsRenderSettings.ProjectedBoxFacePivotPointsRenderSettings; ObjectVertexSnapSessionRenderSettings vertexSnapRenderSettings = ObjectPlacement.Get().ObjectVertexSnapSessionRenderSettings; xmlWriter.WriteNewLine(1); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectPlacementLookAndFeelNode); // Pivot points xmlWriter.WriteNewLine(2); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.GuidePivotPointsLookAndFeelNode); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.GuidePivotPointsShapeTypeNode); xmlWriter.WriteString(pivotPointsRenderSettings.ShapeType.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.GuidePivotPointsShapeSizeInPixelsNode); xmlWriter.WriteString(pivotPointsRenderSettings.PivotPointSizeInPixels.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DrawPivotPointProjectionLinesNode); xmlWriter.WriteString(projectedPivotPointRenderSettings.RenderProjectionLines.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointProjectionLineColorNode); xmlWriter.WriteColorString(projectedPivotPointRenderSettings.ProjectionLineColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DrawPivotPointConnectionLinesNode); xmlWriter.WriteString(projectedPivotPointRenderSettings.RenderPivotPointConnectionLines.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointConnectionLineColorNode); xmlWriter.WriteColorString(projectedPivotPointRenderSettings.PivotPointConnectionLineColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ActivePivotPointLookAndFeelNode); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointIsVisibleNode); xmlWriter.WriteString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.IsVisible.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointFillColorNode); xmlWriter.WriteColorString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.FillColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointBorderColorNode); xmlWriter.WriteColorString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.BorderLineColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointScaleNode); xmlWriter.WriteString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.Scale.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.InactivePivotPointLookAndFeelNode); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointIsVisibleNode); xmlWriter.WriteString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.IsVisible.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointFillColorNode); xmlWriter.WriteColorString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.FillColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointBorderColorNode); xmlWriter.WriteColorString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.BorderLineColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointScaleNode); xmlWriter.WriteString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.Scale.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(2); xmlWriter.WriteEndElement(); // Vertex snapping xmlWriter.WriteNewLine(2); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingLookAndFeelNode); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingDrawSrcVertexNode); xmlWriter.WriteString(vertexSnapRenderSettings.RenderSourceVertex.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingSrcVertexFillColorNode); xmlWriter.WriteColorString(vertexSnapRenderSettings.SourceVertexFillColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingSrcVertexBorderColorNode); xmlWriter.WriteColorString(vertexSnapRenderSettings.SourceVertexBorderColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingSrcVertexPixelRadiusNode); xmlWriter.WriteString(vertexSnapRenderSettings.SourceVertexRadiusInPixels.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(2); xmlWriter.WriteEndElement(); // Decor paint xmlWriter.WriteNewLine(2); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DecorPaintLookAndFeelNode); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DecorPaintBrushCircleLookAndFeelNode); xmlWriter.WriteNewLine(4); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DecorPaintBrushCircleBorderLineColorNode); xmlWriter.WriteColorString(ObjectPlacement.Get().DecorPaintObjectPlacement.BrushCircleRenderSettings.BorderLineColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(2); xmlWriter.WriteEndElement(); // Path ObjectPlacementPathRenderSettings pathRenderSettings = ObjectPlacement.Get().PathObjectPlacement.PathRenderSettings; xmlWriter.WriteNewLine(2); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PathLookAndFeelNode); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PathBorderLineColorNode); xmlWriter.WriteColorString(pathRenderSettings.ManualConstructionRenderSettings.BoxBorderLineColor); xmlWriter.WriteEndElement(); SaveExtensionPlaneLookAndFeel(ObjectPlacement.Get().PathObjectPlacement.PathExtensionPlaneRenderSettings, xmlWriter, 3); xmlWriter.WriteNewLine(2); xmlWriter.WriteEndElement(); // Block ObjectPlacementBlockRenderSettings blockRenderSettings = ObjectPlacement.Get().BlockObjectPlacement.BlockRenderSettings; xmlWriter.WriteNewLine(2); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockLookAndFeelNode); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockBorderLineColorNode); xmlWriter.WriteColorString(blockRenderSettings.ManualConstructionRenderSettings.BoxBorderLineColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockTextColorNode); xmlWriter.WriteColorString(blockRenderSettings.ManualConstructionRenderSettings.DimensionsLabelRenderSettings.TextColor); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockFontSizeNode); xmlWriter.WriteString(blockRenderSettings.ManualConstructionRenderSettings.DimensionsLabelRenderSettings.FontSize.ToString()); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(3); xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockBoldTextNode); xmlWriter.WriteString(blockRenderSettings.ManualConstructionRenderSettings.DimensionsLabelRenderSettings.Bold.ToString()); xmlWriter.WriteEndElement(); SaveExtensionPlaneLookAndFeel(ObjectPlacement.Get().BlockObjectPlacement.BlockExtensionPlaneRenderSettings, xmlWriter, 3); xmlWriter.WriteNewLine(2); xmlWriter.WriteEndElement(); xmlWriter.WriteNewLine(1); xmlWriter.WriteEndElement(); } }
public ObjectPlacementPathRenderSettingsView(ObjectPlacementPathRenderSettings settings) { _settings = settings; }