Ejemplo n.º 1
0
        /// <summary>
        /// 속성 중 Attribute Node로 표현해야 한다.
        /// </summary>
        /// <param name="writer"></param>
        public override void GenerateXmlAttributes(System.Xml.XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            #region << Chart Attributes >>

            if (PlotPriceAs.HasValue)
            {
                writer.WriteAttributeString("plotPriceAs", PlotPriceAs.ToString());
            }
            if (PlotClosingPrice.HasValue)
            {
                writer.WriteAttributeString("plotClosingPrice", PlotClosingPrice.GetHashCode().ToString());
            }
            if (ShowVolumeChart.HasValue)
            {
                writer.WriteAttributeString("showVolumeChart", ShowVolumeChart.GetHashCode().ToString());
            }
            if (VolumeHeightPercent.HasValue)
            {
                writer.WriteAttributeString("volumeHeightPercent", VolumeHeightPercent.ToString());
            }
            if (XAxisMinValue.HasValue)
            {
                writer.WriteAttributeString("XAxisMinValue", XAxisMinValue.ToString());
            }
            if (XAxisMaxValue.HasValue)
            {
                writer.WriteAttributeString("XAxisMaxValue", XAxisMaxValue.ToString());
            }
            if (PYAxisMinValue.HasValue)
            {
                writer.WriteAttributeString("PYAxisMinValue", PYAxisMinValue.ToString());
            }
            if (PYAxisMaxValue.HasValue)
            {
                writer.WriteAttributeString("PYAxisMaxValue", PYAxisMaxValue.ToString());
            }
            if (VYAxisMinValue.HasValue)
            {
                writer.WriteAttributeString("VYAxisMinValue", VYAxisMinValue.ToString());
            }
            if (VYAxisMaxValue.HasValue)
            {
                writer.WriteAttributeString("VYAxisMaxValue", VYAxisMaxValue.ToString());
            }

            if (ShowYAxisValues.HasValue)
            {
                writer.WriteAttributeString("ShowYAxisValues", ShowYAxisValues.GetHashCode().ToString());
            }
            if (YAxisValuesStep.HasValue)
            {
                writer.WriteAttributeString("YAxisValuesStep", YAxisValuesStep.ToString());
            }
            if (RotateYAxisName.HasValue)
            {
                writer.WriteAttributeString("RotateYAxisName", RotateYAxisName.GetHashCode().ToString());
            }

            if (PYAxisName.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("PYAxisName", PYAxisName);
            }
            if (VYAxisName.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("VYAxisName", VYAxisName);
            }

            #endregion

            #region << Data Plot Cosmetics >>

            if (BearBorderColor.HasValue)
            {
                writer.WriteAttributeString("BearBorderColor", BearBorderColor.Value.ToHexString());
            }
            if (BearFillColor.HasValue)
            {
                writer.WriteAttributeString("BearFillColor", BearFillColor.Value.ToHexString());
            }
            if (BullBorderColor.HasValue)
            {
                writer.WriteAttributeString("BullBorderColor", BullBorderColor.Value.ToHexString());
            }
            if (BullFillColor.HasValue)
            {
                writer.WriteAttributeString("BullFillColor", BullFillColor.Value.ToHexString());
            }

            if (RollOverBandColor.HasValue)
            {
                writer.WriteAttributeString("RollOverBandColor", RollOverBandColor.Value.ToHexString());
            }
            if (RollOverBandAlpha.HasValue)
            {
                writer.WriteAttributeString("RollOverBandAlpha", RollOverBandAlpha.ToString());
            }
            if (ShowVPlotBorder.HasValue)
            {
                writer.WriteAttributeString("ShowVPlotBorder", ShowVPlotBorder.GetHashCode().ToString());
            }

            if (VPlotBorderColor.HasValue)
            {
                writer.WriteAttributeString("VPlotBorderColor", VPlotBorderColor.Value.ToHexString());
            }
            if (VPlotBorderThickness.HasValue)
            {
                writer.WriteAttributeString("VPlotBorderThickness", VPlotBorderThickness.ToString());
            }
            if (VPlotBorderAlpha.HasValue)
            {
                writer.WriteAttributeString("VPlotBorderAlpha", VPlotBorderAlpha.ToString());
            }
            if (PlotLineThickness.HasValue)
            {
                writer.WriteAttributeString("PlotLineThickness", PlotLineThickness.ToString());
            }
            if (PlotLineAlpha.HasValue)
            {
                writer.WriteAttributeString("PlotLineAlpha", PlotLineAlpha.ToString());
            }
            if (PlotLineDashLen.HasValue)
            {
                writer.WriteAttributeString("PlotLineDashLen", PlotLineDashLen.ToString());
            }
            if (PlotLineDashGap.HasValue)
            {
                writer.WriteAttributeString("PlotLineDashGap", PlotLineDashGap.ToString());
            }

            #endregion

            #region << Anchors Attributes >>

            if (DrawAnchors.HasValue)
            {
                writer.WriteAttributeString("drawAnchors", DrawAnchors.GetHashCode().ToString());
            }
            if (AnchorSides.HasValue)
            {
                writer.WriteAttributeString("AnchorSides", AnchorSides.ToString());
            }
            if (AnchorRadius.HasValue)
            {
                writer.WriteAttributeString("AnchorRadius", AnchorRadius.ToString());
            }
            if (AnchorBorderColor.HasValue)
            {
                writer.WriteAttributeString("AnchorBorderColor", AnchorBorderColor.Value.ToHexString());
            }
            if (AnchorBorderThickness.HasValue)
            {
                writer.WriteAttributeString("AnchorBorderThickness", AnchorBorderThickness.ToString());
            }
            if (AnchorBgColor.HasValue)
            {
                writer.WriteAttributeString("AnchorBgColor", AnchorBgColor.Value.ToHexString());
            }
            if (AnchorAlpha.HasValue)
            {
                writer.WriteAttributeString("AnchorAlpha", AnchorAlpha.ToString());
            }
            if (AnchorBgAlpha.HasValue)
            {
                writer.WriteAttributeString("AnchorBgAlpha", AnchorBgAlpha.ToString());
            }

            #endregion

            #region << Divisional Lines & Grids >>

            if (NumPDivLines.HasValue)
            {
                writer.WriteAttributeString("numPDivLines", NumPDivLines.ToString());
            }

            if (AlternateHGridAlpha.HasValue)
            {
                writer.WriteAttributeString("alternateHGridAlpha", AlternateHGridAlpha.ToString());
            }

            if (ShowAlternateHGridColor.HasValue)
            {
                writer.WriteAttributeString("ShowAlternateHGridColor", ShowAlternateHGridColor.GetHashCode().ToString());
            }
            if (AlternateHGridColor.HasValue)
            {
                writer.WriteAttributeString("AlternateHGridColor", AlternateHGridColor.Value.ToHexString());
            }

            #endregion

            if (_numberAttr != null)
            {
                _numberAttr.GenerateXmlAttributes(writer);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 속성들을 Xml Attribute로 생성합니다.
        /// </summary>
        /// <param name="writer">Attribute를 쓸 Writer</param>
        public override void GenerateXmlAttributes(System.Xml.XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            if (SetAdaptiveYMin.HasValue)
            {
                writer.WriteAttributeString("SetAdaptiveYMin", SetAdaptiveYMin.GetHashCode().ToString());
            }
            if (YAxisMinValue.HasValue)
            {
                writer.WriteAttributeString("YAxisMinValue", YAxisMinValue.ToString());
            }
            if (YAxisMaxValue.HasValue)
            {
                writer.WriteAttributeString("YAxisMaxValue", YAxisMaxValue.ToString());
            }

            if (_lineAttr != null)
            {
                _lineAttr.GenerateXmlAttributes(writer);
            }
            if (AnchorSides.HasValue)
            {
                writer.WriteAttributeString("AnchorSides", AnchorSides.ToString());
            }
            if (AnchorRadius.HasValue)
            {
                writer.WriteAttributeString("AnchorRadius", AnchorRadius.ToString());
            }
            if (AnchorColor.HasValue)
            {
                writer.WriteAttributeString("AnchorColor", AnchorColor.Value.ToHexString());
            }
            if (AnchorAlpha.HasValue)
            {
                writer.WriteAttributeString("AnchorAlpha", AnchorAlpha.ToString());
            }

            if (OpenColor.HasValue)
            {
                writer.WriteAttributeString("OpenColor", OpenColor.Value.ToHexString());
            }
            if (CloseColor.HasValue)
            {
                writer.WriteAttributeString("CloseColor", CloseColor.Value.ToHexString());
            }
            if (HighColor.HasValue)
            {
                writer.WriteAttributeString("HighColor", HighColor.Value.ToHexString());
            }
            if (LowColor.HasValue)
            {
                writer.WriteAttributeString("LowColor", LowColor.Value.ToHexString());
            }

            if (ShowOpenAnchor.HasValue)
            {
                writer.WriteAttributeString("ShowOpenAnchor", ShowOpenAnchor.GetHashCode().ToString());
            }
            if (ShowCloseAnchor.HasValue)
            {
                writer.WriteAttributeString("ShowCloseAnchor", ShowCloseAnchor.GetHashCode().ToString());
            }
            if (ShowHighAnchor.HasValue)
            {
                writer.WriteAttributeString("ShowHighAnchor", ShowHighAnchor.GetHashCode().ToString());
            }
            if (ShowLowAnchor.HasValue)
            {
                writer.WriteAttributeString("ShowLowAnchor", ShowLowAnchor.GetHashCode().ToString());
            }

            if (ShowOpenValue.HasValue)
            {
                writer.WriteAttributeString("ShowOpenValue", ShowOpenValue.GetHashCode().ToString());
            }
            if (ShowCloseValue.HasValue)
            {
                writer.WriteAttributeString("ShowCloseValue", ShowCloseValue.GetHashCode().ToString());
            }
            if (ShowHighLowValue.HasValue)
            {
                writer.WriteAttributeString("ShowHighLowValue", ShowHighLowValue.GetHashCode().ToString());
            }

            if (PeriodLength.HasValue)
            {
                writer.WriteAttributeString("PeriodLength", PeriodLength.ToString());
            }
            if (PeriodColor.HasValue)
            {
                writer.WriteAttributeString("PeriodColor", PeriodColor.Value.ToHexString());
            }
            if (PeriodAlpha.HasValue)
            {
                writer.WriteAttributeString("PeriodAlpha", PeriodAlpha.ToString());
            }
        }