Esempio n. 1
0
 public RectangleShapeRenderSettingsView(RectangleShapeRenderSettings settings)
 {
     _settings = settings;
 }
        private static void SaveObjectSelectionLookAndFeel(XmlTextWriter xmlWriter, Octave3DConfigSaveLoadSettings saveSettings)
        {
            if (saveSettings.ObjectSelectionLookAndFeel)
            {
                ObjectSelectionRenderSettings selectionRenderSettings = ObjectSelection.Get().RenderSettings;
                RectangleShapeRenderSettings  rectRenderSettings      = ObjectSelection.Get().RectangleSelectionShapeRenderSettings;
                EllipseShapeRenderSettings    ellipseRenderSettings   = ObjectSelection.Get().EllipseSelectionShapeRenderSettings;

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionLookAndFeelNode);

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxEdgeDrawModeNode);
                xmlWriter.WriteString(selectionRenderSettings.BoxRenderModeSettings.EdgeRenderMode.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxCornerEdgeLengthPercentageNode);
                xmlWriter.WriteString(selectionRenderSettings.BoxRenderModeSettings.CornerEdgesRenderModeSettings.CornerEdgeLengthPercentage.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxEdgeColorNode);
                xmlWriter.WriteColorString(selectionRenderSettings.BoxRenderModeSettings.EdgeColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxColorNode);
                xmlWriter.WriteColorString(selectionRenderSettings.BoxRenderModeSettings.BoxColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxScaleNode);
                xmlWriter.WriteString(selectionRenderSettings.BoxRenderModeSettings.BoxScale.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionRectLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeFillColorNode);
                xmlWriter.WriteColorString(rectRenderSettings.FillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeBorderColorNode);
                xmlWriter.WriteColorString(rectRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionEllipseLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeFillColorNode);
                xmlWriter.WriteColorString(ellipseRenderSettings.FillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeBorderColorNode);
                xmlWriter.WriteColorString(ellipseRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteEndElement();
            }
        }