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 --- Project Ports/App.config | 3 ++ Project Ports/Desktop.cs | 2 +- Project Ports/Programs/Terminal.Designer.cs | 48 ++++++++------------------- Project Ports/Programs/Terminal.cs | 14 ++------ Project Ports/Project Ports.csproj | 14 ++++++++ Project Ports/Properties/Settings.Designer.cs | 14 +++++++- Project Ports/Properties/Settings.settings | 3 ++ Project Ports/packages.config | 4 +++ 8 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 Project Ports/packages.config (limited to 'Project Ports') diff --git a/Project Ports/App.config b/Project Ports/App.config index a72d535..6bf2045 100644 --- a/Project Ports/App.config +++ b/Project Ports/App.config @@ -22,6 +22,9 @@ False + + Player + \ No newline at end of file diff --git a/Project Ports/Desktop.cs b/Project Ports/Desktop.cs index 30fc192..bbe93a7 100644 --- a/Project Ports/Desktop.cs +++ b/Project Ports/Desktop.cs @@ -43,7 +43,7 @@ namespace Project_Ports private void dclock_Tick(object sender, EventArgs e) { - GeneralAPI.setNameOnAppLauncher(playerName); + GeneralAPI.appendUsername(playerName); this.ltime.Text = DateTime.Now.ToString("hh:mm tt"); } diff --git a/Project Ports/Programs/Terminal.Designer.cs b/Project Ports/Programs/Terminal.Designer.cs index c5c2807..0fad0a5 100644 --- a/Project Ports/Programs/Terminal.Designer.cs +++ b/Project Ports/Programs/Terminal.Designer.cs @@ -28,55 +28,33 @@ /// private void InitializeComponent() { - this.txtConsole = new System.Windows.Forms.TextBox(); - this.txtInput = new System.Windows.Forms.TextBox(); + this.terminalControl = new ConsoleControl.ConsoleControl(); this.SuspendLayout(); // - // txtConsole + // terminalControl // - this.txtConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtConsole.BackColor = System.Drawing.Color.Black; - this.txtConsole.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtConsole.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtConsole.ForeColor = System.Drawing.Color.White; - this.txtConsole.Location = new System.Drawing.Point(-3, 0); - this.txtConsole.Multiline = true; - this.txtConsole.Name = "txtConsole"; - this.txtConsole.ReadOnly = true; - this.txtConsole.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtConsole.Size = new System.Drawing.Size(456, 321); - this.txtConsole.TabIndex = 3; - // - // txtInput - // - this.txtInput.BackColor = System.Drawing.SystemColors.WindowText; - this.txtInput.Font = new System.Drawing.Font("Lucida Console", 8F); - this.txtInput.ForeColor = System.Drawing.SystemColors.Window; - this.txtInput.Location = new System.Drawing.Point(0, 319); - this.txtInput.Name = "txtInput"; - this.txtInput.Size = new System.Drawing.Size(456, 18); - this.txtInput.TabIndex = 4; - this.txtInput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtInput_KeyDown); + this.terminalControl.IsInputEnabled = true; + this.terminalControl.Location = new System.Drawing.Point(0, 0); + this.terminalControl.Name = "terminalControl"; + this.terminalControl.SendKeyboardCommandsToProcess = false; + this.terminalControl.ShowDiagnostics = false; + this.terminalControl.Size = new System.Drawing.Size(709, 441); + this.terminalControl.TabIndex = 0; + this.terminalControl.Load += new System.EventHandler(this.terminalControl_Load); // // Terminal // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.txtInput); - this.Controls.Add(this.txtConsole); + this.Controls.Add(this.terminalControl); this.Name = "Terminal"; - this.Size = new System.Drawing.Size(456, 337); - this.Load += new System.EventHandler(this.Terminal_Load); + this.Size = new System.Drawing.Size(709, 441); this.ResumeLayout(false); - this.PerformLayout(); } #endregion - private System.Windows.Forms.TextBox txtConsole; - public System.Windows.Forms.TextBox txtInput; + private ConsoleControl.ConsoleControl terminalControl; } } diff --git a/Project Ports/Programs/Terminal.cs b/Project Ports/Programs/Terminal.cs index 5d7ef98..0f1fe5a 100644 --- a/Project Ports/Programs/Terminal.cs +++ b/Project Ports/Programs/Terminal.cs @@ -38,19 +38,9 @@ namespace Project_Ports InitializeComponent(); } - private void Terminal_Load(object sender, EventArgs e) + private void terminalControl_Load(object sender, EventArgs e) { - WindowManager wm = new WindowManager(); - } - - private void txtInput_KeyDown(object sender, KeyEventArgs e) - { - if (e.KeyCode == Keys.Enter) - { - TerminalAPI.RunCommand(txtInput, txtConsole); - e.SuppressKeyPress = true; - txtInput.Clear(); - } + terminalControl.StartProcess("PortsTerminal.exe", ""); } } } diff --git a/Project Ports/Project Ports.csproj b/Project Ports/Project Ports.csproj index f5589e1..5135525 100644 --- a/Project Ports/Project Ports.csproj +++ b/Project Ports/Project Ports.csproj @@ -46,7 +46,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 + @@ -198,6 +207,7 @@ Hijack2Terminal.cs + SettingsSingleFileGenerator Settings.Designer.cs @@ -219,6 +229,10 @@ {c1b21b60-7ccc-42fc-83aa-b41644faa952} PortEngine + + {51b19b80-b154-4efe-b838-fec598f9e6d9} + PortsTerminal + diff --git a/Project Ports/Properties/Settings.Designer.cs b/Project Ports/Properties/Settings.Designer.cs index acb72c0..609cc6f 100644 --- a/Project Ports/Properties/Settings.Designer.cs +++ b/Project Ports/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace Project_Ports.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -70,5 +70,17 @@ namespace Project_Ports.Properties { this["hijacked2"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Player")] + public string userDisplayName { + get { + return ((string)(this["userDisplayName"])); + } + set { + this["userDisplayName"] = value; + } + } } } diff --git a/Project Ports/Properties/Settings.settings b/Project Ports/Properties/Settings.settings index f43d837..269d251 100644 --- a/Project Ports/Properties/Settings.settings +++ b/Project Ports/Properties/Settings.settings @@ -14,5 +14,8 @@ False + + Player + \ No newline at end of file diff --git a/Project Ports/packages.config b/Project Ports/packages.config new file mode 100644 index 0000000..9323aa6 --- /dev/null +++ b/Project Ports/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file -- cgit v1.2.3