本文整理汇总了C#中Serializer.WriteSimpleAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# Serializer.WriteSimpleAttribute方法的具体用法?C# Serializer.WriteSimpleAttribute怎么用?C# Serializer.WriteSimpleAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Serializer
的用法示例。
在下文中一共展示了Serializer.WriteSimpleAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
/// <summary>
/// Converts Series into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteLine("\\series");
int pos = serializer.BeginAttributes();
if (!this.name.IsNull)
serializer.WriteSimpleAttribute("Name", this.Name);
if (!this.markerSize.IsNull)
serializer.WriteSimpleAttribute("MarkerSize", this.MarkerSize);
if (!this.markerStyle.IsNull)
serializer.WriteSimpleAttribute("MarkerStyle", this.MarkerStyle);
if (!this.markerBackgroundColor.IsNull)
serializer.WriteSimpleAttribute("MarkerBackgroundColor", this.MarkerBackgroundColor);
if (!this.markerForegroundColor.IsNull)
serializer.WriteSimpleAttribute("MarkerForegroundColor", this.MarkerForegroundColor);
if (!this.chartType.IsNull)
serializer.WriteSimpleAttribute("ChartType", this.ChartType);
if (!this.hasDataLabel.IsNull)
serializer.WriteSimpleAttribute("HasDataLabel", this.HasDataLabel);
if (!this.IsNull("LineFormat"))
this.lineFormat.Serialize(serializer);
if (!this.IsNull("FillFormat"))
this.fillFormat.Serialize(serializer);
if (!this.IsNull("DataLabel"))
this.dataLabel.Serialize(serializer);
serializer.EndAttributes(pos);
serializer.BeginContent();
this.seriesElements.Serialize(serializer);
serializer.WriteLine("");
serializer.EndContent();
}
示例2: Serialize
/// <summary>
/// Converts Column into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteComment(this.comment.Value);
serializer.WriteLine("\\column");
int pos = serializer.BeginAttributes();
if (this.style.Value != String.Empty)
serializer.WriteSimpleAttribute("Style", this.Style);
if (!this.IsNull("Format"))
this.format.Serialize(serializer, "Format", null);
if (!this.headingFormat.IsNull)
serializer.WriteSimpleAttribute("HeadingFormat", HeadingFormat);
if (!this.leftPadding.IsNull)
serializer.WriteSimpleAttribute("LeftPadding", LeftPadding);
if (!this.rightPadding.IsNull)
serializer.WriteSimpleAttribute("RightPadding", RightPadding);
if (!this.width.IsNull)
serializer.WriteSimpleAttribute("Width", this.Width);
if (!this.keepWith.IsNull)
serializer.WriteSimpleAttribute("KeepWith", this.KeepWith);
if (!this.IsNull("Borders"))
this.borders.Serialize(serializer, null);
if (!this.IsNull("Shading"))
this.shading.Serialize(serializer);
serializer.EndAttributes(pos);
// columns has no content
}
示例3: Serialize
/// <summary>
/// Converts PictureFormat into DDL
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.BeginContent("PictureFormat");
if (!this.cropLeft.IsNull)
serializer.WriteSimpleAttribute("CropLeft", this.CropLeft);
if (!this.cropRight.IsNull)
serializer.WriteSimpleAttribute("CropRight", this.CropRight);
if (!this.cropTop.IsNull)
serializer.WriteSimpleAttribute("CropTop", this.CropTop);
if (!this.cropBottom.IsNull)
serializer.WriteSimpleAttribute("CropBottom", this.CropBottom);
serializer.EndContent();
}
示例4: Serialize
/// <summary>
/// Converts Legend into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteLine("\\legend");
int pos = serializer.BeginAttributes();
if (!this.style.IsNull)
serializer.WriteSimpleAttribute("Style", this.Style);
if (!this.IsNull("Format"))
this.format.Serialize(serializer, "Format", null);
if (!this.IsNull("LineFormat"))
this.lineFormat.Serialize(serializer);
serializer.EndAttributes(pos);
}
示例5: Serialize
/// <summary>
/// Converts Cell into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteComment(this.comment.Value);
serializer.WriteLine("\\cell");
int pos = serializer.BeginAttributes();
if (this.style.Value != String.Empty)
serializer.WriteSimpleAttribute("Style", this.Style);
if (!this.IsNull("Format"))
this.format.Serialize(serializer, "Format", null);
if (!this.mergeDown.IsNull)
serializer.WriteSimpleAttribute("MergeDown", this.MergeDown);
if (!this.mergeRight.IsNull)
serializer.WriteSimpleAttribute("MergeRight", this.MergeRight);
if (!this.verticalAlignment.IsNull)
serializer.WriteSimpleAttribute("VerticalAlignment", this.VerticalAlignment);
if (!this.IsNull("Borders"))
this.borders.Serialize(serializer, null);
if (!this.IsNull("Shading"))
this.shading.Serialize(serializer);
serializer.EndAttributes(pos);
pos = serializer.BeginContent();
if (!this.IsNull("Elements"))
this.elements.Serialize(serializer);
serializer.EndContent(pos);
}
示例6: Serialize
/// <summary>
/// Converts Table into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteComment(_comment.Value);
serializer.WriteLine("\\table");
int pos = serializer.BeginAttributes();
if (_style.Value != String.Empty)
serializer.WriteSimpleAttribute("Style", Style);
if (!IsNull("Format"))
_format.Serialize(serializer, "Format", null);
if (!_topPadding.IsNull)
serializer.WriteSimpleAttribute("TopPadding", TopPadding);
if (!_leftPadding.IsNull)
serializer.WriteSimpleAttribute("LeftPadding", LeftPadding);
if (!_rightPadding.IsNull)
serializer.WriteSimpleAttribute("RightPadding", RightPadding);
if (!_bottomPadding.IsNull)
serializer.WriteSimpleAttribute("BottomPadding", BottomPadding);
if (!IsNull("Borders"))
_borders.Serialize(serializer, null);
if (!IsNull("Shading"))
_shading.Serialize(serializer);
serializer.EndAttributes(pos);
serializer.BeginContent();
Columns.Serialize(serializer);
Rows.Serialize(serializer);
serializer.EndContent();
}
示例7: Serialize
/// <summary>
/// Converts Columns into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteComment(_comment.Value);
serializer.WriteLine("\\columns");
int pos = serializer.BeginAttributes();
if (!_width.IsNull)
serializer.WriteSimpleAttribute("Width", Width);
serializer.EndAttributes(pos);
serializer.BeginContent();
int clms = Count;
if (clms > 0)
{
for (int clm = 0; clm < clms; clm++)
this[clm].Serialize(serializer);
}
else
serializer.WriteComment("Invalid - no columns defined. Table will not render.");
serializer.EndContent();
}
示例8: Serialize
/// <summary>
/// Converts LineFormat into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
int pos = serializer.BeginContent("LineFormat");
if (!this.visible.IsNull)
serializer.WriteSimpleAttribute("Visible", this.Visible);
if (!this.style.IsNull)
serializer.WriteSimpleAttribute("Style", this.Style);
if (!this.dashStyle.IsNull)
serializer.WriteSimpleAttribute("DashStyle", this.DashStyle);
if (!this.width.IsNull)
serializer.WriteSimpleAttribute("Width", this.Width);
if (!this.color.IsNull)
serializer.WriteSimpleAttribute("Color", this.Color);
serializer.EndContent();
}
示例9: Serialize
/// <summary>
/// Converts AxisTitle into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
int pos = serializer.BeginContent("Title");
if (!_style.IsNull)
serializer.WriteSimpleAttribute("Style", Style);
if (!IsNull("Font"))
_font.Serialize(serializer);
if (!_orientation.IsNull)
serializer.WriteSimpleAttribute("Orientation", Orientation);
if (!_alignment.IsNull)
serializer.WriteSimpleAttribute("Alignment", Alignment);
if (!_verticalAlignment.IsNull)
serializer.WriteSimpleAttribute("VerticalAlignment", VerticalAlignment);
if (!_caption.IsNull)
serializer.WriteSimpleAttribute("Caption", Caption);
serializer.EndContent();
}
示例10: Serialize
/// <summary>
/// Converts TextArea into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
Chart chartObject = this.parent as Chart;
serializer.WriteLine("\\" + chartObject.CheckTextArea(this));
int pos = serializer.BeginAttributes();
if (!this.style.IsNull)
serializer.WriteSimpleAttribute("Style", this.Style);
if (!this.IsNull("Format"))
this.format.Serialize(serializer, "Format", null);
if (!this.topPadding.IsNull)
serializer.WriteSimpleAttribute("TopPadding", this.TopPadding);
if (!this.leftPadding.IsNull)
serializer.WriteSimpleAttribute("LeftPadding", this.LeftPadding);
if (!this.rightPadding.IsNull)
serializer.WriteSimpleAttribute("RightPadding", this.RightPadding);
if (!this.bottomPadding.IsNull)
serializer.WriteSimpleAttribute("BottomPadding", this.BottomPadding);
if (!this.width.IsNull)
serializer.WriteSimpleAttribute("Width", this.Width);
if (!this.height.IsNull)
serializer.WriteSimpleAttribute("Height", this.Height);
if (!this.verticalAlignment.IsNull)
serializer.WriteSimpleAttribute("VerticalAlignment", this.VerticalAlignment);
if (!this.IsNull("LineFormat"))
this.lineFormat.Serialize(serializer);
if (!this.IsNull("FillFormat"))
this.fillFormat.Serialize(serializer);
serializer.EndAttributes(pos);
serializer.BeginContent();
if (this.elements != null)
this.elements.Serialize(serializer);
serializer.EndContent();
}
示例11: Serialize
/// <summary>
/// Converts Shape into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
if (!this.height.IsNull)
serializer.WriteSimpleAttribute("Height", this.Height);
if (!this.width.IsNull)
serializer.WriteSimpleAttribute("Width", this.Width);
if (!this.relativeHorizontal.IsNull)
serializer.WriteSimpleAttribute("RelativeHorizontal", this.RelativeHorizontal);
if (!this.relativeVertical.IsNull)
serializer.WriteSimpleAttribute("RelativeVertical", this.RelativeVertical);
if (!this.IsNull("Left"))
this.left.Serialize(serializer);
if (!this.IsNull("Top"))
this.top.Serialize(serializer);
if (!this.IsNull("WrapFormat"))
this.wrapFormat.Serialize(serializer);
if (!this.IsNull("LineFormat"))
this.lineFormat.Serialize(serializer);
if (!this.IsNull("FillFormat"))
this.fillFormat.Serialize(serializer);
}
示例12: Serialize
/// <summary>
/// Converts FillFormat into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
int pos = serializer.BeginContent("FillFormat");
if (!this.visible.IsNull)
serializer.WriteSimpleAttribute("Visible", this.Visible);
if (!this.color.IsNull)
serializer.WriteSimpleAttribute("Color", this.Color);
serializer.EndContent();
}
示例13: Serialize
/// <summary>
/// Converts Row into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteComment(_comment.Value);
serializer.WriteLine("\\row");
int pos = serializer.BeginAttributes();
if (_style.Value != String.Empty)
serializer.WriteSimpleAttribute("Style", Style);
if (!IsNull("Format"))
_format.Serialize(serializer, "Format", null);
if (!_height.IsNull)
serializer.WriteSimpleAttribute("Height", Height);
if (!_heightRule.IsNull)
serializer.WriteSimpleAttribute("HeightRule", HeightRule);
if (!_topPadding.IsNull)
serializer.WriteSimpleAttribute("TopPadding", TopPadding);
if (!_bottomPadding.IsNull)
serializer.WriteSimpleAttribute("BottomPadding", BottomPadding);
if (!_headingFormat.IsNull)
serializer.WriteSimpleAttribute("HeadingFormat", HeadingFormat);
if (!_verticalAlignment.IsNull)
serializer.WriteSimpleAttribute("VerticalAlignment", VerticalAlignment);
if (!_keepWith.IsNull)
serializer.WriteSimpleAttribute("KeepWith", KeepWith);
//Borders & Shading
if (!IsNull("Borders"))
_borders.Serialize(serializer, null);
if (!IsNull("Shading"))
_shading.Serialize(serializer);
serializer.EndAttributes(pos);
serializer.BeginContent();
if (!IsNull("Cells"))
_cells.Serialize(serializer);
serializer.EndContent();
}
示例14: Serialize
/// <summary>
/// Converts Chart into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteLine("\\chart(" + this.Type + ")");
int pos = serializer.BeginAttributes();
base.Serialize(serializer);
if (!this.displayBlanksAs.IsNull)
serializer.WriteSimpleAttribute("DisplayBlanksAs", this.DisplayBlanksAs);
if (!this.pivotChart.IsNull)
serializer.WriteSimpleAttribute("PivotChart", this.PivotChart);
if (!this.hasDataLabel.IsNull)
serializer.WriteSimpleAttribute("HasDataLabel", this.HasDataLabel);
if (!this.style.IsNull)
serializer.WriteSimpleAttribute("Style", this.Style);
if (!this.IsNull("Format"))
this.format.Serialize(serializer, "Format", null);
if (!this.IsNull("DataLabel"))
this.dataLabel.Serialize(serializer);
serializer.EndAttributes(pos);
serializer.BeginContent();
if (!this.IsNull("PlotArea"))
this.plotArea.Serialize(serializer);
if (!this.IsNull("HeaderArea"))
this.headerArea.Serialize(serializer);
if (!this.IsNull("FooterArea"))
this.footerArea.Serialize(serializer);
if (!this.IsNull("TopArea"))
this.topArea.Serialize(serializer);
if (!this.IsNull("BottomArea"))
this.bottomArea.Serialize(serializer);
if (!this.IsNull("LeftArea"))
this.leftArea.Serialize(serializer);
if (!this.IsNull("RightArea"))
this.rightArea.Serialize(serializer);
if (!this.IsNull("XAxis"))
this.xAxis.Serialize(serializer);
if (!this.IsNull("YAxis"))
this.yAxis.Serialize(serializer);
if (!this.IsNull("ZAxis"))
this.zAxis.Serialize(serializer);
if (!this.IsNull("SeriesCollection"))
this.seriesCollection.Serialize(serializer);
if (!this.IsNull("XValues"))
this.xValues.Serialize(serializer);
serializer.EndContent();
}
示例15: Serialize
/// <summary>
/// Converts Table into DDL.
/// </summary>
internal override void Serialize(Serializer serializer)
{
serializer.WriteComment(this.comment.Value);
serializer.WriteLine("\\table");
int pos = serializer.BeginAttributes();
if (this.style.Value != String.Empty)
serializer.WriteSimpleAttribute("Style", this.Style);
if (!this.IsNull("Format"))
this.format.Serialize(serializer, "Format", null);
if (!this.topPadding.IsNull)
serializer.WriteSimpleAttribute("TopPadding", this.TopPadding);
if (!this.leftPadding.IsNull)
serializer.WriteSimpleAttribute("LeftPadding", this.LeftPadding);
if (!this.rightPadding.IsNull)
serializer.WriteSimpleAttribute("RightPadding", this.RightPadding);
if (!this.bottomPadding.IsNull)
serializer.WriteSimpleAttribute("BottomPadding", this.BottomPadding);
if (!this.IsNull("Borders"))
this.borders.Serialize(serializer, null);
if (!this.IsNull("Shading"))
this.shading.Serialize(serializer);
serializer.EndAttributes(pos);
serializer.BeginContent();
this.Columns.Serialize(serializer);
this.Rows.Serialize(serializer);
serializer.EndContent();
}