From 269f6d0f4cbf556da4e4154143aa85fbf0448429 Mon Sep 17 00:00:00 2001 From: TheEdgeNK Date: Sat, 1 Sep 2018 01:27:41 -0400 Subject: hybrid config mode // removed feature --- PortEngine/ChatAPI.cs | 3 +++ PortEngine/GeneralAPI.cs | 2 +- PortEngine/PortEngine.csproj | 13 +++++++++++++ PortEngine/PortsTerminalAPI.cs | 2 +- PortEngine/TerminalAPI.cs | 12 ++---------- PortEngine/packages.config | 4 ++++ 6 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 PortEngine/packages.config (limited to 'PortEngine') diff --git a/PortEngine/ChatAPI.cs b/PortEngine/ChatAPI.cs index 9c06bfd..cfbc7cf 100644 --- a/PortEngine/ChatAPI.cs +++ b/PortEngine/ChatAPI.cs @@ -19,6 +19,7 @@ **************************************************************************/ using System; using System.Collections.Generic; +using System.Timers; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -29,8 +30,10 @@ namespace PortEngine { public class ChatAPI { + public static void SendMessage(TextBox txtPending, TextBox txtDestination) { +; txtDestination.AppendText("<" + Properties.Settings.Default.userDisplayName + "> " + txtPending.Text + Environment.NewLine); txtPending.Clear(); } diff --git a/PortEngine/GeneralAPI.cs b/PortEngine/GeneralAPI.cs index c38ccbd..6ba9769 100644 --- a/PortEngine/GeneralAPI.cs +++ b/PortEngine/GeneralAPI.cs @@ -29,7 +29,7 @@ namespace PortEngine public class GeneralAPI { - public static void setNameOnAppLauncher(Label txtUserDestination) + public static void appendUsername(Label txtUserDestination) { txtUserDestination.Text = Properties.Settings.Default.userDisplayName; } diff --git a/PortEngine/PortEngine.csproj b/PortEngine/PortEngine.csproj index 1485897..6c9c7b9 100644 --- a/PortEngine/PortEngine.csproj +++ b/PortEngine/PortEngine.csproj @@ -29,7 +29,16 @@ prompt 4 + + bin\Hybrid\ + + + ..\packages\ConsoleControl.1.1.0.0\lib\net40\ConsoleControl.dll + + + ..\packages\ConsoleControl.1.1.0.0\lib\net40\ConsoleControlAPI.dll + @@ -113,10 +122,14 @@ + SettingsSingleFileGenerator Settings.Designer.cs + + + \ No newline at end of file diff --git a/PortEngine/PortsTerminalAPI.cs b/PortEngine/PortsTerminalAPI.cs index c751b85..b41bd2c 100644 --- a/PortEngine/PortsTerminalAPI.cs +++ b/PortEngine/PortsTerminalAPI.cs @@ -44,7 +44,7 @@ namespace PortEngine default: if (pendingCommand.StartsWith("changeusername --")) { - Console.WriteLine("Username changed from " + Properties.Settings.Default.userDisplayName + " to " + pendingCommand.Substring(17)); + Console.WriteLine("Changed username."); Properties.Settings.Default.userDisplayName = pendingCommand.Substring(17); break; } diff --git a/PortEngine/TerminalAPI.cs b/PortEngine/TerminalAPI.cs index d7ec2ba..8bbabdd 100644 --- a/PortEngine/TerminalAPI.cs +++ b/PortEngine/TerminalAPI.cs @@ -39,7 +39,7 @@ namespace PortEngine switch (txtConsoleInput.Text.ToLower()) { case "help": - txtConsoleOutput.AppendText("help - lists the commands\r\ntest - displays a test message\r\nclear - clears the terminal\r\nchangeusername - changes your username for use with the Chatter application\r\n example: changeusername --TheBestUser" + Environment.NewLine); + txtConsoleOutput.AppendText("help - lists the commands\r\ntest - displays a test message\r\nclear - clears the terminal\r\n" + Environment.NewLine); break; case "clear": txtConsoleOutput.Clear(); @@ -49,15 +49,7 @@ namespace PortEngine txtConsoleOutput.AppendText("This is a test!\r\nof the EBS!" + Environment.NewLine); break; default: - if (txtConsoleInput.Text.StartsWith("changeusername --")) - { - txtConsoleOutput.AppendText("You have changed your username to " + txtConsoleInput.Text.Substring(17)); - Properties.Settings.Default.userDisplayName = txtConsoleInput.Text.Substring(17); - } - else - { - txtConsoleOutput.AppendText("Bad command. Reference the command list for commands that exist." + Environment.NewLine); - } + txtConsoleOutput.AppendText("Bad command. Reference the command list for commands that exist." + Environment.NewLine); break; } diff --git a/PortEngine/packages.config b/PortEngine/packages.config new file mode 100644 index 0000000..9323aa6 --- /dev/null +++ b/PortEngine/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file -- cgit v1.2.3