diff options
| author | lempamo <[email protected]> | 2017-07-30 00:10:22 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-07-30 00:10:22 -0400 |
| commit | 077fef3baf82e23a4a03bb3c73d83f8d8103fdb9 (patch) | |
| tree | 7136fb69ca87b175aee39e6a04b4e998905f22a0 | |
| parent | 71ccea956dc85e8b293dc8a30fbbf91b2709897f (diff) | |
| download | histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.tar.gz histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.tar.bz2 histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.zip | |
better infoboxes
24 files changed, 272 insertions, 103 deletions
diff --git a/TimeHACK.Engine/Properties/Resources.Designer.cs b/TimeHACK.Engine/Properties/Resources.Designer.cs index 9c17510..b2fabb2 100644 --- a/TimeHACK.Engine/Properties/Resources.Designer.cs +++ b/TimeHACK.Engine/Properties/Resources.Designer.cs @@ -202,6 +202,51 @@ namespace TimeHACK.Engine.Properties { /// <summary> /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// </summary> + public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesAsterisk { + get { + return ResourceManager.GetStream("Win95PlusDangerousCreaturesAsterisk", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// </summary> + public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesCritStop { + get { + return ResourceManager.GetStream("Win95PlusDangerousCreaturesCritStop", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// </summary> + public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesExclamation { + get { + return ResourceManager.GetStream("Win95PlusDangerousCreaturesExclamation", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// </summary> + public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesProgError { + get { + return ResourceManager.GetStream("Win95PlusDangerousCreaturesProgError", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// </summary> + public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesQuestion { + get { + return ResourceManager.GetStream("Win95PlusDangerousCreaturesQuestion", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// </summary> public static System.IO.UnmanagedMemoryStream Win95PlusDangerousCreaturesStart { get { return ResourceManager.GetStream("Win95PlusDangerousCreaturesStart", resourceCulture); @@ -247,6 +292,16 @@ namespace TimeHACK.Engine.Properties { } /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + public static System.Drawing.Bitmap Win95Question { + get { + object obj = ResourceManager.GetObject("Win95Question", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// </summary> public static System.IO.UnmanagedMemoryStream Win95Start { diff --git a/TimeHACK.Engine/Properties/Resources.resx b/TimeHACK.Engine/Properties/Resources.resx index 08e94f6..a17e929 100644 --- a/TimeHACK.Engine/Properties/Resources.resx +++ b/TimeHACK.Engine/Properties/Resources.resx @@ -208,4 +208,22 @@ <data name="Win95PlusInsideComputerWallpaper" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Win95PlusInsideComputerWallpaper.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Win95PlusDangerousCreaturesAsterisk" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Win95PlusDangerousCreaturesAsterisk.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name="Win95PlusDangerousCreaturesCritStop" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Win95PlusDangerousCreaturesCritStop.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name="Win95PlusDangerousCreaturesExclamation" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Win95PlusDangerousCreaturesExclamation.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name="Win95PlusDangerousCreaturesProgError" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Win95PlusDangerousCreaturesProgError.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name="Win95PlusDangerousCreaturesQuestion" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Win95PlusDangerousCreaturesQuestion.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name="Win95Question" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\Window\Win95Question.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root>
\ No newline at end of file diff --git a/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesAsterisk.wav b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesAsterisk.wav Binary files differnew file mode 100644 index 0000000..2855ad5 --- /dev/null +++ b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesAsterisk.wav diff --git a/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesCritStop.wav b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesCritStop.wav Binary files differnew file mode 100644 index 0000000..e436d74 --- /dev/null +++ b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesCritStop.wav diff --git a/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesExclamation.wav b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesExclamation.wav Binary files differnew file mode 100644 index 0000000..bd72c1a --- /dev/null +++ b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesExclamation.wav diff --git a/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesProgError.wav b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesProgError.wav Binary files differnew file mode 100644 index 0000000..eea2006 --- /dev/null +++ b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesProgError.wav diff --git a/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesQuestion.wav b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesQuestion.wav Binary files differnew file mode 100644 index 0000000..18d5fbb --- /dev/null +++ b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesQuestion.wav diff --git a/TimeHACK.Engine/Resources/WinClassic/Window/Win95Question.png b/TimeHACK.Engine/Resources/WinClassic/Window/Win95Question.png Binary files differnew file mode 100644 index 0000000..b8ff406 --- /dev/null +++ b/TimeHACK.Engine/Resources/WinClassic/Window/Win95Question.png diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index f08e637..21a301a 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -153,6 +153,7 @@ namespace TimeHACK.Engine public static void CheckFiles() { Directory.CreateDirectory(GameDirectory); + Directory.CreateDirectory(DataDirectory); Directory.CreateDirectory(AllProfilesDirectory); Directory.CreateDirectory(ProfileDirectory); Directory.CreateDirectory(ProfileFileSystemDirectory); diff --git a/TimeHACK.Engine/Template/Infobox95.Designer.cs b/TimeHACK.Engine/Template/Infobox95.Designer.cs index 5c88e92..3c05dbd 100644 --- a/TimeHACK.Engine/Template/Infobox95.Designer.cs +++ b/TimeHACK.Engine/Template/Infobox95.Designer.cs @@ -29,10 +29,12 @@ private void InitializeComponent() { this.programContent = new System.Windows.Forms.Panel(); + this.button1 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.panel1 = new System.Windows.Forms.Panel(); this.infoText = new System.Windows.Forms.Label(); - this.ok = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); this.programContent.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.panel1.SuspendLayout(); @@ -41,22 +43,51 @@ // programContent // this.programContent.BackColor = System.Drawing.Color.Silver; + this.programContent.Controls.Add(this.button1); + this.programContent.Controls.Add(this.button3); this.programContent.Controls.Add(this.pictureBox1); this.programContent.Controls.Add(this.panel1); - this.programContent.Controls.Add(this.ok); + this.programContent.Controls.Add(this.button2); this.programContent.Dock = System.Windows.Forms.DockStyle.Fill; this.programContent.Location = new System.Drawing.Point(0, 0); this.programContent.Name = "programContent"; - this.programContent.Size = new System.Drawing.Size(421, 164); + this.programContent.Size = new System.Drawing.Size(413, 138); this.programContent.TabIndex = 10; this.programContent.Tag = "gnoreFormOnTaskbar"; // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button1.Location = new System.Drawing.Point(150, 104); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(80, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Yes"; + this.button1.UseVisualStyleBackColor = true; + // + // button3 + // + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button3.Location = new System.Drawing.Point(323, 104); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(80, 23); + this.button3.TabIndex = 4; + this.button3.Text = "Cancel"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // // pictureBox1 // this.pictureBox1.ErrorImage = null; this.pictureBox1.Image = global::TimeHACK.Engine.Properties.Resources.Win95Warning; this.pictureBox1.InitialImage = null; - this.pictureBox1.Location = new System.Drawing.Point(8, 33); + this.pictureBox1.Location = new System.Drawing.Point(15, 16); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(32, 32); this.pictureBox1.TabIndex = 3; @@ -65,34 +96,33 @@ // panel1 // this.panel1.Controls.Add(this.infoText); - this.panel1.Location = new System.Drawing.Point(57, 33); + this.panel1.Location = new System.Drawing.Point(62, 16); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(337, 96); + this.panel1.Size = new System.Drawing.Size(341, 82); this.panel1.TabIndex = 2; // // infoText // - this.infoText.AutoSize = true; this.infoText.Dock = System.Windows.Forms.DockStyle.Fill; this.infoText.Location = new System.Drawing.Point(0, 0); this.infoText.Name = "infoText"; - this.infoText.Size = new System.Drawing.Size(35, 13); + this.infoText.Size = new System.Drawing.Size(341, 82); this.infoText.TabIndex = 0; this.infoText.Text = "label1"; // - // ok + // button2 // - this.ok.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.ok.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.ok.Location = new System.Drawing.Point(169, 135); - this.ok.Name = "ok"; - this.ok.Size = new System.Drawing.Size(83, 23); - this.ok.TabIndex = 1; - this.ok.Text = "OK"; - this.ok.UseVisualStyleBackColor = true; - this.ok.Click += new System.EventHandler(this.ok_Click); + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button2.Location = new System.Drawing.Point(236, 104); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(80, 23); + this.button2.TabIndex = 1; + this.button2.Text = "No"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); // // Infobox95 // @@ -100,11 +130,10 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.programContent); this.Name = "Infobox95"; - this.Size = new System.Drawing.Size(421, 164); + this.Size = new System.Drawing.Size(413, 138); this.programContent.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); this.ResumeLayout(false); } @@ -115,6 +144,8 @@ private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Panel panel1; public System.Windows.Forms.Label infoText; - private System.Windows.Forms.Button ok; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button1; } }
\ No newline at end of file diff --git a/TimeHACK.Engine/Template/Infobox95.cs b/TimeHACK.Engine/Template/Infobox95.cs index e764e47..ea257b2 100644 --- a/TimeHACK.Engine/Template/Infobox95.cs +++ b/TimeHACK.Engine/Template/Infobox95.cs @@ -1,5 +1,6 @@ using System; using System.Drawing; +using System.Media; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -7,14 +8,75 @@ namespace TimeHACK.Engine.Template { public partial class Infobox95 : UserControl { - public Infobox95() + int btnStatus = 0; + + public Infobox95(InfoboxType type, InfoboxButtons btns) { InitializeComponent(); + button1.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2); + button2.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2); + button3.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2); + + switch (type) + { + case InfoboxType.Info: + pictureBox1.Image = Properties.Resources.Win95Info; + SoundPlayer spa = new SoundPlayer(SaveSystem.currentTheme.asteriskSound); + spa.Play(); + break; + case InfoboxType.Question: + pictureBox1.Image = Properties.Resources.Win95Question; + SoundPlayer spq = new SoundPlayer(SaveSystem.currentTheme.questionSound); + spq.Play(); + break; + case InfoboxType.Warning: + pictureBox1.Image = Properties.Resources.Win95Warning; + SoundPlayer spw = new SoundPlayer(SaveSystem.currentTheme.exclamationSound); + spw.Play(); + break; + case InfoboxType.Error: + pictureBox1.Image = Properties.Resources.Win95Error; + SoundPlayer spe = new SoundPlayer(SaveSystem.currentTheme.critStopSound); + spe.Play(); + break; + } + + btnStatus = (int)btns; + switch (btns) + { + case InfoboxButtons.OK: + button1.Hide(); + button2.Hide(); + button3.Text = "OK"; + break; + } } - private void ok_Click(object sender, EventArgs e) + private void button2_Click(object sender, EventArgs e) { this.ParentForm.Close(); } + + private void button3_Click(object sender, EventArgs e) + { + if (btnStatus == 0) this.ParentForm.Close(); + } + } + + public enum InfoboxType + { + Info, + Question, + Warning, + Error + } + + public enum InfoboxButtons + { + OK, + OKCancel, + YesNo, + YesNoCancel, + AbortRetryFail } } diff --git a/TimeHACK.Engine/Theme.cs b/TimeHACK.Engine/Theme.cs index 2b22072..8e75756 100644 --- a/TimeHACK.Engine/Theme.cs +++ b/TimeHACK.Engine/Theme.cs @@ -15,6 +15,7 @@ namespace TimeHACK.Engine public Stream asteriskSound { get; set; } public Stream critStopSound { get; set; } + public Stream exclamationSound { get; set; } public Stream progErrorSound { get; set; } public Stream questionSound { get; set; } @@ -32,6 +33,7 @@ namespace TimeHACK.Engine asteriskSound = Properties.Resources.CHORD; critStopSound = Properties.Resources.CHORD; + exclamationSound = Properties.Resources.CHORD; progErrorSound = Properties.Resources.CHORD; questionSound = Properties.Resources.CHORD; @@ -44,11 +46,12 @@ namespace TimeHACK.Engine { public Default98Theme() { - startSound = Properties.Resources.Win95Start; - stopSound = Properties.Resources.Win95Stop; + startSound = Properties.Resources.Win98Start; + stopSound = Properties.Resources.Win98Stop; asteriskSound = Properties.Resources.CHORD; critStopSound = Properties.Resources.CHORD; + exclamationSound = Properties.Resources.CHORD; progErrorSound = Properties.Resources.CHORD; questionSound = Properties.Resources.CHORD; @@ -64,6 +67,12 @@ namespace TimeHACK.Engine startSound = Properties.Resources.Win95PlusDangerousCreaturesStart; stopSound = Properties.Resources.Win95PlusDangerousCreaturesStart; + asteriskSound = Properties.Resources.Win95PlusDangerousCreaturesAsterisk; + critStopSound = Properties.Resources.Win95PlusDangerousCreaturesCritStop; + exclamationSound = Properties.Resources.Win95PlusDangerousCreaturesExclamation; + progErrorSound = Properties.Resources.Win95PlusDangerousCreaturesProgError; + questionSound = Properties.Resources.Win95PlusDangerousCreaturesQuestion; + defaultWallpaper = Properties.Resources.Win95PlusDangerousCreaturesWallpaper; themeName = "dangeranimals"; } diff --git a/TimeHACK.Engine/TimeHACK.Engine.csproj b/TimeHACK.Engine/TimeHACK.Engine.csproj index dd6342c..a176c81 100644 --- a/TimeHACK.Engine/TimeHACK.Engine.csproj +++ b/TimeHACK.Engine/TimeHACK.Engine.csproj @@ -118,6 +118,11 @@ <None Include="Resources\Win95PlusInsideComputerWallpaper.jpg" /> <None Include="Resources\Win95PlusInsideComputerStop.wav" /> <None Include="Resources\Win95PlusInsideComputerStart.wav" /> + <None Include="Resources\Win95PlusDangerousCreaturesAsterisk.wav" /> + <None Include="Resources\Win95PlusDangerousCreaturesCritStop.wav" /> + <None Include="Resources\Win95PlusDangerousCreaturesExclamation.wav" /> + <None Include="Resources\Win95PlusDangerousCreaturesProgError.wav" /> + <None Include="Resources\Win95PlusDangerousCreaturesQuestion.wav" /> <Content Include="Resources\WinClassic\Window\BottomLeft.png" /> <Content Include="Resources\WinClassic\Window\BottomRight.png" /> <Content Include="Resources\WinClassic\Window\BottomSide.png" /> @@ -130,6 +135,7 @@ <None Include="Resources\WinClassic\Window\Win95Info.png" /> <None Include="Resources\WinClassic\Window\Win95Warning.png" /> <None Include="Resources\WinClassic\Window\Win95Error.png" /> + <None Include="Resources\WinClassic\Window\Win95Question.png" /> <Content Include="Resources\WinClassic\Window\WinClassicClose.png" /> <Content Include="Resources\WinClassic\Window\WinClassicMax.png" /> <Content Include="Resources\WinClassic\Window\WinClassicMin.png" /> diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index 156da2f..4aa82d7 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -72,13 +72,13 @@ namespace TimeHACK.Engine return app; } - public WinClassic StartInfobox95(string title, string text, Image erroricon) + public WinClassic StartInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns) { - Infobox95 app = new Infobox95(); + pfc.AddFontFile(SaveSystem.GameDirectory + "\\Data\\LeviWindows.ttf"); + Infobox95 app = new Infobox95(type, btns); app.infoText.Text = text; + app.infoText.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); - SoundPlayer sp = new SoundPlayer(Properties.Resources.CHORD); - sp.Play(); return StartWin95(app, title, null, false, false); } diff --git a/TimeHACK.Main/OS/Win95/Win95.Designer.cs b/TimeHACK.Main/OS/Win95/Win95.Designer.cs index 15feef6..8aa6c9d 100644 --- a/TimeHACK.Main/OS/Win95/Win95.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95.Designer.cs @@ -817,6 +817,7 @@ namespace TimeHACK.OS.Win95 this.PrintersToolStripMenuItem.Name = "PrintersToolStripMenuItem"; this.PrintersToolStripMenuItem.Size = new System.Drawing.Size(146, 22); this.PrintersToolStripMenuItem.Text = "Printers"; + this.PrintersToolStripMenuItem.Click += new System.EventHandler(infoboxTestToolStripMenuItem_Click); // // TaskbarToolStripMenuItem // diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 619f3ba..5d02b16 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -175,7 +175,7 @@ namespace TimeHACK.OS.Win95 // Give Year Code - NYI private void taskbartime_Click(object sender, EventArgs e) { - //TODO: Set Up Save System + } // Set the Clock @@ -256,7 +256,7 @@ namespace TimeHACK.OS.Win95 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -276,7 +276,7 @@ namespace TimeHACK.OS.Win95 { if (objListViewItem.Text == "Internet Explorer") { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -301,13 +301,13 @@ namespace TimeHACK.OS.Win95 } else if (objListViewItem.Text == "Set Up The Microsoft Network") { - wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", Properties.Resources.Win95Info); + wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", InfoboxType.Info, InfoboxButtons.OK); } else if (objListViewItem.Text == "Outlook Express") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else if (objListViewItem.Text == "Inbox") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else { @@ -340,7 +340,7 @@ namespace TimeHACK.OS.Win95 private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(string title, string text, Image erroricon)!", Properties.Resources.Win95Info); + WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \nJust use wm.startInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns)!", InfoboxType.Info, InfoboxButtons.OK); app.BringToFront(); startmenu.Hide(); @@ -514,7 +514,7 @@ namespace TimeHACK.OS.Win95 { if (Directory.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Folder"))) { - wm.StartInfobox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK); } else { @@ -527,7 +527,7 @@ namespace TimeHACK.OS.Win95 { if (File.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Text Document.txt"))) { - wm.StartInfobox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK); } else { @@ -562,11 +562,11 @@ namespace TimeHACK.OS.Win95 } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs index cbcf2a1..8dda600 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs @@ -58,10 +58,10 @@ namespace TimeHACK.OS.Win95.Win95Apps } private void Button1_Click(object sender, EventArgs e) { - if (txtscreenname.Text == "") { wm.StartInfobox95("Invalid Username", "Your username cannot be blank.", Properties.Resources.Win95Warning); return; } - if (txtscreenname.Text.Length > 12) { wm.StartInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", Properties.Resources.Win95Warning); return; } - if (txtscreenname.Text.Contains(" ")) { wm.StartInfobox95("Invalid Username", "Your username cannot contain spaces.", Properties.Resources.Win95Warning); return; } - if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.StartInfobox95("Invalid Username", "That username is already taken.", Properties.Resources.Win95Warning); return; } + if (txtscreenname.Text == "") { wm.StartInfobox95("Invalid Username", "Your username cannot be blank.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text.Length > 12) { wm.StartInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text.Contains(" ")) { wm.StartInfobox95("Invalid Username", "Your username cannot contain spaces.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.StartInfobox95("Invalid Username", "That username is already taken.", InfoboxType.Warning, InfoboxButtons.OK); return; } ParentForm.AcceptButton = button2; TitleScreen.username = txtscreenname.Text; login.Hide(); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index e2a5a59..548ad4a 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -160,7 +160,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } } } catch (Exception ex) { - wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); + //wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); add illegal operation dialog here later ((Form)this.TopLevelControl).Close(); } } @@ -216,7 +216,7 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case 12: - OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir)); + OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir), fileDir); break; } } catch { @@ -224,7 +224,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } - void OpenApplication(string appname) + void OpenApplication(string appname, string path) { switch (appname.ToLower()) { @@ -251,7 +251,7 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case "ie": - if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } TitleScreen.frm95.ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); Program.AddTaskbarItem(TitleScreen.frm95.ie, TitleScreen.frm95.ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); TitleScreen.frm95.ie.BringToFront(); @@ -275,12 +275,11 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case "iebrokeninstaller": - wm.StartInfobox95("Internet Explorer Installation", "Installation Failed: The INF file was not found", Properties.Resources.Win95Error); + wm.StartInfobox95("Internet Explorer Installer", "Installation Failed: The INF file was not found", InfoboxType.Error, InfoboxButtons.OK); break; - case "addressbook": - wm.StartInfobox95("Win32 Error", "This is not a valid Win32 Application.", Properties.Resources.Win95Error); - + default: + wm.StartInfobox95(path.Replace(ProfileMyComputerDirectory, "C:"), $"{path.Replace(ProfileMyComputerDirectory, "C:")} is not a valid Win32 application.", InfoboxType.Error, InfoboxButtons.OK); break; } } @@ -650,7 +649,8 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (File.Exists(CurrentDirectory + "\\New Folder")) { - wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); + //wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); + //TODO: add making "New Folder (2)" } else { @@ -681,7 +681,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (txtSave.Text == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -710,7 +710,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (!FileOrDirectoryExists(Path.Combine(CurrentDirectory, mainView.FocusedItem.Text))) { - wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -765,19 +765,19 @@ namespace TimeHACK.OS.Win95.Win95Apps setText = e.Label; if (setText == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", InfoboxType.Info, InfoboxButtons.OK); } else { if (Directory.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That directory already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { if (File.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That file already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That file already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs index 58fadee..5eeeb33 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs @@ -86,7 +86,7 @@ namespace TimeHACK.OS.Win95.Win95Apps if (cmdPrompt.SelectedText.Length > 0) Clipboard.SetText(cmdPrompt.SelectedText); // Set the clipboard text to the selection of the RichTextBox else - wm.StartInfobox95("ERROR", "You need to select something to copy.", Properties.Resources.Win95Error); // Display an error message if the length is 0 + wm.StartInfobox95("ERROR", "You need to select something to copy.", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK); // Display an error message if the length is 0 } private void btnPaste_Click(object sender, EventArgs e) @@ -94,12 +94,12 @@ namespace TimeHACK.OS.Win95.Win95Apps if (Clipboard.GetText() != "") Write(Clipboard.GetText()); // Write the contents of the Clipboard text in the RichTextBox else - wm.StartInfobox95("ERROR", "You need to have something in your clipboard to paste.", Properties.Resources.Win95Error); // Display an error message if the clipboard is null/empty + wm.StartInfobox95("ERROR", "You need to have something in your clipboard to paste.", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK); // Display an error message if the clipboard is null/empty } private void btnSettings_Click(object sender, EventArgs e) { - wm.StartInfobox95("INFO", "This feature has not been implemented yet. Stay tuned! -Jason", Properties.Resources.Win95Info); + wm.StartInfobox95("INFO", "This feature has not been implemented yet. Stay tuned! -Jason", Engine.Template.InfoboxType.Info, Engine.Template.InfoboxButtons.OK); //TODO: Well, add the settings... } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs index 2453abc..7d0dd1c 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs @@ -61,7 +61,7 @@ namespace TimeHACK.OS.Win95.Win95Apps this.aboutWordpadToolStripMenuItem.Click += (sender, args) => wm.StartAboutBox95("Wordpad", "Microsoft Wordpad", Properties.Resources.Win95IconWordpad); this.btnNew.Click += (sender, args) => mainText.Text = ""; this.newToolStripMenuItem.Click += (sender, args) => mainText.Text = ""; - this.sendToolStripMenuItem.Click += (sender, args) => wm.StartInfobox95("Wordpad", "An error occured opening send option.", null); + this.sendToolStripMenuItem.Click += (sender, args) => wm.StartInfobox95("Wordpad", "An error occured opening send option.", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK); this.bulletStyleToolStripMenuItem.Click += (sender, args) => mainText.SelectionBullet = bulletStyleToolStripMenuItem.Checked; this.comboFont.SelectedIndexChanged += (sender, args) => SetSelectedTextFont(comboFont.Text); this.comboSize.SelectedIndexChanged += (sender, args) => SetSelectedTextSize(comboSize.Text); diff --git a/TimeHACK.Main/OS/Win98/Win98.cs b/TimeHACK.Main/OS/Win98/Win98.cs index a01d91b..b1f7957 100644 --- a/TimeHACK.Main/OS/Win98/Win98.cs +++ b/TimeHACK.Main/OS/Win98/Win98.cs @@ -158,7 +158,7 @@ namespace TimeHACK.OS.Win98 // Give Year Code - NYI private void taskbartime_Click(object sender, EventArgs e) { - //TODO: Set Up Save System + } // Set the Clock @@ -241,7 +241,7 @@ namespace TimeHACK.OS.Win98 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -261,7 +261,7 @@ namespace TimeHACK.OS.Win98 { if (objListViewItem.Text == "Internet Explorer") { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -287,15 +287,15 @@ namespace TimeHACK.OS.Win98 } else if (objListViewItem.Text == "Set Up The Microsoft Network") { - wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", Properties.Resources.Win95Info); + wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", InfoboxType.Info, InfoboxButtons.OK); } else if (objListViewItem.Text == "Outlook Express") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else if (objListViewItem.Text == "Inbox") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else { @@ -328,7 +328,7 @@ namespace TimeHACK.OS.Win98 private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(string title, string text, Image erroricon)!", Properties.Resources.Win95Info); + WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns)!", InfoboxType.Info, InfoboxButtons.OK); app.BringToFront(); startmenu.Hide(); @@ -560,13 +560,13 @@ namespace TimeHACK.OS.Win98 } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index 95ee509..18cfcf9 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -133,7 +133,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } else { - wm.StartInfobox95("Address Book - New Folder", "You must enter a folder name!", Properties.Resources.Win95Error); + wm.StartInfobox95("Address Book - New Folder", "You must enter a folder name!", InfoboxType.Error, InfoboxButtons.OK); } } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index 5f1f131..f21a851 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -195,7 +195,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } } } catch (Exception ex) { - wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); + //wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); add illegal operation dialog here later ((Form)this.TopLevelControl).Close(); } } @@ -287,7 +287,7 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case "iebrokeninstaller": - wm.StartInfobox95("Internet Explorer Installation", "Installation Failed: The INF file was not found", Properties.Resources.Win95Error); + wm.StartInfobox95("Internet Explorer Installer", "Installation Failed: The INF file was not found", InfoboxType.Error, InfoboxButtons.OK); break; case "addressbook": @@ -674,7 +674,7 @@ namespace TimeHACK.OS.Win95.Win95Apps private void FolderToolStripMenuItem_Click(object sender, EventArgs e) { if (File.Exists(CurrentDirectory + "\\New Folder")) { - wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "This directory already exists", InfoboxType.Info, InfoboxButtons.OK); } else { Directory.CreateDirectory(Path.Combine(CurrentDirectory, "New Folder")); SaveDirectoryInfo(CurrentDirectory, "New Folder", false, "New Folder", true); @@ -703,7 +703,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (txtSave.Text == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -732,7 +732,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (!FileOrDirectoryExists(mainView.FocusedItem.ImageKey)) { - wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -785,19 +785,19 @@ namespace TimeHACK.OS.Win95.Win95Apps setText = e.Label; if (setText == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", InfoboxType.Info, InfoboxButtons.OK); } else { if (Directory.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That directory already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { if (File.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That file already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That file already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { diff --git a/TimeHACK.Main/TitleScreen.cs b/TimeHACK.Main/TitleScreen.cs index 194776c..6ee2ef1 100644 --- a/TimeHACK.Main/TitleScreen.cs +++ b/TimeHACK.Main/TitleScreen.cs @@ -22,10 +22,7 @@ namespace TimeHACK public static Windows98 frm98; public static string username; public static string progress = "95"; - - public static DirectoryInfo thfolder; - public static DirectoryInfo datafolder; - public static DirectoryInfo profilefolder; + public static NewGameDialog newGameBox; public static LoadGameDialog loadGameBox; @@ -138,31 +135,20 @@ namespace TimeHACK // When the TitleScreen Loads private void TitleScreen_Load(object sender, EventArgs e) { - if (!Directory.Exists(GameDirectory)) - Directory.CreateDirectory(GameDirectory); - thfolder = new DirectoryInfo(GameDirectory); - - string Data = Path.Combine(thfolder.FullName, "Data"); - if (!Directory.Exists(Data)) - Directory.CreateDirectory(Data); - - string Profiles = Path.Combine(thfolder.FullName, "Profiles"); - if (!Directory.Exists(Profiles)) - Directory.CreateDirectory(Profiles); - - Resources.google.Save(Path.Combine(Data, "google.jpg")); - profilefolder = Directory.CreateDirectory(Path.Combine(thfolder.FullName, "\\Profiles")); - + Directory.CreateDirectory(GameDirectory); + Directory.CreateDirectory(DataDirectory); + Directory.CreateDirectory(AllProfilesDirectory); + Resources.google.Save(Path.Combine(DataDirectory, "google.jpg")); // Set GameVersion gameversion.Text = "Alpha 1.0.3"; // Initialize Font - File.WriteAllBytes(Data + "\\LeviWindows.ttf", Resources.LeviWindows); - File.WriteAllBytes(Data + "\\windows_command_prompt.ttf", Resources.windows_command_prompt); - pfc.AddFontFile(Data + "\\LeviWindows.ttf"); - pfc.AddFontFile(Data + "\\windows_command_prompt.ttf"); + File.WriteAllBytes(DataDirectory + "\\LeviWindows.ttf", Resources.LeviWindows); + File.WriteAllBytes(DataDirectory + "\\windows_command_prompt.ttf", Resources.windows_command_prompt); + pfc.AddFontFile(DataDirectory + "\\LeviWindows.ttf"); + pfc.AddFontFile(DataDirectory + "\\windows_command_prompt.ttf"); gameversion.Font = new Font(pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, (0)); ProgramsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); DocumentsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); |
