diff options
| author | lempamo <[email protected]> | 2017-06-10 15:23:05 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-06-10 15:23:05 -0400 |
| commit | 46cca8051d340398bcab1f18d76d1650a746a5b3 (patch) | |
| tree | 34f2ef3902964b428a9ed9a1ee61f5f1d8b4b4b0 /TimeHACK.Main/TitleScreen.cs | |
| parent | 0344f0f2ba9cc1dea9644c97b69f689e2e516c90 (diff) | |
| parent | f7a0abb9c8a8fb4235b185d8bf4ea725d53270fe (diff) | |
| download | histacom2-46cca8051d340398bcab1f18d76d1650a746a5b3.tar.gz histacom2-46cca8051d340398bcab1f18d76d1650a746a5b3.tar.bz2 histacom2-46cca8051d340398bcab1f18d76d1650a746a5b3.zip | |
Merge remote-tracking branch 'refs/remotes/TimeHACKDevs/master'
Diffstat (limited to 'TimeHACK.Main/TitleScreen.cs')
| -rw-r--r-- | TimeHACK.Main/TitleScreen.cs | 87 |
1 files changed, 64 insertions, 23 deletions
diff --git a/TimeHACK.Main/TitleScreen.cs b/TimeHACK.Main/TitleScreen.cs index 1b3c52c..d73269f 100644 --- a/TimeHACK.Main/TitleScreen.cs +++ b/TimeHACK.Main/TitleScreen.cs @@ -4,8 +4,10 @@ using System.Drawing; using System.IO; using System.Windows.Forms; using TimeHACK.OS.Win95; +using TimeHACK.OS.Win98; using TimeHACK.Engine; using static TimeHACK.Engine.SaveSystem; +using TimeHACK.SaveDialogs; namespace TimeHACK { @@ -13,6 +15,7 @@ namespace TimeHACK { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); public static Windows95 frm95; + public static Windows98 frm98; public static string username; public static string progress = "95"; @@ -29,29 +32,51 @@ namespace TimeHACK { leet(); } - else - // 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(); - } + else { + // Time to decide which OS to start up! + MessageBox.Show(CurrentSave.CurrentOS); + + 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; + 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; + } + + } } @@ -166,6 +191,22 @@ namespace TimeHACK frm95.Close(); frm95 = null; + try + { + // Time to close all the game applications + foreach (Form frm in Application.OpenForms) + { + if (frm.Tag.ToString() != "ignoreFormOnTaskbar") + { + frm.Close(); + } + } + } catch { + + } + + + // If VM Mode is not enabled if (vm_mode.Checked != true) { |
