From a3fc2c45ec2a62684e128ffd7cab88bd101ad917 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Tue, 17 May 2016 15:37:02 -0400 Subject: 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. --- source/WindowsFormsApplication1/ShiftOSDesktop.cs | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'source/WindowsFormsApplication1/ShiftOSDesktop.cs') 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(); -- cgit v1.2.3