mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
some hack4 stuff
This commit is contained in:
parent
aff052b475
commit
57817b7534
6 changed files with 43 additions and 46 deletions
12
Histacom2.Engine/Template/WinXP.Designer.cs
generated
12
Histacom2.Engine/Template/WinXP.Designer.cs
generated
|
@ -90,7 +90,7 @@ private void InitializeComponent()
|
|||
// 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 @@ private void InitializeComponent()
|
|||
//
|
||||
// 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 @@ private void InitializeComponent()
|
|||
//
|
||||
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 @@ private void InitializeComponent()
|
|||
//
|
||||
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);
|
||||
|
|
|
@ -17,6 +17,7 @@ public partial class WinXP : Form
|
|||
public WinXP()
|
||||
{
|
||||
InitializeComponent();
|
||||
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||
DoubleBuffered = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,38 +10,21 @@ public class WindowManager
|
|||
{
|
||||
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 @@ public WinXP InitXP(UserControl content, string title, Image icon, bool MaxButto
|
|||
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;
|
||||
|
||||
|
|
|
@ -54,6 +54,11 @@ public WinClassicTerminal(bool readOnly)
|
|||
{
|
||||
actionPanel.Hide();
|
||||
cmdPrompt.ReadOnly = true;
|
||||
if (SaveSystem.CurrentSave.CurrentOS == "xpbad")
|
||||
{
|
||||
cmdPrompt.BorderStyle = BorderStyle.None;
|
||||
cmdPrompt.ScrollBars = RichTextBoxScrollBars.Vertical;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -68,7 +73,8 @@ public WinClassicTerminal(bool readOnly)
|
|||
public void WriteLine(string Text)
|
||||
{
|
||||
cmdPrompt.AppendText(Text + "\n");
|
||||
this.Update();
|
||||
cmdPrompt.Update();
|
||||
cmdPrompt.ScrollToCaret();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -14,8 +14,15 @@ public class Hack4 : object
|
|||
|
||||
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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
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 @@ public WindowsXPBad()
|
|||
// 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 @@ private void Desktop_Load(object sender, EventArgs e)
|
|||
// 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 @@ private void Desktop_Load(object sender, EventArgs e)
|
|||
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 @@ private void Desktop_Load(object sender, EventArgs e)
|
|||
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()
|
||||
|
|
Loading…
Reference in a new issue