From 564ac0f39160ce1843665a4b1ec2b925bdb8db6b Mon Sep 17 00:00:00 2001 From: lempamo Date: Mon, 30 Oct 2017 21:59:05 -0400 Subject: RIP VM Mode --- Histacom2/TitleScreen.Designer.cs | 83 --------------------------------------- 1 file changed, 83 deletions(-) (limited to 'Histacom2/TitleScreen.Designer.cs') diff --git a/Histacom2/TitleScreen.Designer.cs b/Histacom2/TitleScreen.Designer.cs index 3d3ef0c..6fa0e63 100644 --- a/Histacom2/TitleScreen.Designer.cs +++ b/Histacom2/TitleScreen.Designer.cs @@ -35,10 +35,6 @@ this.programContent = new System.Windows.Forms.Panel(); this.pictureBox3 = new System.Windows.Forms.PictureBox(); this.panel2 = new System.Windows.Forms.Panel(); - this.VM_Height = new System.Windows.Forms.NumericUpDown(); - this.VM_Width = new System.Windows.Forms.NumericUpDown(); - this.vm_mode = new System.Windows.Forms.CheckBox(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.gameversion = new System.Windows.Forms.Label(); this.startbutton = new System.Windows.Forms.PictureBox(); this.startmenu = new System.Windows.Forms.Panel(); @@ -61,9 +57,6 @@ this.programContent.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); this.panel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.VM_Height)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.VM_Width)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startbutton)).BeginInit(); this.startmenu.SuspendLayout(); this.startmenuitems.SuspendLayout(); @@ -115,10 +108,6 @@ // panel2 // this.panel2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel2.BackgroundImage"))); - this.panel2.Controls.Add(this.VM_Height); - this.panel2.Controls.Add(this.VM_Width); - this.panel2.Controls.Add(this.vm_mode); - this.panel2.Controls.Add(this.pictureBox1); this.panel2.Controls.Add(this.gameversion); this.panel2.Controls.Add(this.startbutton); this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom; @@ -127,71 +116,6 @@ this.panel2.Size = new System.Drawing.Size(791, 28); this.panel2.TabIndex = 10; // - // VM_Height - // - this.VM_Height.Location = new System.Drawing.Point(658, 5); - this.VM_Height.Maximum = new decimal(new int[] { - 2160, - 0, - 0, - 0}); - this.VM_Height.Minimum = new decimal(new int[] { - 480, - 0, - 0, - 0}); - this.VM_Height.Name = "VM_Height"; - this.VM_Height.Size = new System.Drawing.Size(50, 20); - this.VM_Height.TabIndex = 15; - this.VM_Height.Value = new decimal(new int[] { - 480, - 0, - 0, - 0}); - // - // VM_Width - // - this.VM_Width.Location = new System.Drawing.Point(605, 5); - this.VM_Width.Maximum = new decimal(new int[] { - 3840, - 0, - 0, - 0}); - this.VM_Width.Minimum = new decimal(new int[] { - 640, - 0, - 0, - 0}); - this.VM_Width.Name = "VM_Width"; - this.VM_Width.Size = new System.Drawing.Size(50, 20); - this.VM_Width.TabIndex = 14; - this.VM_Width.Value = new decimal(new int[] { - 640, - 0, - 0, - 0}); - // - // vm_mode - // - this.vm_mode.AutoSize = true; - this.vm_mode.BackColor = System.Drawing.Color.Transparent; - this.vm_mode.ForeColor = System.Drawing.Color.Black; - this.vm_mode.Location = new System.Drawing.Point(712, 7); - this.vm_mode.Name = "vm_mode"; - this.vm_mode.Size = new System.Drawing.Size(72, 17); - this.vm_mode.TabIndex = 4; - this.vm_mode.Text = "VM Mode"; - this.vm_mode.UseVisualStyleBackColor = false; - // - // pictureBox1 - // - this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); - this.pictureBox1.Location = new System.Drawing.Point(603, 0); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(187, 28); - this.pictureBox1.TabIndex = 13; - this.pictureBox1.TabStop = false; - // // gameversion // this.gameversion.AutoSize = true; @@ -411,9 +335,6 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.VM_Height)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.VM_Width)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startbutton)).EndInit(); this.startmenu.ResumeLayout(false); this.startmenu.PerformLayout(); @@ -444,10 +365,6 @@ internal System.Windows.Forms.Panel ossidestartmenu; internal System.Windows.Forms.PictureBox osimage; private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.NumericUpDown VM_Height; - private System.Windows.Forms.NumericUpDown VM_Width; - private System.Windows.Forms.CheckBox vm_mode; - internal System.Windows.Forms.PictureBox pictureBox1; public System.Windows.Forms.Label gameversion; internal System.Windows.Forms.PictureBox startbutton; private System.Windows.Forms.Timer updateText; -- cgit v1.2.3 From 98ef2526d6e336574809f59e197daf597bb753ee Mon Sep 17 00:00:00 2001 From: lempamo Date: Mon, 30 Oct 2017 22:03:26 -0400 Subject: all vmmode related errors gone --- Histacom2/TitleScreen.Designer.cs | 6 -- Histacom2/TitleScreen.cs | 169 +++++++++++++------------------------- 2 files changed, 58 insertions(+), 117 deletions(-) (limited to 'Histacom2/TitleScreen.Designer.cs') diff --git a/Histacom2/TitleScreen.Designer.cs b/Histacom2/TitleScreen.Designer.cs index 6fa0e63..658da58 100644 --- a/Histacom2/TitleScreen.Designer.cs +++ b/Histacom2/TitleScreen.Designer.cs @@ -30,7 +30,6 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TitleScreen)); - this.vmModeTimer = new System.Windows.Forms.Timer(this.components); this.program = new System.Windows.Forms.Panel(); this.programContent = new System.Windows.Forms.Panel(); this.pictureBox3 = new System.Windows.Forms.PictureBox(); @@ -65,10 +64,6 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.SuspendLayout(); // - // vmModeTimer - // - this.vmModeTimer.Tick += new System.EventHandler(this.vmModeTimer_Tick); - // // program // this.program.BackColor = System.Drawing.Color.Silver; @@ -348,7 +343,6 @@ } #endregion - private System.Windows.Forms.Timer vmModeTimer; internal System.Windows.Forms.Panel program; internal System.Windows.Forms.Panel toprightcorner; internal System.Windows.Forms.Panel bottomrightcorner; diff --git a/Histacom2/TitleScreen.cs b/Histacom2/TitleScreen.cs index f9c6896..3909798 100644 --- a/Histacom2/TitleScreen.cs +++ b/Histacom2/TitleScreen.cs @@ -57,65 +57,60 @@ namespace Histacom2 public void StartGame() { - if (Convert.ToInt32(VM_Width.Text) == 1337 && Convert.ToInt32(VM_Height.Text) == 1337) leet(); - else + // Time to decide which OS to start up! + + switch (CurrentSave.CurrentOS) { - // Time to decide which OS to start up! + case "95": + frm95 = new Windows95(); + frm95.TopMost = true; + frm95.FormBorderStyle = FormBorderStyle.None; + frm95.WindowState = FormWindowState.Maximized; + //if (vm_mode.Checked == true) + //{ + // frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text)); + // frm95.FormBorderStyle = FormBorderStyle.Fixed3D; + //} + frm95.Show(); + Hide(); - switch (CurrentSave.CurrentOS) - { - case "95": - frm95 = new Windows95(); - frm95.TopMost = true; - frm95.FormBorderStyle = FormBorderStyle.None; - frm95.WindowState = FormWindowState.Maximized; - //if (vm_mode.Checked == true) - //{ - // frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text)); - // frm95.FormBorderStyle = FormBorderStyle.Fixed3D; - //} - frm95.Show(); - Hide(); - - break; - case "98": - frm98 = new Windows98(); - frm98.TopMost = true; - frm98.FormBorderStyle = FormBorderStyle.None; - frm98.WindowState = FormWindowState.Maximized; - //if (vm_mode.Checked == true) - //{ - // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text)); - // frm98.FormBorderStyle = FormBorderStyle.Fixed3D; - //} - frm98.Show(); - Hide(); - - break; - case "xpbad": - frmBadXP = new WindowsXPBad(); - frmBadXP.TopMost = true; - frmBadXP.FormBorderStyle = FormBorderStyle.None; - frmBadXP.WindowState = FormWindowState.Maximized; - //if (vm_mode.Checked == true) - //{ - // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text)); - // frm98.FormBorderStyle = FormBorderStyle.Fixed3D; - //} - frmBadXP.Show(); - Hide(); - - break; - default: - MessageBox.Show("WARNING! It looks like this save is corrupt!"); - MessageBox.Show("We will now open the Save troubleshooter"); - - SaveFileTroubleShooter troubleshooter = new SaveFileTroubleShooter(); - - troubleshooter.ShowDialog(); - break; - } + break; + case "98": + frm98 = new Windows98(); + frm98.TopMost = true; + frm98.FormBorderStyle = FormBorderStyle.None; + frm98.WindowState = FormWindowState.Maximized; + //if (vm_mode.Checked == true) + //{ + // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text)); + // frm98.FormBorderStyle = FormBorderStyle.Fixed3D; + //} + frm98.Show(); + Hide(); + break; + case "xpbad": + frmBadXP = new WindowsXPBad(); + frmBadXP.TopMost = true; + frmBadXP.FormBorderStyle = FormBorderStyle.None; + frmBadXP.WindowState = FormWindowState.Maximized; + //if (vm_mode.Checked == true) + //{ + // frm98.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text)); + // frm98.FormBorderStyle = FormBorderStyle.Fixed3D; + //} + frmBadXP.Show(); + Hide(); + + break; + default: + MessageBox.Show("WARNING! It looks like this save is corrupt!"); + MessageBox.Show("We will now open the Save troubleshooter"); + + SaveFileTroubleShooter troubleshooter = new SaveFileTroubleShooter(); + + troubleshooter.ShowDialog(); + break; } } @@ -153,39 +148,6 @@ namespace Histacom2 SettingsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); HelpToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); ShutdownToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - - // Start the VM Mode timer - vmModeTimer.Start(); - } - - private static void leet() - { - WindowManager wm = new WindowManager(); - UserControl leet = new UserControl(); - leet.Width = 500; - leet.Height = 500; - Label label1 = new Label(); - label1.Parent = leet; - label1.AutoSize = true; - label1.Text = "Thank you for making Histacom2 possible."; - wm.Init(leet, "Thank You", null, true, true); - } - - // The VM Mode timer / checker. Updates every 100ms - private void vmModeTimer_Tick(object sender, EventArgs e) - { - // Check for VM mode - if (vm_mode.Checked == true) - { - VM_Width.Visible = true; - VM_Height.Visible = true; - } - // If VM Mode is disabled - else - { - VM_Width.Visible = false; - VM_Height.Visible = false; - } } #region Menu Buttons @@ -220,28 +182,13 @@ namespace Histacom2 } - // If VM Mode is not enabled - if (vm_mode.Checked != true) - { - // Generate fullscreen desktop - frm95 = new Windows95(); - frm95.TopMost = true; - frm95.FormBorderStyle = FormBorderStyle.None; - frm95.WindowState = FormWindowState.Maximized; - frm95.Show(); - Hide(); - } - // If VM Mode is enabled - else - { - // Generate desktop with size entered by user - frm95 = new Windows95(); - frm95.FormBorderStyle = FormBorderStyle.None; - frm95.Size = new Size(Convert.ToInt32(VM_Width.Text), Convert.ToInt32(VM_Height.Text)); - frm95.FormBorderStyle = FormBorderStyle.Fixed3D; - frm95.Show(); - Hide(); - } + // Generate fullscreen desktop + frm95 = new Windows95(); + frm95.TopMost = true; + frm95.FormBorderStyle = FormBorderStyle.None; + frm95.WindowState = FormWindowState.Maximized; + frm95.Show(); + Hide(); } } #endregion -- cgit v1.2.3