From 2159b3079ec8df2a7337a9d4ea54810b7028c4e1 Mon Sep 17 00:00:00 2001 From: gareth Date: Wed, 7 Mar 2007 19:07:00 +0000 Subject: fixed last screwup --- src/ServerConsole/ServerConsole/AssemblyInfo.cs | 31 ++++++++ src/ServerConsole/ServerConsole/ServerConsole.cs | 91 ++++++++++++++++++++++ .../ServerConsole/ServerConsole.csproj | 35 +++++++++ src/ServerConsole/ServerConsole/ServerConsole.sln | 7 ++ src/ServerConsole/default.build | 48 ++++++++++++ 5 files changed, 212 insertions(+) create mode 100644 src/ServerConsole/ServerConsole/AssemblyInfo.cs create mode 100644 src/ServerConsole/ServerConsole/ServerConsole.cs create mode 100644 src/ServerConsole/ServerConsole/ServerConsole.csproj create mode 100644 src/ServerConsole/ServerConsole/ServerConsole.sln create mode 100644 src/ServerConsole/default.build (limited to 'src/ServerConsole') diff --git a/src/ServerConsole/ServerConsole/AssemblyInfo.cs b/src/ServerConsole/ServerConsole/AssemblyInfo.cs new file mode 100644 index 0000000..00a9b7d --- /dev/null +++ b/src/ServerConsole/ServerConsole/AssemblyInfo.cs @@ -0,0 +1,31 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("ServerConsole")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ServerConsole")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] diff --git a/src/ServerConsole/ServerConsole/ServerConsole.cs b/src/ServerConsole/ServerConsole/ServerConsole.cs new file mode 100644 index 0000000..93c8114 --- /dev/null +++ b/src/ServerConsole/ServerConsole/ServerConsole.cs @@ -0,0 +1,91 @@ +/* +* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System; + +namespace ServerConsole +{ + public class MainConsole { + + private static ConsoleBase instance; + + public static ConsoleBase Instance + { + get + { + return instance; + } + set + { + instance = value; + } + } + + public MainConsole() + { + + } + } + + public abstract class ConsoleBase + { + + public enum ConsoleType { + Local, // Use stdio + TCP, // Use TCP/telnet + SimChat // Use in-world chat (for gods) + } + + public abstract void Close(); + + // You know what ReadLine() and WriteLine() do, right? And Read() and Write()? Right, you do actually know C#, right? Are you actually a programmer? Do you know english? Do you find my sense of humour in comments irritating? Good, glad you're still here + public abstract void WriteLine(string Line) ; + + public abstract string ReadLine(); + + public abstract int Read() ; + + public abstract void Write(string Line) ; + + // Displays a command prompt and waits for the user to enter a string, then returns that string + public abstract string CmdPrompt(string prompt) ; + + // Displays a command prompt and returns a default value if the user simply presses enter + public abstract string CmdPrompt(string prompt, string defaultresponse); + + // Displays a command prompt and returns a default value, user may only enter 1 of 2 options + public abstract string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB) ; + + // Runs a command with a number of parameters + public abstract Object RunCmd(string Cmd, string[] cmdparams) ; + + // Shows data about something + public abstract void ShowCommands(string ShowWhat) ; + + // Displays a prompt to the user and then runs the command they entered + public abstract void MainConsolePrompt() ; + } +} diff --git a/src/ServerConsole/ServerConsole/ServerConsole.csproj b/src/ServerConsole/ServerConsole/ServerConsole.csproj new file mode 100644 index 0000000..3d85860 --- /dev/null +++ b/src/ServerConsole/ServerConsole/ServerConsole.csproj @@ -0,0 +1,35 @@ + + + Library + ServerConsole + ServerConsole + Debug + AnyCPU + {C9A6026D-8E0C-4FE4-8691-FB2A566AA245} + + + bin\Debug\ + False + DEBUG;TRACE + True + Full + True + + + bin\Release\ + True + TRACE + False + None + False + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServerConsole/ServerConsole/ServerConsole.sln b/src/ServerConsole/ServerConsole/ServerConsole.sln new file mode 100644 index 0000000..07445db --- /dev/null +++ b/src/ServerConsole/ServerConsole/ServerConsole.sln @@ -0,0 +1,7 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# SharpDevelop 2.1.0.2017 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerConsole", "ServerConsole.csproj", "{C9A6026D-8E0C-4FE4-8691-FB2A566AA245}" +EndProject +Global +EndGlobal diff --git a/src/ServerConsole/default.build b/src/ServerConsole/default.build new file mode 100644 index 0000000..a6f6dc2 --- /dev/null +++ b/src/ServerConsole/default.build @@ -0,0 +1,48 @@ + + + nant buildfile for OpenSim + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1