From 8e40410b8066a5c0ce58b4a9956a7a0c7f7e1493 Mon Sep 17 00:00:00 2001 From: Gabriel Enrico Augusto Rocha Date: Tue, 19 Jul 2016 22:53:39 -0400 Subject: Added cheat Command --- source/WindowsFormsApplication1/Apps/Cheats.cs | 70 ++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 source/WindowsFormsApplication1/Apps/Cheats.cs (limited to 'source/WindowsFormsApplication1/Apps/Cheats.cs') diff --git a/source/WindowsFormsApplication1/Apps/Cheats.cs b/source/WindowsFormsApplication1/Apps/Cheats.cs new file mode 100644 index 0000000..a11cf35 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Cheats.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Online.Hacking; + +namespace ShiftOS.Apps +{ + public partial class Cheats : Form + { + public Cheats() + { + InitializeComponent(); + } + + public void SetOptionsEnabled(bool enabled) + { + foreach (Control control in this.Controls) + { + if (control != progressDisplay) + { + control.Enabled = enabled; + } + } + } + + private void getAllUpgrades_Click(object sender, EventArgs e) + { + progressDisplay.Enabled = true; + progressDisplay.Value = 0; + progressDisplay.Maximum = Shiftorium.Utilities.GetAvailable().Count; + foreach (var upg in Shiftorium.Utilities.GetAvailable()) + { + API.Upgrades[upg.id] = true; + progressDisplay.PerformStep(); + WriteLogLine("Installed upgrade \"" + upg.Name + "\"..."); + } + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + progressDisplay.Enabled = false; + } + + public void WriteLogLine(string line) + { + LogBox.AppendText("\n"+line); + } + + private void AddMoney_Click(object sender, EventArgs e) + { + int qty; + bool isInt = Int32.TryParse(AddMoneyQty.Text, out qty); + if (!isInt) + { + MessageBox.Show("Not a Number", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + ShiftOS.API.AddCodepoints(qty); + } + + private void button2_Click(object sender, EventArgs e) + { + //Package_Grabber.SendMessage(Matchmaker.SelectedServer.IPAddress, ); + } + } +} -- cgit v1.2.3 From 6cc2ae2259967a09db4143ac8c6b2e2400ffe73a Mon Sep 17 00:00:00 2001 From: GabrielTK Date: Wed, 20 Jul 2016 09:24:05 -0400 Subject: Finished Clean-UP --- source/WindowsFormsApplication1/Apps/Cheats.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/WindowsFormsApplication1/Apps/Cheats.cs') diff --git a/source/WindowsFormsApplication1/Apps/Cheats.cs b/source/WindowsFormsApplication1/Apps/Cheats.cs index a11cf35..9caaa7f 100644 --- a/source/WindowsFormsApplication1/Apps/Cheats.cs +++ b/source/WindowsFormsApplication1/Apps/Cheats.cs @@ -62,9 +62,6 @@ namespace ShiftOS.Apps ShiftOS.API.AddCodepoints(qty); } - private void button2_Click(object sender, EventArgs e) - { - //Package_Grabber.SendMessage(Matchmaker.SelectedServer.IPAddress, ); - } + } } -- cgit v1.2.3