mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
commit
9d3fa715e5
6 changed files with 50 additions and 91 deletions
|
@ -12,17 +12,13 @@
|
|||
|
||||
namespace Histacom2
|
||||
{
|
||||
public partial class AchievementBox : Form
|
||||
{
|
||||
public partial class AchievementBox : Form {
|
||||
private bool stayOnScreen = false;
|
||||
|
||||
public AchievementBox(int type)
|
||||
{
|
||||
public AchievementBox(int type) {
|
||||
InitializeComponent();
|
||||
this.BringToFront();
|
||||
this.Show();
|
||||
switch (type)
|
||||
{
|
||||
BringToFront();
|
||||
switch (type) {
|
||||
case 0: //Piracy Ending
|
||||
BackgroundImage = Properties.Resources.EndingPiracy;
|
||||
stayOnScreen = true;
|
||||
|
@ -37,25 +33,22 @@ public AchievementBox(int type)
|
|||
break;
|
||||
}
|
||||
Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - 202, -102);
|
||||
while (this.Location.Y != 0)
|
||||
{
|
||||
Show();
|
||||
while (Location.Y != 0) {
|
||||
Thread.Sleep(5);
|
||||
Location = new Point(Location.X, Location.Y + 1);
|
||||
}
|
||||
if (!stayOnScreen)
|
||||
{
|
||||
if (!stayOnScreen) {
|
||||
Thread.Sleep(3000);
|
||||
while (this.Location.Y != -102)
|
||||
{
|
||||
while (Location.Y != -102) {
|
||||
Thread.Sleep(5);
|
||||
Location = new Point(Location.X, Location.Y - 1);
|
||||
}
|
||||
this.Close();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
private void button1_Click(object sender, EventArgs e) {
|
||||
Program.title.Show();
|
||||
SaveSystem.CurrentSave = null;
|
||||
SaveSystem.currentTheme = null;
|
||||
|
|
|
@ -11,24 +11,19 @@
|
|||
|
||||
namespace Histacom2
|
||||
{
|
||||
public partial class AchievementScreen : Form
|
||||
{
|
||||
public AchievementScreen()
|
||||
{
|
||||
public partial class AchievementScreen : Form {
|
||||
public AchievementScreen() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void AchievementScreen_Load(object sender, EventArgs e)
|
||||
{
|
||||
private void AchievementScreen_Load(object sender, EventArgs e) {
|
||||
byte[] achieved = SaveSystem.GetAchievements();
|
||||
|
||||
if (achieved[0] == 1)
|
||||
{
|
||||
if (achieved[0] == 1) {
|
||||
listView1.Items[0].ImageIndex = 0;
|
||||
listView1.Items[0].Text = "Piracy Ending";
|
||||
}
|
||||
if (achieved[1] == 1)
|
||||
{
|
||||
if (achieved[1] == 1) {
|
||||
listView1.Items[1].ImageIndex = 0;
|
||||
listView1.Items[1].Text = "Destruction Ending";
|
||||
}
|
||||
|
@ -36,9 +31,8 @@ private void AchievementScreen_Load(object sender, EventArgs e)
|
|||
// if (achieved[21] == 1) listView2.Items[1].ImageIndex = 0;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
private void button1_Click(object sender, EventArgs e) {
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,8 +78,7 @@ public static async void StartObjective()
|
|||
public static async void VirusDestruction(WinClassicIE6Bad ie)
|
||||
{
|
||||
LabelMaker();
|
||||
if (Console.ParentForm != null)
|
||||
{
|
||||
if (Console.ParentForm != null) {
|
||||
Console.ParentForm.Close();
|
||||
}
|
||||
await Task.Delay(10000); ((WinXP)ie.ParentForm).maximizebutton.Image = ((WinXP)ie.ParentForm).closebutton.Image;
|
||||
|
|
|
@ -13,15 +13,12 @@ namespace Histacom2
|
|||
{
|
||||
public partial class SeizureWarning : UserControl
|
||||
{
|
||||
public SeizureWarning()
|
||||
{
|
||||
public SeizureWarning() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
File.WriteAllText(Path.Combine(Engine.SaveSystem.DataDirectory, "o.k"), ".");
|
||||
this.Hide();
|
||||
private void button1_Click(object sender, EventArgs e) {
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
4
Histacom2/TitleScreen.Designer.cs
generated
4
Histacom2/TitleScreen.Designer.cs
generated
|
@ -136,6 +136,8 @@ private void InitializeComponent()
|
|||
this.startbutton.TabIndex = 12;
|
||||
this.startbutton.TabStop = false;
|
||||
this.startbutton.Click += new System.EventHandler(this.startbutton_Click);
|
||||
this.startbutton.MouseLeave += new System.EventHandler(this.gameversion_MouseLeave);
|
||||
this.startbutton.MouseHover += new System.EventHandler(this.gameversion_MouseHover);
|
||||
//
|
||||
// startmenu
|
||||
//
|
||||
|
@ -165,7 +167,7 @@ private void InitializeComponent()
|
|||
this.startmenuitems.Name = "startmenuitems";
|
||||
this.startmenuitems.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0);
|
||||
this.startmenuitems.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
|
||||
this.startmenuitems.Size = new System.Drawing.Size(140, 239);
|
||||
this.startmenuitems.Size = new System.Drawing.Size(140, 220);
|
||||
this.startmenuitems.TabIndex = 0;
|
||||
this.startmenuitems.Text = "StartMenu";
|
||||
//
|
||||
|
|
|
@ -43,21 +43,16 @@ public static extern int SendMessage(IntPtr hWnd,
|
|||
public static extern bool ReleaseCapture();
|
||||
|
||||
|
||||
public TitleScreen()
|
||||
{
|
||||
public TitleScreen() {
|
||||
InitializeComponent();
|
||||
this.startmenu.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
|
||||
if (!File.Exists(Path.Combine(DataDirectory, "o.k")))
|
||||
{
|
||||
SeizureWarning sw = new SeizureWarning();
|
||||
sw.Size = programContent.Size;
|
||||
programContent.Controls.Add(sw);
|
||||
sw.BringToFront();
|
||||
}
|
||||
}
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
public void StartGame() {
|
||||
// Time to decide which OS to start up!
|
||||
|
||||
switch (CurrentSave.CurrentOS)
|
||||
|
@ -115,8 +110,7 @@ public void StartGame()
|
|||
}
|
||||
}
|
||||
|
||||
private void VM_WidthHeight_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
private void VM_WidthHeight_KeyPress(object sender, KeyPressEventArgs e) {
|
||||
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && (e.KeyChar != '.')) e.Handled = true;
|
||||
|
||||
// only allow one decimal point
|
||||
|
@ -124,8 +118,7 @@ private void VM_WidthHeight_KeyPress(object sender, KeyPressEventArgs e)
|
|||
}
|
||||
|
||||
// When the TitleScreen Loads
|
||||
private void TitleScreen_Load(object sender, EventArgs e)
|
||||
{
|
||||
private void TitleScreen_Load(object sender, EventArgs e) {
|
||||
Directory.CreateDirectory(GameDirectory);
|
||||
Directory.CreateDirectory(DataDirectory);
|
||||
Directory.CreateDirectory(AllProfilesDirectory);
|
||||
|
@ -155,27 +148,22 @@ private void TitleScreen_Load(object sender, EventArgs e)
|
|||
#region NewGame
|
||||
|
||||
// When NewGame is Clicked
|
||||
private void NewGame_Click(object sender, EventArgs e)
|
||||
{
|
||||
private void NewGame_Click(object sender, EventArgs e) {
|
||||
newGameBox = new NewGameDialog();
|
||||
newGameBox.ShowDialog();
|
||||
|
||||
if (newGameBox.Successful)
|
||||
{
|
||||
if (newGameBox.Successful) {
|
||||
NewGame();
|
||||
StartGame();
|
||||
}
|
||||
}
|
||||
|
||||
public void BSODRewind(object sender, EventArgs e)
|
||||
{
|
||||
if (progress == "95")
|
||||
{
|
||||
public void BSODRewind(object sender, EventArgs e) {
|
||||
if (progress == "95") {
|
||||
frm95.Close();
|
||||
frm95 = null;
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
// Time to close all the game applications
|
||||
foreach (Form frm in Application.OpenForms) if (frm.Tag.ToString() != "ignoreFormOnTaskbar") frm.Close();
|
||||
} catch {
|
||||
|
@ -194,13 +182,11 @@ public void BSODRewind(object sender, EventArgs e)
|
|||
#endregion
|
||||
|
||||
#region LoadGame
|
||||
private void LoadGame_Click(object sender, EventArgs e)
|
||||
{
|
||||
private void LoadGame_Click(object sender, EventArgs e) {
|
||||
loadGameBox = new LoadGameDialog();
|
||||
loadGameBox.ShowDialog();
|
||||
|
||||
if (loadGameBox.successful)
|
||||
{
|
||||
if (loadGameBox.successful) {
|
||||
LoadSave();
|
||||
SetTheme();
|
||||
StartGame();
|
||||
|
@ -209,66 +195,54 @@ private void LoadGame_Click(object sender, EventArgs e)
|
|||
#endregion
|
||||
|
||||
#region ExitButton
|
||||
private void Exit_Click(object sender, EventArgs e)
|
||||
{
|
||||
private void Exit_Click(object sender, EventArgs e) {
|
||||
Application.Exit();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region HelpButton
|
||||
private void helpItemClick(object sender, EventArgs e)
|
||||
{
|
||||
private void helpItemClick(object sender, EventArgs e) {
|
||||
System.Diagnostics.Process.Start("https://github.com/TheRandomMelon/Histacom2/wiki");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
private void gameversion_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
private void gameversion_MouseHover(object sender, EventArgs e) {
|
||||
gameversion.Text = "There are no easter eggs here!";
|
||||
}
|
||||
|
||||
private void gameversion_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
private void gameversion_MouseLeave(object sender, EventArgs e) {
|
||||
gameversion.Text = gameVersion;
|
||||
}
|
||||
|
||||
private void startbutton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DevMode)
|
||||
{
|
||||
private void startbutton_Click(object sender, EventArgs e) {
|
||||
if (DevMode) {
|
||||
DevMode = false;
|
||||
gameversion.Text = "Developer Mode Deactivated";
|
||||
} else {
|
||||
DevMode = true;
|
||||
gameversion.Text = "Developer Mode Activated";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void closebutton_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
private void closebutton_Click_1(object sender, EventArgs e) {
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void updateText_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (gameversion.Text != gameVersion)
|
||||
{
|
||||
private void updateText_Tick(object sender, EventArgs e) {
|
||||
if (gameversion.Text != gameVersion) {
|
||||
gameversion.Text = gameVersion;
|
||||
updateText.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void achievementsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
private void achievementsToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
AchievementScreen achievelist = new AchievementScreen();
|
||||
achievelist.ShowDialog();
|
||||
}
|
||||
|
||||
private void helpMenu(object sender, EventArgs e)
|
||||
{
|
||||
private void helpMenu(object sender, EventArgs e) {
|
||||
System.Diagnostics.Process.Start("https://github.com/TheRandomMelon/Histacom2/wiki");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue