aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-10-24 19:21:45 -0400
committerlempamo <[email protected]>2017-10-24 19:21:45 -0400
commit57817b7534a620841c9a825884a6f5e7ffc2f219 (patch)
tree92645540179f49f795fe1f97f0acdb9a80b339df
parentaff052b475abc5d4035369a85fa471f62cad021b (diff)
downloadhistacom2-57817b7534a620841c9a825884a6f5e7ffc2f219.tar.gz
histacom2-57817b7534a620841c9a825884a6f5e7ffc2f219.tar.bz2
histacom2-57817b7534a620841c9a825884a6f5e7ffc2f219.zip
some hack4 stuff
-rw-r--r--Histacom2.Engine/Template/WinXP.Designer.cs12
-rw-r--r--Histacom2.Engine/Template/WinXP.cs1
-rw-r--r--Histacom2.Engine/WindowManager.cs47
-rw-r--r--Histacom2/OS/Win95/Win95Apps/WinClassicTerminal.cs8
-rw-r--r--Histacom2/OS/WinXPBad/Story/Hack4.cs9
-rw-r--r--Histacom2/OS/WinXPBad/WinXPBad.cs12
6 files changed, 43 insertions, 46 deletions
diff --git a/Histacom2.Engine/Template/WinXP.Designer.cs b/Histacom2.Engine/Template/WinXP.Designer.cs
index 0d1e060..a97f44b 100644
--- a/Histacom2.Engine/Template/WinXP.Designer.cs
+++ b/Histacom2.Engine/Template/WinXP.Designer.cs
@@ -90,7 +90,7 @@
// toprightcorner
//
this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.toprightcorner.BackColor = System.Drawing.Color.Magenta;
+ this.toprightcorner.BackColor = System.Drawing.Color.Transparent;
this.toprightcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("toprightcorner.BackgroundImage")));
this.toprightcorner.Location = new System.Drawing.Point(294, 0);
this.toprightcorner.Name = "toprightcorner";
@@ -109,7 +109,7 @@
//
// topleftcorner
//
- this.topleftcorner.BackColor = System.Drawing.Color.Magenta;
+ this.topleftcorner.BackColor = System.Drawing.Color.Transparent;
this.topleftcorner.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("topleftcorner.BackgroundImage")));
this.topleftcorner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.topleftcorner.Location = new System.Drawing.Point(0, 0);
@@ -178,11 +178,11 @@
//
this.programname.AutoSize = true;
this.programname.BackColor = System.Drawing.Color.Transparent;
- this.programname.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.programname.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.programname.ForeColor = System.Drawing.Color.White;
- this.programname.Location = new System.Drawing.Point(25, 8);
+ this.programname.Location = new System.Drawing.Point(25, 7);
this.programname.Name = "programname";
- this.programname.Size = new System.Drawing.Size(99, 13);
+ this.programname.Size = new System.Drawing.Size(112, 16);
this.programname.TabIndex = 3;
this.programname.Text = "Application Title";
this.programname.MouseDown += new System.Windows.Forms.MouseEventHandler(this.top_MouseDown);
@@ -221,11 +221,13 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Magenta;
this.ClientSize = new System.Drawing.Size(300, 300);
this.Controls.Add(this.program);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "WinXP";
this.Text = "WinXP";
+ this.TransparencyKey = System.Drawing.Color.Magenta;
this.Load += new System.EventHandler(this.WinXP_Load);
this.program.ResumeLayout(false);
this.top.ResumeLayout(false);
diff --git a/Histacom2.Engine/Template/WinXP.cs b/Histacom2.Engine/Template/WinXP.cs
index fa26611..9406b87 100644
--- a/Histacom2.Engine/Template/WinXP.cs
+++ b/Histacom2.Engine/Template/WinXP.cs
@@ -17,6 +17,7 @@ namespace Histacom2.Engine.Template
public WinXP()
{
InitializeComponent();
+ SetStyle(ControlStyles.SupportsTransparentBackColor, true);
DoubleBuffered = true;
}
diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs
index 12f7954..dec647f 100644
--- a/Histacom2.Engine/WindowManager.cs
+++ b/Histacom2.Engine/WindowManager.cs
@@ -10,38 +10,21 @@ namespace Histacom2.Engine
{
public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
+ /// <summary>
+ /// Creates and returns a WinClassic window.
+ /// </summary>
+ /// <param name="content">The UserControl to put inside the window.</param>
+ /// <param name="title">The name of the window.</param>
+ /// <param name="icon">The window's icon. If set to null, then the title moves over to compensate.</param>
+ /// <param name="MaxButton">Whether or not the maximize button is shown.</param>
+ /// <param name="MinButton">Whether or not the minimize button is shown.</param>
+ /// <param name="ShowApplicationAsDialog">Whether or not to interrupt all other processes while this window is open.</param>
+ /// <param name="resize">Whether or not this window is resizable.</param>
+ /// <returns></returns>
public WinClassic Init(UserControl content, string title, Image icon, bool MaxButton, bool MinButton, bool ShowApplicationAsDialog = false, bool resize = true)
{
- WinClassic app = null;
- // Setup Window
- switch (SaveSystem.CurrentSave.CurrentOS)
- {
- case "95":
- {
- app = new WinClassic();
- break;
- }
- case "98":
- {
- app = new WinClassic();
- break;
- }
- case "ME":
- {
- app = new WinClassic();
- break;
- }
- case "2000":
- {
- app = new WinClassic();
- break;
- }
- default:
- {
- app = new WinClassic();
- break;
- }
- }
+ WinClassic app = new WinClassic();
+
app.Text = title;
app.Title.Text = title;
app.Width = content.Width + 8;
@@ -128,8 +111,8 @@ namespace Histacom2.Engine
if (icon == null)
{
app.programIcon.Hide();
- app.programIcon.Image = Engine.Properties.Resources.nullIcon;
- app.programname.Location = new Point(2, 1);
+ app.programIcon.Image = Properties.Resources.nullIcon;
+ app.programname.Location = new Point(6, 7);
}
else app.programIcon.Image = icon;
diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicTerminal.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicTerminal.cs
index d87dc4e..96e053d 100644
--- a/Histacom2/OS/Win95/Win95Apps/WinClassicTerminal.cs
+++ b/Histacom2/OS/Win95/Win95Apps/WinClassicTerminal.cs
@@ -54,6 +54,11 @@ namespace Histacom2.OS.Win95.Win95Apps
{
actionPanel.Hide();
cmdPrompt.ReadOnly = true;
+ if (SaveSystem.CurrentSave.CurrentOS == "xpbad")
+ {
+ cmdPrompt.BorderStyle = BorderStyle.None;
+ cmdPrompt.ScrollBars = RichTextBoxScrollBars.Vertical;
+ }
}
else
{
@@ -68,7 +73,8 @@ namespace Histacom2.OS.Win95.Win95Apps
public void WriteLine(string Text)
{
cmdPrompt.AppendText(Text + "\n");
- this.Update();
+ cmdPrompt.Update();
+ cmdPrompt.ScrollToCaret();
}
/// <summary>
diff --git a/Histacom2/OS/WinXPBad/Story/Hack4.cs b/Histacom2/OS/WinXPBad/Story/Hack4.cs
index 2a9bcd7..bf6e6c9 100644
--- a/Histacom2/OS/WinXPBad/Story/Hack4.cs
+++ b/Histacom2/OS/WinXPBad/Story/Hack4.cs
@@ -14,8 +14,15 @@ namespace Histacom2.OS.WinXPBad.Story
public static async void StartObjective()
{
+ await Task.Delay(6000);
Win95.Win95Apps.WinClassicTerminal Console = new Win95.Win95Apps.WinClassicTerminal(true);
- WinXP app = wm.InitXP(Console, "MS-DOS Prompt", null, true, true);
+ WinXP app = wm.InitXP(Console, "Command Prompt", null, true, true);
+ Console.WriteLine("telnet> 104.27.135.159 Connecting...");
+
+ await Task.Delay(2500); Console.WriteLine("telnet> 104.27.135.159 Connected.");
+ await Task.Delay(2500); Console.WriteLine("telnet> 104.27.135.159 set hostname to 'TheHiddenHacker'.");
+ await Task.Delay(2500); Console.WriteLine("TheHiddenHacker> STOP!");
+ await Task.Delay(3500); Console.WriteLine("TheHiddenHacker> DON'T OPEN INTERNET EXPLORER!");
}
}
}
diff --git a/Histacom2/OS/WinXPBad/WinXPBad.cs b/Histacom2/OS/WinXPBad/WinXPBad.cs
index 67985be..302e9e9 100644
--- a/Histacom2/OS/WinXPBad/WinXPBad.cs
+++ b/Histacom2/OS/WinXPBad/WinXPBad.cs
@@ -12,6 +12,7 @@ using Histacom2.OS.Win95.Win95Apps.Story;
using static Histacom2.Engine.SaveSystem;
using Histacom2.OS.Win98.Win98Apps;
using Histacom2.GlobalPrograms;
+using Histacom2.OS.WinXPBad.Story;
namespace Histacom2.OS.WinXPBad
{
@@ -44,8 +45,6 @@ namespace Histacom2.OS.WinXPBad
// When New Game is clicked in TitleScreen.cs
private void Desktop_Load(object sender, EventArgs e)
{
- UpgradeFileSystem( "98");
-
if (currentTheme.defaultWallpaper != null) desktopicons.BackgroundImage = new Bitmap(currentTheme.defaultWallpaper, Width, Height);
//Start Menu Color - Commented until it works reliably
//startmenuitems.Renderer = new MyRenderer();
@@ -54,7 +53,7 @@ namespace Histacom2.OS.WinXPBad
// Make Font Mandatory
fontLoad();
- // Play Windows 95 Start Sound
+ // Play Start Sound
Stream audio = currentTheme.startSound;
startsound = new SoundPlayer(audio);
startsound.Play();
@@ -63,10 +62,7 @@ namespace Histacom2.OS.WinXPBad
startmenu.Hide();
// Check for and set VM Mode
- if (this.FormBorderStyle != FormBorderStyle.None)
- {
- this.Text = "Histacom2 - VM Mode";
- }
+ if (this.FormBorderStyle != FormBorderStyle.None) Text = "Histacom2 - VM Mode";
// Start the ClockTimer
clockTimer.Start();
@@ -87,6 +83,8 @@ namespace Histacom2.OS.WinXPBad
lv.Position = new Point(20, 20);
desktopicons.Invalidate();
//DesktopController.RefreshDesktopIcons(new ListViewItem[] { new System.Windows.Forms.ListViewItem("Recycle Bin", 7) }, ref desktopicons, Path.Combine(ProfileWindowsDirectory, "Desktop"));
+
+ Hack4.StartObjective();
}
private void fontLoad()