From 1f22b29ca3d172624087185a4e9056a931f19703 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 26 Jun 2012 00:40:46 +0100 Subject: Add much easier ConsoleDisplayTable AddColumn() and AddRow() methods. Use these for new "show regions" command rather than old cumbersome stuff. --- OpenSim/Framework/Console/ConsoleDisplayTable.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Framework/Console/ConsoleDisplayTable.cs') diff --git a/OpenSim/Framework/Console/ConsoleDisplayTable.cs b/OpenSim/Framework/Console/ConsoleDisplayTable.cs index e9d1628..c620dfe 100644 --- a/OpenSim/Framework/Console/ConsoleDisplayTable.cs +++ b/OpenSim/Framework/Console/ConsoleDisplayTable.cs @@ -79,6 +79,16 @@ namespace OpenSim.Framework.Console return sb.ToString(); } + public void AddColumn(string name, int width) + { + Columns.Add(new ConsoleDisplayTableColumn(name, width)); + } + + public void AddRow(params string[] cells) + { + Rows.Add(new ConsoleDisplayTableRow(cells)); + } + public void AddToStringBuilder(StringBuilder sb) { string formatString = GetFormatString(); @@ -135,5 +145,10 @@ namespace OpenSim.Framework.Console { Cells = cells; } + + public ConsoleDisplayTableRow(params string[] cells) : this() + { + Cells = new List(cells); + } } } \ No newline at end of file -- cgit v1.1