コード例 #1
0
        /// <summary>
        /// Serialize vertex
        /// </summary>
        /// <param name="name"></param>
        /// <param name="tw"></param>

        public void Serialize(string name, XmlTextWriter tw)
        {
            if (QueryColumn == null)
            {
                return;
            }

            tw.WriteStartElement(name);

            tw.WriteAttributeString("ShowLabels", ShowLabels.ToString());

            ResultsViewProps.SerializeQueryColumn(QueryColumn, name + "Column", tw);
            Color.Serialize("Color", tw);
            Size.Serialize("Size", tw);
            Shape.Serialize("Shape", tw);
            TooltipFields.Serialize("ToolTipFields", tw);

            tw.WriteEndElement();
            return;
        }
コード例 #2
0
        /// <summary>
        /// Serialize Chart Properties
        /// </summary>
        /// <param name="tw"></param>

        public void SerializeChartProperties(XmlTextWriter tw)
        {
            if (!ChartPropertiesEnabled)
            {
                return;
            }

            tw.WriteStartElement("ChartProperties");

            tw.WriteAttributeString("ShapeRenderingMode", ShapeRenderingMode.ToString());
            tw.WriteAttributeString("Jitter", JitterX.ToString());
            tw.WriteAttributeString("ChartStretch", JitterTheSameForXandY.ToString());

            tw.WriteAttributeString("ShowLegend", ShowLegend.ToString());
            if (LegendAlignmentHorizontal != ModelView.LegendAlignmentHorizontal)
            {
                tw.WriteAttributeString("LegendAlignmentHorizontal", LegendAlignmentHorizontal.ToString());
            }
            if (LegendAlignmentVertical != ModelView.LegendAlignmentVertical)
            {
                tw.WriteAttributeString("LegendAlignmentVertical", LegendAlignmentVertical.ToString());
            }
            if (LegendMaxHorizontalPercentage != ModelView.LegendMaxHorizontalPercentage)
            {
                tw.WriteAttributeString("LegendMaxHorizontalPercentage", LegendMaxHorizontalPercentage.ToString());
            }
            if (LegendMaxVerticalPercentage != ModelView.LegendMaxVerticalPercentage)
            {
                tw.WriteAttributeString("LegendMaxVerticalPercentage", LegendMaxVerticalPercentage.ToString());
            }
            if (LegendItemOrder != ModelView.LegendItemOrder)
            {
                tw.WriteAttributeString("LegendItemOrder", LegendItemOrder.ToString());
            }

            tw.WriteAttributeString("MainChartAreaMaximized", MainViewPanelMaximized.ToString());
            tw.WriteAttributeString("ShowFilters", ShowFilters.ToString());
            tw.WriteAttributeString("ShowSelectedDataRows", ShowSelectedDataRows.ToString());
            tw.WriteAttributeString("ShowAxesTitles", ShowAxesTitles.ToString());
            tw.WriteAttributeString("ShowAxesScaleLabels", ShowAxesScaleLabels.ToString());
            tw.WriteAttributeString("RotateAxes", RotateAxes.ToString());

            tw.WriteAttributeString("UseExistingCondFormatting", UseExistingCondFormatting.ToString());
            tw.WriteAttributeString("PivotedData", PivotedData.ToString());

            SerializeAxis(XAxisMx, "XAxis", tw);
            SerializeAxis(YAxisMx, "YAxis", tw);
            SerializeAxis(ZAxisMx, "ZAxis", tw);

            for (int ai = 0; ai < AxesMx.Count; ai++)
            {
                SerializeAxis(AxesMx[ai], "Axis" + (ai + 1).ToString(), tw);
            }

            MarkerColor.Serialize("MarkerColor", tw);           // marker color

            MarkerSize.Serialize("MarkerSize", tw);             // marker size

            MarkerShape.Serialize("MarkerShape", tw);           // marker shape

            MarkerLabel.Serialize("MarkerLabel", tw);           // marker labels

            // Tooltip

            MarkerTooltip.Serialize("ToolTipFields", tw);

            // Surface attributes

            tw.WriteStartElement("Surface");
            tw.WriteAttributeString("FillMode", SurfaceFillMode.ToString());
            tw.WriteAttributeString("FrameMode", SurfaceFrameMode.ToString());
            tw.WriteAttributeString("SmoothPalette", SmoothPalette.ToString());
            tw.WriteAttributeString("SmoothShading", SmoothShading.ToString());
            tw.WriteAttributeString("SemiTransparent", SemiTransparent.ToString());
            tw.WriteAttributeString("DrawFlat", DrawFlat.ToString());
            tw.WriteEndElement();

            // Trellis attributes

            tw.WriteStartElement("Trellis");
            tw.WriteAttributeString("ByRowCol", TrellisByRowCol.ToString());
            tw.WriteAttributeString("Manual", TrellisManual.ToString());
            tw.WriteAttributeString("MaxRows", TrellisMaxRows.ToString());
            tw.WriteAttributeString("MaxCols", TrellisMaxCols.ToString());
            SerializeQueryColumnRef(TrellisColQc, "ColumnQc", tw);
            SerializeQueryColumnRef(TrellisRowQc, "RowQc", tw);
            SerializeQueryColumnRef(TrellisPageQc, "PageQc", tw);
            SerializeQueryColumnRef(TrellisFlowQc, "FlowQc", tw);
            tw.WriteEndElement();

            tw.WriteEndElement();             // ChartProperties
            return;
        }