factor out common HandleShow code for "show uptime"

This commit is contained in:
Justin Clark-Casey (justincc)
2012-11-22 04:05:09 +00:00
parent 74a20a62ee
commit 5c48d7a378
9 changed files with 72 additions and 63 deletions

View File

@@ -711,7 +711,7 @@ namespace OpenSim.Framework.Console
/// </summary>
public void Prompt()
{
string line = ReadLine(m_defaultPrompt + "# ", true, true);
string line = ReadLine(DefaultPrompt + "# ", true, true);
if (line != String.Empty)
Output("Invalid command");

View File

@@ -43,15 +43,7 @@ namespace OpenSim.Framework.Console
public object ConsoleScene { get; set; }
/// <summary>
/// The default prompt text.
/// </summary>
public string DefaultPrompt
{
set { m_defaultPrompt = value; }
get { return m_defaultPrompt; }
}
protected string m_defaultPrompt;
public string DefaultPrompt { get; set; }
public ConsoleBase(string defaultPrompt)
{

View File

@@ -46,13 +46,18 @@ namespace OpenSim.Framework.Console
public ICommands Commands { get { return m_commands; } }
public string DefaultPrompt { get; set; }
public void Prompt() {}
public void RunCommand(string cmd) {}
public string ReadLine(string p, bool isCommand, bool e) { return ""; }
public object ConsoleScene { get { return null; } }
public object ConsoleScene {
get { return null; }
set {}
}
public void Output(string text, string level) {}
public void Output(string text) {}