diff options
Diffstat (limited to 'OpenSim/Framework/Console')
-rw-r--r-- | OpenSim/Framework/Console/CommandConsole.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Console/LocalConsole.cs | 18 | ||||
-rw-r--r-- | OpenSim/Framework/Console/MockConsole.cs | 29 |
3 files changed, 38 insertions, 11 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index b17dbc0..52bcd55 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs | |||
@@ -151,7 +151,7 @@ namespace OpenSim.Framework.Console | |||
151 | help.Add(commandInfo.descriptive_help); | 151 | help.Add(commandInfo.descriptive_help); |
152 | 152 | ||
153 | if (descriptiveHelp != string.Empty) | 153 | if (descriptiveHelp != string.Empty) |
154 | help.Add(string.Empty); | 154 | help.Add(string.Empty); |
155 | } | 155 | } |
156 | else | 156 | else |
157 | { | 157 | { |
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index c968031..6043094 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console | |||
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// A console that uses cursor control and color | 40 | /// A console that uses cursor control and color |
41 | /// </summary> | 41 | /// </summary> |
42 | public class LocalConsole : CommandConsole | 42 | public class LocalConsole : CommandConsole |
43 | { | 43 | { |
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console | |||
100 | private int SetCursorTop(int top) | 100 | private int SetCursorTop(int top) |
101 | { | 101 | { |
102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. | 103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. |
104 | // Therefore, we need to make sure that the column position is valid first. | 104 | // Therefore, we need to make sure that the column position is valid first. |
105 | int left = System.Console.CursorLeft; | 105 | int left = System.Console.CursorLeft; |
106 | 106 | ||
107 | if (left < 0) | 107 | if (left < 0) |
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.Console | |||
121 | { | 121 | { |
122 | top = 0; | 122 | top = 0; |
123 | } | 123 | } |
124 | else | 124 | else |
125 | { | 125 | { |
126 | int bh = System.Console.BufferHeight; | 126 | int bh = System.Console.BufferHeight; |
127 | 127 | ||
@@ -133,7 +133,7 @@ namespace OpenSim.Framework.Console | |||
133 | System.Console.CursorTop = top; | 133 | System.Console.CursorTop = top; |
134 | 134 | ||
135 | return top; | 135 | return top; |
136 | } | 136 | } |
137 | 137 | ||
138 | /// <summary> | 138 | /// <summary> |
139 | /// Set the cursor column. | 139 | /// Set the cursor column. |
@@ -145,12 +145,12 @@ namespace OpenSim.Framework.Console | |||
145 | /// </param> | 145 | /// </param> |
146 | /// <returns> | 146 | /// <returns> |
147 | /// The new cursor column. | 147 | /// The new cursor column. |
148 | /// </returns> | 148 | /// </returns> |
149 | private int SetCursorLeft(int left) | 149 | private int SetCursorLeft(int left) |
150 | { | 150 | { |
151 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 151 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
152 | // to set a cursor column position with a currently invalid row, mono will throw an exception. | 152 | // to set a cursor column position with a currently invalid row, mono will throw an exception. |
153 | // Therefore, we need to make sure that the row position is valid first. | 153 | // Therefore, we need to make sure that the row position is valid first. |
154 | int top = System.Console.CursorTop; | 154 | int top = System.Console.CursorTop; |
155 | 155 | ||
156 | if (top < 0) | 156 | if (top < 0) |
@@ -214,7 +214,7 @@ namespace OpenSim.Framework.Console | |||
214 | System.Console.Write("{0}", prompt); | 214 | System.Console.Write("{0}", prompt); |
215 | 215 | ||
216 | SetCursorTop(new_y); | 216 | SetCursorTop(new_y); |
217 | SetCursorLeft(new_x); | 217 | SetCursorLeft(new_x); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs index 9eb1977..a29b370 100644 --- a/OpenSim/Framework/Console/MockConsole.cs +++ b/OpenSim/Framework/Console/MockConsole.cs | |||
@@ -1,4 +1,31 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
2 | using System.Threading; | 29 | using System.Threading; |
3 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
4 | using System.Text; | 31 | using System.Text; |