diff options
Diffstat (limited to 'source/WindowsFormsApplication1/Apps/Terminal.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Apps/Terminal.cs | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Terminal.cs b/source/WindowsFormsApplication1/Apps/Terminal.cs index 4b3af12..8b68d23 100644 --- a/source/WindowsFormsApplication1/Apps/Terminal.cs +++ b/source/WindowsFormsApplication1/Apps/Terminal.cs @@ -14,7 +14,9 @@ using System.Net; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; +using ShiftOS.FinalMission; +using ShiftOS; namespace ShiftOS { @@ -69,18 +71,18 @@ namespace ShiftOS txtterm.Select(txtterm.TextLength, 0); if (API.Upgrades["terminalscrollbar"] == true) { - txtterm.ScrollBars = ScrollBars.Vertical; + txtterm.ScrollBars = RichTextBoxScrollBars.Vertical; } else { - txtterm.ScrollBars = ScrollBars.None; + txtterm.ScrollBars = RichTextBoxScrollBars.None; } txtterm.MouseWheel += (object s, MouseEventArgs a) => { if (Zooming == true) { - txtterm.ScrollBars = ScrollBars.None; + txtterm.ScrollBars = RichTextBoxScrollBars.None; if (ZoomMultiplier > 0) { if (a.Delta > 0) @@ -102,7 +104,6 @@ namespace ShiftOS ResetTerminalFont(); StartLogCheck(); tmrsetfont.Start(); - } @@ -181,8 +182,7 @@ namespace ShiftOS // ERROR: Handles clauses are not supported in C# private void txtterm_Click(object sender, EventArgs e) { - txtterm.Select(txtterm.TextLength, 0); - txtterm.ScrollToCaret(); + //txtterm.AppendText(""); } public void SelectBottom() @@ -192,9 +192,10 @@ namespace ShiftOS } // ERROR: Handles clauses are not supported in C# - private void txtterm_KeyPress(object sender, System.Windows.Forms.KeyEventArgs e) + // ERROR: Handles clauses are not supported in C# + private void txtterm_KeyPress(object sender, ShiftUI.KeyEventArgs e) { - if (e.Control) + if (e.Widget) { if (API.Upgrades["zoomableterminal"] == true) { @@ -202,7 +203,7 @@ namespace ShiftOS } } - if (e.KeyCode == Keys.T && e.Control && blockctrlt == false) + if (e.KeyCode == Keys.T && e.Widget && blockctrlt == false) { this.Close(); e.SuppressKeyPress = true; @@ -454,8 +455,7 @@ namespace ShiftOS if (SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades["autoscrollterminal"] == true) { - txtterm.Select(txtterm.TextLength, 0); - txtterm.ScrollToCaret(); + txtterm.AppendText(""); } } @@ -716,8 +716,7 @@ namespace ShiftOS } - public void cmd_upg(String[] args) - { + public void cmd_upg(String[] args) { if (API.DeveloperMode) { try @@ -1505,6 +1504,22 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o } } + public void cmd_cheat(String[] args) + { + if (API.DeveloperMode) + { + WriteLine("Opening..."); + + //Apps.Cheats chts = new Apps.Cheats(); + //chts.Show(); + API.CreateForm(new Apps.Cheats(), "Cheats", API.GetIcon("Terminal")); + } + else + { + wrongcommand(); + } + } + public void cmd_debug(String[] args) { if (API.DeveloperMode == true) @@ -1835,7 +1850,7 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o bool Hacking = false; - private Control objToWriteTo = null; + private Widget objToWriteTo = null; private string UpgradeToHack = null; public void StartHackingSession(string id) @@ -2116,14 +2131,14 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o { if (txtterm.Text.Length > 0) { - txtterm.Text += Environment.NewLine + text; + txtterm.AppendText(Environment.NewLine); + txtterm.AppendText(text); } else { txtterm.Text += text; } - txtterm.Select(txtterm.TextLength, 0); - txtterm.ScrollToCaret(); + txtterm.AppendText(""); })); } private bool Zooming = false; @@ -2175,7 +2190,7 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o { if (API.Upgrades["terminalscrollbar"] == true) { - txtterm.ScrollBars = ScrollBars.Vertical; + txtterm.ScrollBars = RichTextBoxScrollBars.Vertical; } } } |
