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. --- .../FinalMission/ChoiceControl.Designer.cs | 75 +++++ .../FinalMission/ChoiceControl.cs | 50 +++ .../FinalMission/ChoiceControl.resx | 120 +++++++ .../FinalMission/ChooseYourApproach.Designer.cs | 350 +++++++++++++++++++++ .../FinalMission/ChooseYourApproach.cs | 174 ++++++++++ .../FinalMission/ChooseYourApproach.resx | 134 ++++++++ .../FinalMission/EndGameHandler.cs | 275 ++++++++++++++++ .../FinalMission/MissionGuide.Designer.cs | 118 +++++++ .../FinalMission/MissionGuide.cs | 49 +++ .../FinalMission/MissionGuide.resx | 123 ++++++++ .../FinalMission/QuestViewer.Designer.cs | 62 ++++ .../FinalMission/QuestViewer.cs | 63 ++++ .../FinalMission/QuestViewer.resx | 120 +++++++ 13 files changed, 1713 insertions(+) create mode 100644 source/WindowsFormsApplication1/FinalMission/ChoiceControl.Designer.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/ChoiceControl.resx create mode 100644 source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.Designer.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.resx create mode 100644 source/WindowsFormsApplication1/FinalMission/EndGameHandler.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/MissionGuide.Designer.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/MissionGuide.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/MissionGuide.resx create mode 100644 source/WindowsFormsApplication1/FinalMission/QuestViewer.Designer.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/QuestViewer.cs create mode 100644 source/WindowsFormsApplication1/FinalMission/QuestViewer.resx (limited to 'source/WindowsFormsApplication1/FinalMission') diff --git a/source/WindowsFormsApplication1/FinalMission/ChoiceControl.Designer.cs b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.Designer.cs new file mode 100644 index 0000000..f055644 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.Designer.cs @@ -0,0 +1,75 @@ +namespace ShiftOS.FinalMission +{ + partial class ChoiceControl + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbnumber = new System.Windows.Forms.Label(); + this.lbdescription = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // lbnumber + // + this.lbnumber.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbnumber.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F); + this.lbnumber.Location = new System.Drawing.Point(0, 0); + this.lbnumber.Name = "lbnumber"; + this.lbnumber.Size = new System.Drawing.Size(112, 75); + this.lbnumber.TabIndex = 0; + this.lbnumber.Text = "1"; + this.lbnumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbnumber.Click += new System.EventHandler(this.lbdescription_Click); + // + // lbdescription + // + this.lbdescription.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lbdescription.Location = new System.Drawing.Point(0, 75); + this.lbdescription.Name = "lbdescription"; + this.lbdescription.Size = new System.Drawing.Size(112, 27); + this.lbdescription.TabIndex = 1; + this.lbdescription.Text = "Stop DevX"; + this.lbdescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbdescription.Click += new System.EventHandler(this.lbdescription_Click); + // + // ChoiceControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbnumber); + this.Controls.Add(this.lbdescription); + this.Name = "ChoiceControl"; + this.Size = new System.Drawing.Size(112, 102); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lbnumber; + private System.Windows.Forms.Label lbdescription; + } +} diff --git a/source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs new file mode 100644 index 0000000..1230d6b --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.FinalMission +{ + [DefaultEvent("Selected")] + public partial class ChoiceControl : UserControl + { + public ChoiceControl() + { + InitializeComponent(); + } + + public int Number + { + get { return Convert.ToInt32(lbnumber.Text); } + set { lbnumber.Text = value.ToString(); } + } + + public string ChoiceName + { + get + { + return lbdescription.Text; + } + set + { + lbdescription.Text = value; + } + } + + public event EventHandler Selected; + + private void lbdescription_Click(object sender, EventArgs e) + { + var h = this.Selected; + if(h != null) + { + h(this, e); + } + } + } +} diff --git a/source/WindowsFormsApplication1/FinalMission/ChoiceControl.resx b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/ChoiceControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.Designer.cs b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.Designer.cs new file mode 100644 index 0000000..587093c --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.Designer.cs @@ -0,0 +1,350 @@ +namespace ShiftOS.FinalMission +{ + partial class ChooseYourApproach + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChooseYourApproach)); + this.pnlmain = new System.Windows.Forms.Panel(); + this.lbdesc = new System.Windows.Forms.Label(); + this.lbtitle = new System.Windows.Forms.Label(); + this.pnldescription = new System.Windows.Forms.Panel(); + this.choicedesc = new System.Windows.Forms.Label(); + this.fldescbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnbegin = new System.Windows.Forms.Button(); + this.choicetitle = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlchoices = new System.Windows.Forms.Panel(); + this.choiceControl3 = new ShiftOS.FinalMission.ChoiceControl(); + this.choiceControl2 = new ShiftOS.FinalMission.ChoiceControl(); + this.cc_sidewithdevx = new ShiftOS.FinalMission.ChoiceControl(); + this.pnlconfirm = new System.Windows.Forms.Panel(); + this.lbconfirm = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.button3 = new System.Windows.Forms.Button(); + this.pnlmain.SuspendLayout(); + this.pnldescription.SuspendLayout(); + this.fldescbuttons.SuspendLayout(); + this.pnlchoices.SuspendLayout(); + this.pnlconfirm.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // pnlmain + // + this.pnlmain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmain.Controls.Add(this.lbdesc); + this.pnlmain.Controls.Add(this.lbtitle); + this.pnlmain.Location = new System.Drawing.Point(318, 27); + this.pnlmain.Name = "pnlmain"; + this.pnlmain.Size = new System.Drawing.Size(692, 178); + this.pnlmain.TabIndex = 0; + // + // lbdesc + // + this.lbdesc.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbdesc.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbdesc.Location = new System.Drawing.Point(0, 38); + this.lbdesc.Name = "lbdesc"; + this.lbdesc.Size = new System.Drawing.Size(692, 140); + this.lbdesc.TabIndex = 1; + this.lbdesc.Text = resources.GetString("lbdesc.Text"); + this.lbdesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbdesc.Click += new System.EventHandler(this.lbdesc_Click); + // + // lbtitle + // + this.lbtitle.Dock = System.Windows.Forms.DockStyle.Top; + this.lbtitle.Font = new System.Drawing.Font("Lucida Console", 19F); + this.lbtitle.Location = new System.Drawing.Point(0, 0); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(692, 38); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Choose your approach"; + this.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnldescription + // + this.pnldescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnldescription.Controls.Add(this.choicedesc); + this.pnldescription.Controls.Add(this.fldescbuttons); + this.pnldescription.Controls.Add(this.choicetitle); + this.pnldescription.Location = new System.Drawing.Point(318, 357); + this.pnldescription.Name = "pnldescription"; + this.pnldescription.Size = new System.Drawing.Size(692, 178); + this.pnldescription.TabIndex = 1; + // + // choicedesc + // + this.choicedesc.Dock = System.Windows.Forms.DockStyle.Fill; + this.choicedesc.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.choicedesc.Location = new System.Drawing.Point(0, 38); + this.choicedesc.Name = "choicedesc"; + this.choicedesc.Size = new System.Drawing.Size(692, 103); + this.choicedesc.TabIndex = 1; + this.choicedesc.Text = "DevX caused all of this. He hijacked your computer and put ShiftOS on it, and mad" + + "e you work harder than ever just to make it usable.\r\n\r\nNow it\'s time to use all " + + "your skills to take him down."; + this.choicedesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // fldescbuttons + // + this.fldescbuttons.Controls.Add(this.btnbegin); + this.fldescbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.fldescbuttons.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.fldescbuttons.Location = new System.Drawing.Point(0, 141); + this.fldescbuttons.Name = "fldescbuttons"; + this.fldescbuttons.Size = new System.Drawing.Size(692, 37); + this.fldescbuttons.TabIndex = 2; + // + // btnbegin + // + this.btnbegin.AutoSize = true; + this.btnbegin.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnbegin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbegin.Location = new System.Drawing.Point(3, 3); + this.btnbegin.Name = "btnbegin"; + this.btnbegin.Size = new System.Drawing.Size(62, 32); + this.btnbegin.TabIndex = 0; + this.btnbegin.Text = "Begin"; + this.btnbegin.UseVisualStyleBackColor = true; + this.btnbegin.Click += new System.EventHandler(this.btnbegin_Click); + // + // choicetitle + // + this.choicetitle.Dock = System.Windows.Forms.DockStyle.Top; + this.choicetitle.Font = new System.Drawing.Font("Lucida Console", 19F); + this.choicetitle.Location = new System.Drawing.Point(0, 0); + this.choicetitle.Name = "choicetitle"; + this.choicetitle.Size = new System.Drawing.Size(692, 38); + this.choicetitle.TabIndex = 0; + this.choicetitle.Text = "Defeat DevX"; + this.choicetitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel1 + // + this.panel1.Location = new System.Drawing.Point(648, -76); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(200, 100); + this.panel1.TabIndex = 2; + // + // pnlchoices + // + this.pnlchoices.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlchoices.Controls.Add(this.choiceControl3); + this.pnlchoices.Controls.Add(this.choiceControl2); + this.pnlchoices.Controls.Add(this.cc_sidewithdevx); + this.pnlchoices.Location = new System.Drawing.Point(510, 228); + this.pnlchoices.MaximumSize = new System.Drawing.Size(338, 91); + this.pnlchoices.MinimumSize = new System.Drawing.Size(338, 91); + this.pnlchoices.Name = "pnlchoices"; + this.pnlchoices.Size = new System.Drawing.Size(338, 91); + this.pnlchoices.TabIndex = 3; + // + // choiceControl3 + // + this.choiceControl3.ChoiceName = "Destroy DevX"; + this.choiceControl3.Dock = System.Windows.Forms.DockStyle.Fill; + this.choiceControl3.Location = new System.Drawing.Point(112, 0); + this.choiceControl3.Name = "choiceControl3"; + this.choiceControl3.Number = 2; + this.choiceControl3.Size = new System.Drawing.Size(114, 91); + this.choiceControl3.TabIndex = 2; + this.choiceControl3.Selected += new System.EventHandler(this.cc_sidewithdevx_Selected); + // + // choiceControl2 + // + this.choiceControl2.ChoiceName = "End it all"; + this.choiceControl2.Dock = System.Windows.Forms.DockStyle.Right; + this.choiceControl2.Location = new System.Drawing.Point(226, 0); + this.choiceControl2.Name = "choiceControl2"; + this.choiceControl2.Number = 3; + this.choiceControl2.Size = new System.Drawing.Size(112, 91); + this.choiceControl2.TabIndex = 1; + this.choiceControl2.Selected += new System.EventHandler(this.cc_sidewithdevx_Selected); + // + // cc_sidewithdevx + // + this.cc_sidewithdevx.ChoiceName = "Side with DevX"; + this.cc_sidewithdevx.Dock = System.Windows.Forms.DockStyle.Left; + this.cc_sidewithdevx.Location = new System.Drawing.Point(0, 0); + this.cc_sidewithdevx.Name = "cc_sidewithdevx"; + this.cc_sidewithdevx.Number = 1; + this.cc_sidewithdevx.Size = new System.Drawing.Size(112, 91); + this.cc_sidewithdevx.TabIndex = 0; + this.cc_sidewithdevx.Selected += new System.EventHandler(this.cc_sidewithdevx_Selected); + // + // pnlconfirm + // + this.pnlconfirm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlconfirm.Controls.Add(this.lbconfirm); + this.pnlconfirm.Controls.Add(this.flowLayoutPanel1); + this.pnlconfirm.Controls.Add(this.label2); + this.pnlconfirm.Location = new System.Drawing.Point(56, 27); + this.pnlconfirm.Name = "pnlconfirm"; + this.pnlconfirm.Size = new System.Drawing.Size(1220, 449); + this.pnlconfirm.TabIndex = 4; + this.pnlconfirm.Visible = false; + // + // lbconfirm + // + this.lbconfirm.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbconfirm.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbconfirm.Location = new System.Drawing.Point(0, 38); + this.lbconfirm.Name = "lbconfirm"; + this.lbconfirm.Size = new System.Drawing.Size(1220, 374); + this.lbconfirm.TabIndex = 1; + this.lbconfirm.Text = resources.GetString("lbconfirm.Text"); + this.lbconfirm.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label2 + // + this.label2.Dock = System.Windows.Forms.DockStyle.Top; + this.label2.Font = new System.Drawing.Font("Lucida Console", 19F); + this.label2.Location = new System.Drawing.Point(0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(1220, 38); + this.label2.TabIndex = 0; + this.label2.Text = "Start This Mission"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.AutoSize = true; + this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(1233, 510); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(83, 25); + this.button1.TabIndex = 5; + this.button1.Text = "Toggle Music"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button2.AutoSize = true; + this.button2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Location = new System.Drawing.Point(1210, 12); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(106, 25); + this.button2.TabIndex = 6; + this.button2.Text = "Return to Desktop"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.button3); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowLayoutPanel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 412); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(1220, 37); + this.flowLayoutPanel1.TabIndex = 3; + // + // button3 + // + this.button3.AutoSize = true; + this.button3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Location = new System.Drawing.Point(3, 3); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(71, 32); + this.button3.TabIndex = 0; + this.button3.Text = "Ready."; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // ChooseYourApproach + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.ClientSize = new System.Drawing.Size(1328, 547); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.pnlconfirm); + this.Controls.Add(this.pnlchoices); + this.Controls.Add(this.panel1); + this.Controls.Add(this.pnldescription); + this.Controls.Add(this.pnlmain); + this.ForeColor = System.Drawing.Color.LightGreen; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "ChooseYourApproach"; + this.Text = "ChooseYourApproach"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.onClose); + this.Load += new System.EventHandler(this.ChooseYourApproach_Load); + this.pnlmain.ResumeLayout(false); + this.pnldescription.ResumeLayout(false); + this.fldescbuttons.ResumeLayout(false); + this.fldescbuttons.PerformLayout(); + this.pnlchoices.ResumeLayout(false); + this.pnlconfirm.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Panel pnlmain; + private System.Windows.Forms.Label lbdesc; + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.Panel pnldescription; + private System.Windows.Forms.Label choicedesc; + private System.Windows.Forms.FlowLayoutPanel fldescbuttons; + private System.Windows.Forms.Button btnbegin; + private System.Windows.Forms.Label choicetitle; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel pnlchoices; + private ChoiceControl choiceControl3; + private ChoiceControl choiceControl2; + private ChoiceControl cc_sidewithdevx; + private System.Windows.Forms.Panel pnlconfirm; + private System.Windows.Forms.Label lbconfirm; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button button3; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs new file mode 100644 index 0000000..78a8508 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs @@ -0,0 +1,174 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Media; +////using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using NAudio; +using NAudio.Wave; + +namespace ShiftOS.FinalMission +{ + public partial class ChooseYourApproach : Form + { + bool Playing = false; + private AudioResourceClient audioClient = null; + + public ChooseYourApproach() + { + audioClient = new AudioResourceClient("EndGame;RossBugden"); + InitializeComponent(); + //Music thread. + audioClient.Play("Rapture"); + audioClient.SongFinished += (object s, EventArgs a) => + { + if (musicEnabled) + { + audioClient.Play("Rapture"); + } + }; + } + + private void lbdesc_Click(object sender, EventArgs e) + { + + } + + private int choice = 0; + + + private void ChooseYourApproach_Load(object sender, EventArgs e) + { + pnlchoices.Left = (this.Width - pnlchoices.Width) / 2; + } + + private void cc_sidewithdevx_Selected(object sender, EventArgs e) + { + var cc = (ChoiceControl)sender; + choice = cc.Number; + SetupUI(); + } + + public void SetupUI() + { + switch (choice) + { + case 0: + choicetitle.Text = "Select a choice"; + choicedesc.Text = "Select a choice to see more information about it and to begin."; + btnbegin.Hide(); + break; + case 1: + choicetitle.Text = "Side With DevX"; + choicedesc.Text = "Side with DevX and gain full control of ShiftOS."; + btnbegin.Show(); + break; + case 2: + choicetitle.Text = "Destroy DevX"; + choicedesc.Text = "DevX put you through digital torture. He stripped you of all your personal files, put you in a barely usable OS and made you make it better. Now it's time to take him down before he can do it to anyone else."; + btnbegin.Show(); + break; + case 3: + choicetitle.Text = "End it all"; + choicedesc.Text = "It's time to stop dealing with all this stuff and bring you back to your old operating system."; + btnbegin.Show(); + break; + + } + } + + public void SetupConfirmUI() + { + List dependencies = new List(); + panel1.Hide(); + pnlchoices.Hide(); + pnldescription.Hide(); + pnlmain.Hide(); + pnlconfirm.Show(); + switch (choice) + { + case 1: + dependencies.Add("HoloChat"); + break; + case 2: + dependencies.Add("HoloChat"); + dependencies.Add("Network Browser"); + dependencies.Add("Hacking skills"); + break; + case 3: + break; + } + lbconfirm.Text = "You are about to start a mission. It is worth noting that during the mission you will not be able to shut down ShiftOS, access Shiftnet applications, or access applications like Pong, Knowledge Input, Shifter, Skin Loader, Shiftorium, or other OS-modifying applications."; + lbconfirm.Text += Environment.NewLine + Environment.NewLine + "The following things will be needed to start this mission:" + Environment.NewLine; + foreach (var d in dependencies) + { + lbconfirm.Text += d + Environment.NewLine; + } + lbconfirm.Text += Environment.NewLine + "During the mission, a window will appear near the top of the screen showing you what to do. You can also use the 'quests' Terminal Command to view a list of everything you need to do."; + } + + private void btnbegin_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Begin mission", "Are you sure you'd like to start this mission? You will not be able to access many applications or shut down ShiftOS until you have completed the mission.", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if (res == "Yes") + { + SetupConfirmUI(); + } + }; + } + + private void onClose(object sender, FormClosingEventArgs e) + { + audioClient.Stop(); + audioClient.Dispose(); + audioClient = null; + } + + bool musicEnabled = true; + + private void button1_Click(object sender, EventArgs e) + { + if (musicEnabled) + { + audioClient.Stop(); + } + else + { + audioClient.Play("Rapture"); + } + musicEnabled = !musicEnabled; + } + + private void button2_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Return to Desktop", "You came this far and are ready to stop DevX, but you are really willing to cancel and go to your desktop?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if (res == "Yes") + { + this.Close(); + API.CreateInfoboxSession("Return to Desktop", "Very well, you can have it your way.", infobox.InfoboxMode.Info); + } + }; + } + + private void button3_Click(object sender, EventArgs e) + { + API.LimitedMode = true; + API.CurrentSession.SetupDesktop(); + API.CloseEverything(); + EndGameHandler.Initiate(choice); + } + } + +} diff --git a/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.resx b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.resx new file mode 100644 index 0000000..76cd2b7 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.resx @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The time has come. + +You have conquered many networks, explored the vast Shiftnet, gained and spent many Codepoints, and received all upgrades. + +Now it's time to choose what you'll do next. Will you side with DevX? Will you stop DevX dead in his tracks, or will you end it all and return to your previous operating system? + + + The time has come. + +You have conquered many networks, explored the vast Shiftnet, gained and spent many Codepoints, and received all upgrades. + +Now it's time to choose what you'll do next. Will you side with DevX? Will you stop DevX dead in his tracks, or will you end it all and return to your previous operating system? + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/FinalMission/EndGameHandler.cs b/source/WindowsFormsApplication1/FinalMission/EndGameHandler.cs new file mode 100644 index 0000000..aea2f82 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/EndGameHandler.cs @@ -0,0 +1,275 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace ShiftOS.FinalMission +{ + public enum Choice + { + SideWithDevX, + StopDevX, + EndAll + } + + + public class EndGameHandler + { + + #region Properties + + public static Choice CurrentChoice + { + get { return currentChoice; } + } + + public static Dictionary ThingsToDo + { + get + { + return thingsToDo; + } + } + + public static bool C2_ShellShockBreachCommand { get; set; } + + public static string CurrentObjective + { + get + { + try + { + return thingsToDo.Keys.ElementAt(currentObjective); + } + catch + { + return ""; + } + } + } + + public static string CurrentObjectivePrompt + { + get { return objPrompt; } + } + + public static MissionGuide MissionGuide + { + get { return mguide; } + } + + public static bool GodModeInstallEnabled { get; set; } + + #endregion + + public static FakeChatClient FakeHoloChatRoom + { + get + { + if (currentObjective == 0) + { + var room = new FakeChatClient(); + room.Name = "The Hacker Alliance"; + room.OtherCharacters = new List(); + switch (currentChoice) + { + case Choice.EndAll: + room.Topic = "Oh no. | The ShiftOS Hacker Alliance: We don't mess around."; + room.OtherCharacters.Add("???"); + room.OtherCharacters.Add("Hacker101"); + room.Messages = JsonConvert.DeserializeObject>(Properties.Resources.Choice3); + break; + case Choice.StopDevX: + room.Topic = "The ShiftOS Hacker Alliance: We don't mess around."; + room.OtherCharacters.Add("???"); + room.Messages = JsonConvert.DeserializeObject>(Properties.Resources.Choice2); + break; + case Choice.SideWithDevX: + room.Topic = "Chat seized by DevX"; + room.OtherCharacters.Add("DevX"); + room.Messages = JsonConvert.DeserializeObject>(Properties.Resources.Choice1); + break; + + } + return room; + } + else + { + return null; + } + } + } + + #region Events + + public static event EventHandler ObjectiveCompleted; + public static event EventHandler MissionComplete; + + #endregion + + #region Variables + private static Choice currentChoice = Choice.EndAll; + private static Dictionary thingsToDo = new Dictionary(); + private static int currentObjective = 0; + private static string objPrompt; + private static MissionGuide mguide; + + #endregion + + #region Methods + + public static void Initiate(int choice) + { + mguide = new MissionGuide(); + mguide.Show(); + switch (choice) + { + case 1: + currentChoice = Choice.SideWithDevX; + currentObjective = 0; + thingsToDo.Add("Chat with DevX on HoloChat", false); + thingsToDo.Add("Install DevX's packages", false); + mguide.ShowButton = false; + objPrompt = "Go chat with DevX on HoloChat."; + break; + case 2: + currentChoice = Choice.StopDevX; + thingsToDo.Add("Chat with the Other Player on HoloChat", false); + thingsToDo.Add("Hack through DevX's firewall", false); + thingsToDo.Add("Take down DevX's primary server", false); + thingsToDo.Add("Take down DevX's secondary server", false); + thingsToDo.Add("Forkbomb DevX's storage and telemetry server", false); + thingsToDo.Add("One last battle...", false); + thingsToDo.Add("Uninstall ShiftOS", false); + mguide.ShowButton = false; + objPrompt = "It's time to destroy DevX. Head to the Hacker Alliance HoloChat room to begin."; + break; + case 3: + currentChoice = Choice.EndAll; + thingsToDo.Add("Trouble in the Hacker Alliance...", false); + mguide.ShowButton = false; + objPrompt = "Something's wrong in the Hacker Alliance chatroom... They need you."; + break; + } + API.CurrentSession.EndGame_AttachEvents(); + + } + + public static void GoToNextObjective() + { + var h = ObjectiveCompleted; + if (h != null) + { + h(CurrentObjective, new EventArgs()); + } + currentObjective += 1; + SetupGUIforCurrent(); + } + + public static void SetupGUIforCurrent() + { + GodModeInstallEnabled = false; + C2_ShellShockBreachCommand = false; + switch(currentChoice) + { + case Choice.SideWithDevX: + switch(currentObjective) + { + case 1: + mguide.ShowButton = false; + objPrompt = "Go open your Terminal and install the 'god_utils' package."; + GodModeInstallEnabled = true; + break; + case 2: + var h = MissionComplete; + h?.Invoke(CurrentObjective, new EventArgs()); + break; + } + break; + case Choice.EndAll: + switch(currentObjective) + { + case 1: + var h = MissionComplete; + h?.Invoke(CurrentObjective, new EventArgs()); + break; + } + break; + case Choice.StopDevX: + switch(currentObjective) + { + case 1: + mguide.ShowButton = true; + mguide.OnButtonClick = new Action(() => + { + var enemy = JsonConvert.DeserializeObject(Properties.Resources.DevX_Firewall); + var hui = new HackUI(enemy); + hui.Show(); + hui.OnWin += (object s, EventArgs a) => + { + GoToNextObjective(); + }; + }); + objPrompt = "Before we can do anything major, we need to bust through DevX's firewall. It should be easy, but beware. It's just a firewall. The real stuff's coming soon."; + break; + case 2: + mguide.OnButtonClick = new Action(() => + { + var enemy = JsonConvert.DeserializeObject(Properties.Resources.DevX_PrimaryNet); + var hui = new HackUI(enemy); + hui.Show(); + hui.OnWin += (object s, EventArgs a) => + { + GoToNextObjective(); + }; + }); + objPrompt = "Alright, we're through. Next on the list is DevX's primary server. Take this down and we can get further into the network without him finding out."; + break; + case 3: + mguide.OnButtonClick = new Action(() => + { + var enemy = JsonConvert.DeserializeObject(Properties.Resources.DevX_Secondary); + var hui = new HackUI(enemy); + hui.Show(); + hui.OnWin += (object s, EventArgs a) => + { + GoToNextObjective(); + }; + }); + objPrompt = "Primary server's D to the O to the W to the N. DOWN. Next we gotta take down his secondary server. Once it goes down, he's finished."; + break; + case 4: + mguide.ButtonText = "Begin attack in Terminal"; + mguide.OnButtonClick = new Action(() => + { + var t = new Terminal(); + API.CreateForm(t, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); + t.StartShellShock(); + }); + objPrompt = "Bye, have a great time, DevX! Arighty, DevX has one last server running that needs to go before we do anything more. This one sits on shiftnet://devx/tracker and is the server DevX uses to track other ShiftOS users. Take it down and he can't see any of this."; + break; + case 5: + mguide.ShowButton = false; + objPrompt = "THAT did it. I'd keep that terminal open until connection to the server drops. Once it's done, I'll close it and tell you what to do next."; + mguide.ButtonText = "Connect to server"; + break; + case 6: + mguide.ShowButton = true; + mguide.ButtonText = "End DevX"; + mguide.OnButtonClick = new Action(() => + { + //code to run to start uninstall of ShiftOS. + }); + objPrompt = "Firewall, check. Primary server, check. Secondary server, CHECK. Telemetry server, CHECK. Now it's time to disable DevX himself. After all, he IS just code."; + break; + case 7: + var h = MissionComplete; + h?.Invoke(CurrentObjective, new EventArgs()); + break; + } + break; + } + } + #endregion + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/FinalMission/MissionGuide.Designer.cs b/source/WindowsFormsApplication1/FinalMission/MissionGuide.Designer.cs new file mode 100644 index 0000000..45a51f1 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/MissionGuide.Designer.cs @@ -0,0 +1,118 @@ +namespace ShiftOS.FinalMission +{ + partial class MissionGuide + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.panel1 = new System.Windows.Forms.Panel(); + this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnstart = new System.Windows.Forms.Button(); + this.tmr_setupui = new System.Windows.Forms.Timer(this.components); + this.lbprompt = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.flbuttons.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.lbprompt); + this.panel1.Controls.Add(this.flbuttons); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(520, 189); + this.panel1.TabIndex = 0; + // + // flbuttons + // + this.flbuttons.Controls.Add(this.btnstart); + this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.flbuttons.Location = new System.Drawing.Point(0, 155); + this.flbuttons.Name = "flbuttons"; + this.flbuttons.Size = new System.Drawing.Size(518, 32); + this.flbuttons.TabIndex = 0; + // + // btnstart + // + this.btnstart.AutoSize = true; + this.btnstart.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstart.Location = new System.Drawing.Point(435, 3); + this.btnstart.Name = "btnstart"; + this.btnstart.Size = new System.Drawing.Size(80, 23); + this.btnstart.TabIndex = 0; + this.btnstart.Text = "Let\'s go."; + this.btnstart.UseVisualStyleBackColor = true; + this.btnstart.Click += new System.EventHandler(this.btnstart_Click); + // + // tmr_setupui + // + this.tmr_setupui.Enabled = true; + this.tmr_setupui.Tick += new System.EventHandler(this.tmr_setupui_Tick); + // + // lbprompt + // + this.lbprompt.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbprompt.Location = new System.Drawing.Point(0, 0); + this.lbprompt.Margin = new System.Windows.Forms.Padding(50); + this.lbprompt.Name = "lbprompt"; + this.lbprompt.Padding = new System.Windows.Forms.Padding(15); + this.lbprompt.Size = new System.Drawing.Size(518, 155); + this.lbprompt.TabIndex = 1; + this.lbprompt.Text = "label1"; + // + // MissionGuide + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(520, 189); + this.Controls.Add(this.panel1); + this.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.ForeColor = System.Drawing.Color.LightGreen; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "MissionGuide"; + this.Text = "MissionGuide"; + this.panel1.ResumeLayout(false); + this.flbuttons.ResumeLayout(false); + this.flbuttons.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.FlowLayoutPanel flbuttons; + private System.Windows.Forms.Button btnstart; + private System.Windows.Forms.Timer tmr_setupui; + private System.Windows.Forms.Label lbprompt; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/FinalMission/MissionGuide.cs b/source/WindowsFormsApplication1/FinalMission/MissionGuide.cs new file mode 100644 index 0000000..11f1f10 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/MissionGuide.cs @@ -0,0 +1,49 @@ +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; + +namespace ShiftOS.FinalMission +{ + public partial class MissionGuide : Form + { + public MissionGuide() + { + InitializeComponent(); + this.TopMost = true; + } + + public Action OnButtonClick = null; + + public bool ShowButton + { + get { return btnstart.Visible; } + set { btnstart.Visible = value; } + } + + public string ButtonText + { + get { return btnstart.Text; } + set { btnstart.Text = value; } + } + + + + private void btnstart_Click(object sender, EventArgs e) + { + OnButtonClick.Invoke(); + } + + private void tmr_setupui_Tick(object sender, EventArgs e) + { + lbprompt.Text = EndGameHandler.CurrentObjective.ToUpper() + Environment.NewLine + Environment.NewLine; + lbprompt.Text += EndGameHandler.CurrentObjectivePrompt; + this.Location = new Point(15, 45); + } + } +} diff --git a/source/WindowsFormsApplication1/FinalMission/MissionGuide.resx b/source/WindowsFormsApplication1/FinalMission/MissionGuide.resx new file mode 100644 index 0000000..10f6fc7 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/MissionGuide.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/FinalMission/QuestViewer.Designer.cs b/source/WindowsFormsApplication1/FinalMission/QuestViewer.Designer.cs new file mode 100644 index 0000000..89cfd19 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/QuestViewer.Designer.cs @@ -0,0 +1,62 @@ +namespace ShiftOS.FinalMission +{ + partial class QuestViewer + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbobjectives = new System.Windows.Forms.ListBox(); + this.SuspendLayout(); + // + // lbobjectives + // + this.lbobjectives.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbobjectives.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Italic); + this.lbobjectives.FormattingEnabled = true; + this.lbobjectives.ItemHeight = 16; + this.lbobjectives.Location = new System.Drawing.Point(0, 0); + this.lbobjectives.Name = "lbobjectives"; + this.lbobjectives.Size = new System.Drawing.Size(389, 423); + this.lbobjectives.TabIndex = 0; + // + // QuestViewer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(389, 423); + this.Controls.Add(this.lbobjectives); + this.Name = "QuestViewer"; + this.Text = "QuestViewer"; + this.Load += new System.EventHandler(this.QuestViewer_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListBox lbobjectives; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/FinalMission/QuestViewer.cs b/source/WindowsFormsApplication1/FinalMission/QuestViewer.cs new file mode 100644 index 0000000..3b447f9 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/QuestViewer.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.FinalMission +{ + public partial class QuestViewer : Form + { + public QuestViewer() + { + InitializeComponent(); + } + + private void QuestViewer_Load(object sender, EventArgs e) + { + SetupList(); + StartQuestCheckThread(); + var tmr = new System.Windows.Forms.Timer(); + tmr.Interval = 500; + tmr.Tick += (object s, EventArgs a) => + { + SetupList(); + }; + tmr.Start(); + } + + public void SetupList() + { + lbobjectives.Items.Clear(); + foreach(var itm in EndGameHandler.ThingsToDo) + { + lbobjectives.Items.Add(itm.Key); + } + } + + public void StartQuestCheckThread() + { + var t = new Thread(new ThreadStart(new Action(() => { + //Start checkloop. + while(true) + { + CheckObjective(EndGameHandler.CurrentObjective); + } + }))); + t.Start(); + } + + public void CheckObjective(string obj) + { + if(EndGameHandler.ThingsToDo[obj] == true) + { + EndGameHandler.GoToNextObjective(); + } + } + } +} diff --git a/source/WindowsFormsApplication1/FinalMission/QuestViewer.resx b/source/WindowsFormsApplication1/FinalMission/QuestViewer.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/FinalMission/QuestViewer.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file -- cgit v1.2.3