From 2a747334bd926d79537b9e8d4f38c79a815752e5 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 7 Mar 2017 14:56:48 -0500 Subject: WHOA HACKING --- .../Applications/TutorialBox.Designer.cs | 57 ++++++++++ ShiftOS.WinForms/Applications/TutorialBox.cs | 73 +++++++++++++ ShiftOS.WinForms/Applications/TutorialBox.resx | 120 +++++++++++++++++++++ 3 files changed, 250 insertions(+) create mode 100644 ShiftOS.WinForms/Applications/TutorialBox.Designer.cs create mode 100644 ShiftOS.WinForms/Applications/TutorialBox.cs create mode 100644 ShiftOS.WinForms/Applications/TutorialBox.resx (limited to 'ShiftOS.WinForms/Applications') diff --git a/ShiftOS.WinForms/Applications/TutorialBox.Designer.cs b/ShiftOS.WinForms/Applications/TutorialBox.Designer.cs new file mode 100644 index 0000000..6e74023 --- /dev/null +++ b/ShiftOS.WinForms/Applications/TutorialBox.Designer.cs @@ -0,0 +1,57 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class TutorialBox + { + /// + /// 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.lbltuttext = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // lbltuttext + // + this.lbltuttext.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbltuttext.Location = new System.Drawing.Point(0, 0); + this.lbltuttext.Name = "lbltuttext"; + this.lbltuttext.Size = new System.Drawing.Size(401, 134); + this.lbltuttext.TabIndex = 0; + // + // TutorialBox + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbltuttext); + this.Name = "TutorialBox"; + this.Size = new System.Drawing.Size(401, 134); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lbltuttext; + } +} diff --git a/ShiftOS.WinForms/Applications/TutorialBox.cs b/ShiftOS.WinForms/Applications/TutorialBox.cs new file mode 100644 index 0000000..25921e1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/TutorialBox.cs @@ -0,0 +1,73 @@ +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; +using ShiftOS.Engine; +using System.Threading; + +namespace ShiftOS.WinForms.Applications +{ + + [DefaultTitle("Tutorial objective")] + public partial class TutorialBox : UserControl, IShiftOSWindow + { + public TutorialBox() + { + InitializeComponent(); + IsComplete = false; + lbltuttext.Text = ""; + } + + bool stillTyping = false; + + public void SetObjective(string text) + { + while (stillTyping == true) + { + + } + + new Thread(() => + { + stillTyping = true; + this.Invoke(new Action(() => + { + lbltuttext.Text = ""; + })); + foreach(var c in text.ToCharArray()) + { + this.Invoke(new Action(() => + { + lbltuttext.Text += c; + })); + Thread.Sleep(75); + } + stillTyping = false; + }).Start(); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool IsComplete { get; set; } + + public bool OnUnload() + { + return IsComplete; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/TutorialBox.resx b/ShiftOS.WinForms/Applications/TutorialBox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/TutorialBox.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