ResultsBrowser : Printing statistics in progress.

This commit is contained in:
Milan Hanajik
2016-11-21 11:03:44 +01:00
parent 0a1966d7bd
commit 5114f5f1eb
2 changed files with 56 additions and 129 deletions
+16 -1
View File
@@ -185,7 +185,22 @@ namespace ResultsBrowser.Forms
private void printButton_Click(object sender, EventArgs e)
{
new StatisticsPrintDocument("", rowValues, columnValues, occurances, Config.Entities.PageOrientation.Portrait).Print();
int columnsCount = Math.Max(1, columnValues.Count);
string[,] table = new string[rowValues.Count + 1, columnsCount + 1];
table[0, 0] = string.Empty;
for (int column = 0; column < columnsCount; column++)
{
table[0, column + 1] = (twoDim ? columnValues[column] : Strings.Count);
}
for (int row = 0; row < rowValues.Count; row++)
{
table[row + 1, 0] = rowValues[row];
for (int column = 0; column < columnsCount; column++) table[row + 1, column + 1] = occurances[row, column].ToString();
}
new StatisticsPrintDocument(table, Config.Entities.PageOrientation.Portrait).Print();
}
}
}