aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-06-18 18:39:27 -0700
committerAShifter <[email protected]>2017-06-18 18:39:27 -0700
commitbf7fcf52ad5373e25fbe399f4f1dd1091f53c159 (patch)
tree858cc86e8f02535ff7ec081fb290611d0ff0705f /TimeHACK.Main/OS
parent15f2e1a7e3ec5d85aee4a126144722feeff4682f (diff)
downloadhistacom2-bf7fcf52ad5373e25fbe399f4f1dd1091f53c159.tar.gz
histacom2-bf7fcf52ad5373e25fbe399f4f1dd1091f53c159.tar.bz2
histacom2-bf7fcf52ad5373e25fbe399f4f1dd1091f53c159.zip
Some more terminal work
IT WORKS! IT WWOOOOORRRKKKSS!!! YOu can now use Thread.Sleep(); without issues.
Diffstat (limited to 'TimeHACK.Main/OS')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs28
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs1
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs4
3 files changed, 19 insertions, 14 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
index 2310af4..faafdea 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
@@ -14,35 +14,39 @@ namespace TimeHACK.OS.Win95.Win95Apps.Story
{
static class Hack1 : Object
{
- static WinClassicTerminal term = new WinClassicTerminal();
+ static WinClassicTerminal Console = new WinClassicTerminal();
static WindowManager wm = new WindowManager();
static Boolean ended = false;
static Thread soundThread = new Thread(dialup_sound_play);
+ static Boolean devMode = false;
// This is the very first story script!
public static void startObjective()
{
System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer();
- wm.startWin95(term, "MS-DOS Prompt", null, true, true);
- term.WriteLine("192.168.0.1 Connecting...");
-
- term.Invalidate();
- Application.DoEvents();
+ wm.startWin95(Console, "MS-DOS Prompt", null, true, true);
+ Console.WriteLine("telnet> 104.27.135.159 Connecting...");
tmr.Interval = 1;
tmr.Tick += new EventHandler(CheckIfSoundFinished);
- soundThread.Start();
-
- tmr.Start();
+ if (devMode == true)
+ {
+ continueObjective();
+ }
+ else
+ {
+ soundThread.Start();
+ tmr.Start();
+ }
}
public static void continueObjective()
{
- term.WriteLine("192.168.0.1 Connected.");
-
- Application.DoEvents();
+ Console.WriteLine("telnet> 104.27.135.159 Connected.");
+ Thread.Sleep(2500);
+ Console.WriteLine("telnet> 104.27.135.159 set hostname to 'TheHiddenHacker'.");
}
public static void CheckIfSoundFinished(Object sender, EventArgs e)
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
index d7e9781..ddae557 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
@@ -35,6 +35,7 @@
//
this.richTextBox1.BackColor = System.Drawing.Color.Black;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.richTextBox1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richTextBox1.ForeColor = System.Drawing.Color.White;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
index d25b409..174c5b4 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
@@ -20,9 +20,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
public WinClassicTerminal()
{
InitializeComponent();
- this.richTextBox1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
}
- private SoundPlayer startsound;
/// <summary>
/// Write text to the Terminal and create a new line. Very similar to the Win32 Console.WriteLine Function.
/// </summary>
@@ -30,6 +28,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
public void WriteLine(string Text)
{
richTextBox1.AppendText(Text + "\n");
+ richTextBox1.Update();
}
/// <summary>
@@ -39,6 +38,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
public void Write(String Text)
{
richTextBox1.AppendText(Text);
+ richTextBox1.Update();
}
}
}