diff options
| author | william341 <[email protected]> | 2016-07-23 16:20:23 -0700 |
|---|---|---|
| committer | william341 <[email protected]> | 2016-07-23 16:20:23 -0700 |
| commit | 1a95b347a23fbbabab10ee984b2621089dc93135 (patch) | |
| tree | 84b767063bc369d6979ffee22a59a3d152494be3 /source/WindowsFormsApplication1/Apps/Cheats.cs | |
| parent | 4e630d1ab9f7c241bfd659b3a7cbe4c1f65dc021 (diff) | |
| download | shiftos-c--1a95b347a23fbbabab10ee984b2621089dc93135.tar.gz shiftos-c--1a95b347a23fbbabab10ee984b2621089dc93135.tar.bz2 shiftos-c--1a95b347a23fbbabab10ee984b2621089dc93135.zip | |
Re Implemented Cheats
Diffstat (limited to 'source/WindowsFormsApplication1/Apps/Cheats.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Apps/Cheats.cs | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Cheats.cs b/source/WindowsFormsApplication1/Apps/Cheats.cs new file mode 100644 index 0000000..a37021b --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Cheats.cs @@ -0,0 +1,67 @@ +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 ShiftUI; +using ShiftOS.Online.Hacking; + +namespace ShiftOS.Apps +{ + public partial class Cheats : Form + { + public Cheats() + { + InitializeComponent(); + } + + public void SetOptionsEnabled(bool enabled) + { + foreach (Widget control in this.Widgets) + { + 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"); + return; + } + ShiftOS.API.AddCodepoints(qty); + } + + + } +} |
