/// <summary> /// Adds a new XSeries to the collection. /// </summary> public XSeries AddXSeries() { XSeries xSeries = new XSeries(); Add(xSeries); return(xSeries); }
/// <summary> /// Converts XValues into DDL. /// </summary> internal override void Serialize(Serializer serializer) { int count = Count; for (int index = 0; index < count; ++index) { XSeries xSeries = this[index] as XSeries; xSeries.Serialize(serializer); } }
/// <summary> /// Implements the deep copy of the object. /// </summary> protected override object DeepCopy() { XSeries xSeries = (XSeries)base.DeepCopy(); if (xSeries.xSeriesElements != null) { xSeries.xSeriesElements = xSeries.xSeriesElements.Clone(); xSeries.xSeriesElements.parent = xSeries; } return(xSeries); }
/// <summary> /// Adds a new XSeries to the collection. /// </summary> public XSeries AddXSeries() { XSeries xSeries = new XSeries(); Add(xSeries); return xSeries; }
/// <summary> /// Parses the keyword «\xvalues» inside a chart. /// </summary> private void ParseSeries(XSeries series) { // Syntax: // 1. \xvalues{...} try { ReadCode(); AssertSymbol(Symbol.BraceLeft, DomMsgID.MissingBraceLeft, GetSymbolText(Symbol.Series)); bool fFoundComma = true; bool fContinue = true; while (fContinue) { ReadCode(); switch (Symbol) { case Symbol.Eof: ThrowParserException(DomMsgID.UnexpectedEndOfFile); break; case Symbol.BraceRight: fContinue = false; break; case Symbol.Comma: fFoundComma = true; break; case Symbol.Null: AssertCondition(fFoundComma, DomMsgID.MissingComma); series.AddBlank(); fFoundComma = false; break; case Symbol.StringLiteral: case Symbol.IntegerLiteral: case Symbol.RealLiteral: case Symbol.HexIntegerLiteral: AssertCondition(fFoundComma, DomMsgID.MissingComma); series.Add(Token); fFoundComma = false; break; default: ThrowParserException(DomMsgID.UnexpectedSymbol, Token); break; } } AssertSymbol(Symbol.BraceRight, DomMsgID.MissingBraceRight, GetSymbolText(Symbol.Series)); ReadCode(); // read beyond '}' } catch (DdlParserException pe) { ReportParserException(pe); AdjustToNextBlock(); } }