protected override void AppendSerialization(FluentAlertTable.Row source, int columns, StringBuilder sb)
        {
            switch (source.Style)
            {
                case RowStyle.Normal:
                    //Normal Row
                    AppendSerialization(source.Values, columns, NORMAL_COLUMN_HEADER_BACKGROUND_COLOR, NORMAL_COLUMN_BACKGROUND_COLOR, sb);

                    break;
                case RowStyle.Header:
                    //Column Spanning Header
                    sb.AppendFormat("<TR><TD bgcolor='{0}' colspan='{1}'><B>{2}</B></TD></TR>", HEADER_BACKGROUND_COLOR, columns, source.Values[0]);

                    break;
                case RowStyle.Highlighted:
                    //Highlighted Row
                    AppendSerialization(source.Values, columns, HIGHLIGHT_BACKGROUND_COLOR, HIGHLIGHT_BACKGROUND_COLOR, sb);

                    break;
                case RowStyle.Footer:
                    //Column Spanning Footer
                    sb.AppendFormat("<TR><TD bgcolor='{0}' colspan='{1}'><B>{2}</B></TD></TR>", HEADER_BACKGROUND_COLOR, columns, source.Values[0]);

                    break;
            }
        }
 protected override void AppendSerialization(FluentAlertTable source, StringBuilder sb)
 {
     foreach (var row in source.Rows)
     {
         AppendSerialization(row, source.ColumnCount, sb);
     }
 }
 protected override void AppendSerialization(FluentAlertTable.Row source, int columns, StringBuilder sb)
 {
     //UNDONE: inserts 1 to many commas
     foreach(var v in source.Values)
     {
         sb.Append(v).AppendLine(", ");
     }
 }
 protected override void AppendSerialization(FluentAlertTable source, StringBuilder sb)
 {
     sb.AppendFormat("<table cellspacing='1' cellpadding='2' style='{0};font-size:8pt;' width='100%'>", FONT_FAMILY);
     foreach (var row in source.Rows)
     {
         AppendSerialization(row, source.ColumnCount, sb);
     }
     sb.Append("</table>");
 }
Пример #5
0
 protected abstract void AppendSerialization(FluentAlertTable.Row source, int columns, StringBuilder sb);
Пример #6
0
 protected abstract void AppendSerialization(FluentAlertTable source, StringBuilder sb);