/// ------------------------------------------------------------------------------------ /// <summary> /// Adds a new level (if there are fewer than three already) and initializes the /// paragraph continuation values in each level. This returns true when a level /// was added and false if the list is already full so no more levels can be added. /// </summary> /// ------------------------------------------------------------------------------------ public void AddLevel() { int distinctLevels = DistinctLevels; QuotationMarks qmarks = new QuotationMarks(); if (distinctLevels > 1 && !AnyEmptyRows) { int icopyLev = (Levels % distinctLevels); qmarks.Opening = QMarksList[icopyLev].Opening; qmarks.Closing = QMarksList[icopyLev].Closing; } QMarksList.Add(qmarks); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Returns a copy of the list. /// </summary> /// ------------------------------------------------------------------------------------ public QuotationMarksList Copy() { QuotationMarksList newList = new QuotationMarksList(); for (int i = 0; i < Levels; i++) { QuotationMarks qm = new QuotationMarks(); qm.Opening = this[i].Opening; qm.Closing = this[i].Closing; newList.Add(qm); } newList.ContinuationMark = ContinuationMark; newList.ContinuationType = ContinuationType; newList.LocaleOfLangUsedFrom = LocaleOfLangUsedFrom; return(newList); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Returns a value indicating whether or not the specified QuotationMarks object is /// equal to this one. /// </summary> /// ------------------------------------------------------------------------------------ public bool Equals(QuotationMarks qmark) { return (Opening.Equals(qmark.Opening, StringComparison.Ordinal) && Closing.Equals(qmark.Closing, StringComparison.Ordinal)); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Returns a copy of the list. /// </summary> /// ------------------------------------------------------------------------------------ public QuotationMarksList Copy() { QuotationMarksList newList = new QuotationMarksList(); for (int i = 0; i < Levels; i++) { QuotationMarks qm = new QuotationMarks(); qm.Opening = this[i].Opening; qm.Closing = this[i].Closing; newList.Add(qm); } newList.ContinuationMark = ContinuationMark; newList.ContinuationType = ContinuationType; newList.LocaleOfLangUsedFrom = LocaleOfLangUsedFrom; return newList; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Removes the specified item from the list. /// </summary> /// ------------------------------------------------------------------------------------ public void Remove(QuotationMarks item) { QMarksList.Remove(item); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the specified quotation mark object. /// </summary> /// ------------------------------------------------------------------------------------ public void Add(QuotationMarks item) { QMarksList.Add(item); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Returns a value indicating whether or not the specified QuotationMarks object is /// equal to this one. /// </summary> /// ------------------------------------------------------------------------------------ public bool Equals(QuotationMarks qmark) { return(Opening.Equals(qmark.Opening, StringComparison.Ordinal) && Closing.Equals(qmark.Closing, StringComparison.Ordinal)); }