diff options
| author | MichaelTheShifter <[email protected]> | 2016-05-17 15:37:02 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-05-17 15:37:02 -0400 |
| commit | a3fc2c45ec2a62684e128ffd7cab88bd101ad917 (patch) | |
| tree | 1dc63efaa4597a28fd901047a714f38954dafa5e /source/WindowsFormsApplication1/ShiftOSDesktop.cs | |
| parent | 0085241d2366f266b5416488dbead174184420b0 (diff) | |
| download | shiftos-c--a3fc2c45ec2a62684e128ffd7cab88bd101ad917.tar.gz shiftos-c--a3fc2c45ec2a62684e128ffd7cab88bd101ad917.tar.bz2 shiftos-c--a3fc2c45ec2a62684e128ffd7cab88bd101ad917.zip | |
Committing all I've got
Committing everything I've got - so that I can take a break for a few
months and work on other things.
Diffstat (limited to 'source/WindowsFormsApplication1/ShiftOSDesktop.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/ShiftOSDesktop.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source/WindowsFormsApplication1/ShiftOSDesktop.cs b/source/WindowsFormsApplication1/ShiftOSDesktop.cs index f7256c4..948efa9 100644 --- a/source/WindowsFormsApplication1/ShiftOSDesktop.cs +++ b/source/WindowsFormsApplication1/ShiftOSDesktop.cs @@ -12,6 +12,7 @@ using System.Threading; using Newtonsoft.Json; using System.IO; using System.Diagnostics; +using ShiftOS.FinalMission; namespace ShiftOS { @@ -47,6 +48,38 @@ namespace ShiftOS SetupDesktop(); } + public void EndGame_AttachEvents() + { + FinalMission.EndGameHandler.ObjectiveCompleted += (object s, EventArgs a) => + { + }; + FinalMission.EndGameHandler.MissionComplete += (object s, EventArgs a) => + { + API.LimitedMode = false; + SetupDesktop(); + API.CloseEverything(); + switch(FinalMission.EndGameHandler.CurrentChoice) + { + case Choice.SideWithDevX: + var t = new System.Windows.Forms.Timer(); + t.Interval = 10000; + t.Tick += (object se, EventArgs ea) => + { + var tp = new TextPad(); + API.CreateForm(tp, API.LoadedNames.TextpadName, API.GetIcon("TextPad")); + tp.txtuserinput.Text = Properties.Resources.You_Passed; + tp.FormClosing += (sen, args) => + { + API.Upgrades["storycomplete"] = true; + }; + t.Stop(); + }; + t.Start(); + break; + } + }; + } + private void ShiftOSDesktop_Load(object sender, EventArgs e) { Viruses.CheckForInfected(); |
