diff options
author | Justin Clark-Casey (justincc) | 2012-05-23 03:19:25 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-23 03:19:25 +0100 |
commit | 059a1e90b92c3c1ca027c0ec59f3628d87a954a6 (patch) | |
tree | 93fc36c18157c80aab84a0b9340174bd80e7d69c /OpenSim/Services/GridService/GridService.cs | |
parent | refactor: rename ConsoleTable -> ConsoleDisplayTable for clarity (diff) | |
download | opensim-SC-059a1e90b92c3c1ca027c0ec59f3628d87a954a6.zip opensim-SC-059a1e90b92c3c1ca027c0ec59f3628d87a954a6.tar.gz opensim-SC-059a1e90b92c3c1ca027c0ec59f3628d87a954a6.tar.bz2 opensim-SC-059a1e90b92c3c1ca027c0ec59f3628d87a954a6.tar.xz |
Add ConsoleDisplayList for more consistent formatting of console output in list form.
Convert "show region" to use this structure rather than hand-constructing
Diffstat (limited to 'OpenSim/Services/GridService/GridService.cs')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 9d81eb5..8a60ca5 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -509,19 +509,19 @@ namespace OpenSim.Services.GridService | |||
509 | return; | 509 | return; |
510 | } | 510 | } |
511 | 511 | ||
512 | ICommandConsole con = MainConsole.Instance; | ||
513 | |||
514 | foreach (RegionData r in regions) | 512 | foreach (RegionData r in regions) |
515 | { | 513 | { |
516 | OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); | 514 | OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); |
517 | 515 | ||
518 | con.OutputFormat("{0,-11}: {1}", "Region Name", r.RegionName); | 516 | ConsoleDisplayList dispList = new ConsoleDisplayList(); |
519 | con.OutputFormat("{0,-11}: {1}", "Region ID", r.RegionID); | 517 | dispList.AddRow("Region Name", r.RegionName); |
520 | con.OutputFormat("{0,-11}: {1},{2}", "Location", r.coordX, r.coordY); | 518 | dispList.AddRow("Region ID", r.RegionID); |
521 | con.OutputFormat("{0,-11}: {1}", "URI", r.Data["serverURI"]); | 519 | dispList.AddRow("Location", string.Format("{0},{1}", r.coordX, r.coordY)); |
522 | con.OutputFormat("{0,-11}: {1}", "Owner ID", r.Data["owner_uuid"]); | 520 | dispList.AddRow("URI", r.Data["serverURI"]); |
523 | con.OutputFormat("{0,-11}: {1}", "Flags", flags); | 521 | dispList.AddRow("Owner ID", r.Data["owner_uuid"]); |
524 | con.Output("\n"); | 522 | dispList.AddRow("Flags", flags); |
523 | |||
524 | MainConsole.Instance.Output(dispList.ToString()); | ||
525 | } | 525 | } |
526 | 526 | ||
527 | return; | 527 | return; |