aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TimeHACK.Main/OS/Win95/Win95.Designer.cs21
-rw-r--r--TimeHACK.Main/OS/Win95/Win95.cs7
-rw-r--r--TimeHACK.Main/OS/Win95/Win95.resx2
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs33
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs2
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs32
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs61
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs42
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.resx120
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs14
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs115
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx4
12 files changed, 326 insertions, 127 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95.Designer.cs b/TimeHACK.Main/OS/Win95/Win95.Designer.cs
index 69733c6..92e238a 100644
--- a/TimeHACK.Main/OS/Win95/Win95.Designer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95.Designer.cs
@@ -129,6 +129,7 @@ namespace TimeHACK.OS.Win95
this.BitmapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MicrosoftDataLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PropertiesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.storyTest1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
this.taskbar.SuspendLayout();
this.clockPanel.SuspendLayout();
@@ -243,7 +244,7 @@ namespace TimeHACK.OS.Win95
this.startmenuitems.Name = "startmenuitems";
this.startmenuitems.Padding = new System.Windows.Forms.Padding(6, 2, 0, 0);
this.startmenuitems.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
- this.startmenuitems.Size = new System.Drawing.Size(145, 292);
+ this.startmenuitems.Size = new System.Drawing.Size(145, 311);
this.startmenuitems.TabIndex = 0;
this.startmenuitems.Text = "StartMenu";
//
@@ -738,7 +739,8 @@ namespace TimeHACK.OS.Win95
this.DocumentsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.windowManagerTestToolStripMenuItem,
this.downloaderTestToolStripMenuItem,
- this.installerTestToolStripMenuItem});
+ this.installerTestToolStripMenuItem,
+ this.storyTest1ToolStripMenuItem});
this.DocumentsToolStripMenuItem.Image = global::TimeHACK.Properties.Resources.WinClassicDocuments;
this.DocumentsToolStripMenuItem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.DocumentsToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
@@ -753,7 +755,7 @@ namespace TimeHACK.OS.Win95
this.windowManagerTestToolStripMenuItem.BackColor = System.Drawing.Color.Silver;
this.windowManagerTestToolStripMenuItem.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("windowManagerTestToolStripMenuItem.BackgroundImage")));
this.windowManagerTestToolStripMenuItem.Name = "windowManagerTestToolStripMenuItem";
- this.windowManagerTestToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
+ this.windowManagerTestToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.windowManagerTestToolStripMenuItem.Text = "WindowManagerTest";
this.windowManagerTestToolStripMenuItem.Click += new System.EventHandler(this.windowManagerTestToolStripMenuItem_Click);
//
@@ -762,7 +764,7 @@ namespace TimeHACK.OS.Win95
this.downloaderTestToolStripMenuItem.BackColor = System.Drawing.Color.Silver;
this.downloaderTestToolStripMenuItem.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("downloaderTestToolStripMenuItem.BackgroundImage")));
this.downloaderTestToolStripMenuItem.Name = "downloaderTestToolStripMenuItem";
- this.downloaderTestToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
+ this.downloaderTestToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.downloaderTestToolStripMenuItem.Text = "DownloaderTest";
this.downloaderTestToolStripMenuItem.Click += new System.EventHandler(this.downloaderTestToolStripMenuItem_Click);
//
@@ -771,7 +773,7 @@ namespace TimeHACK.OS.Win95
this.installerTestToolStripMenuItem.BackColor = System.Drawing.Color.Silver;
this.installerTestToolStripMenuItem.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("installerTestToolStripMenuItem.BackgroundImage")));
this.installerTestToolStripMenuItem.Name = "installerTestToolStripMenuItem";
- this.installerTestToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
+ this.installerTestToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.installerTestToolStripMenuItem.Text = "InstallerTest";
this.installerTestToolStripMenuItem.Click += new System.EventHandler(this.installerTestToolStripMenuItem_Click);
//
@@ -1144,6 +1146,14 @@ namespace TimeHACK.OS.Win95
this.PropertiesToolStripMenuItem1.Size = new System.Drawing.Size(150, 22);
this.PropertiesToolStripMenuItem1.Text = "Properties";
//
+ // storyTest1ToolStripMenuItem
+ //
+ this.storyTest1ToolStripMenuItem.BackgroundImage = global::TimeHACK.Properties.Resources.sliversilver;
+ this.storyTest1ToolStripMenuItem.Name = "storyTest1ToolStripMenuItem";
+ this.storyTest1ToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.storyTest1ToolStripMenuItem.Text = "StoryTest1";
+ this.storyTest1ToolStripMenuItem.Click += new System.EventHandler(this.storyTest1ToolStripMenuItem_Click);
+ //
// Windows95
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1269,5 +1279,6 @@ namespace TimeHACK.OS.Win95
private System.Windows.Forms.ToolStripMenuItem downloaderTestToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem installerTestToolStripMenuItem;
private System.Windows.Forms.Panel taskbarItems;
+ private System.Windows.Forms.ToolStripMenuItem storyTest1ToolStripMenuItem;
}
} \ No newline at end of file
diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs
index 6d7b5f3..79a0a82 100644
--- a/TimeHACK.Main/OS/Win95/Win95.cs
+++ b/TimeHACK.Main/OS/Win95/Win95.cs
@@ -9,6 +9,7 @@ using TimeHACK.Engine.Template;
using TimeHACK.Engine.Template.Taskbars;
using TimeHACK.OS.Win95.Win95Apps;
using TimeHACK.WinClassicForms;
+using TimeHACK.OS.Win95.Win95Apps.Story;
namespace TimeHACK.OS.Win95
{
@@ -340,6 +341,12 @@ namespace TimeHACK.OS.Win95
startmenu.Hide();
}
+ private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Win95Apps.Story.Hack1 story = new Win95Apps.Story.Hack1();
+ story.startObjective();
+ }
+
//TODO: Add Outlook Express 4
}
}
diff --git a/TimeHACK.Main/OS/Win95/Win95.resx b/TimeHACK.Main/OS/Win95/Win95.resx
index 3cb2089..72d7350 100644
--- a/TimeHACK.Main/OS/Win95/Win95.resx
+++ b/TimeHACK.Main/OS/Win95/Win95.resx
@@ -407,7 +407,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq
- ggAAAk1TRnQBSQFMAgEBDAEAAVABAQFQAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
+ ggAAAk1TRnQBSQFMAgEBDAEAAVgBAQFYAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
new file mode 100644
index 0000000..1822c43
--- /dev/null
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Media;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using TimeHACK.Engine;
+
+namespace TimeHACK.OS.Win95.Win95Apps.Story
+{
+ class Hack1
+ {
+ WinClassicTerminal term = new WinClassicTerminal();
+ WindowManager wm = new WindowManager();
+ private SoundPlayer startsound;
+
+ // This is the very first story script!
+ public void startObjective()
+ {
+
+ wm.startWin95(term, "MS-DOS Prompt", null, true, true);
+ term.WriteLine("192.168.0.1 Connecting...");
+
+ // Play Dial-up Sound
+ Stream audio = Properties.Resources.modem_dial;
+ startsound = new SoundPlayer(audio);
+ startsound.PlaySync();
+ term.WriteLine("192.168.0.1 Connected.");
+ }
+ }
+}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs
index 0fac91a..97a0581 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs
@@ -60,6 +60,8 @@ namespace TimeHACK.OS.Win95.Win95Apps
googlealpha.Show();
break;
case "www.12padams.com":
+ Story.Hack1 startStory = new Story.Hack1();
+ startStory.startObjective();
hidePrograms();
break;
case "www.microsoft.com/internetexplorer4/welcome":
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
index 6dd6ee8..e08e6ec 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
@@ -88,38 +88,14 @@ namespace TimeHACK.OS.Win95.Win95Apps
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
- try
- {
- ActivateSaveFileDialog(".txt");
- String selectedPath;
- selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
-
- MessageBox.Show(selectedPath);
- if (selectedPath != "")
- {
- mainText.Text = ReadTextFile(selectedPath);
- }
- }
- catch
- {
- }
+ ActivateOpenFileDialog(".txt");
+ mainText.Text = ReadTextFile(Program.OpenFileExplorerAsDialogAndReturnGivenPath());
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
- try
- {
- ActivateSaveFileDialog(".txt");
- String selectedPath;
- selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
-
- MessageBox.Show(selectedPath);
- if (selectedPath != "")
- {
- File.WriteAllText(selectedPath, mainText.Text);
- }
- } catch {
- }
+ ActivateSaveFileDialog(".txt");
+ File.WriteAllText(Program.OpenFileExplorerAsDialogAndReturnGivenPath(), mainText.Text);
}
}
}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
new file mode 100644
index 0000000..d7e9781
--- /dev/null
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
@@ -0,0 +1,61 @@
+namespace TimeHACK.OS.Win95.Win95Apps
+{
+ partial class WinClassicTerminal
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+ this.SuspendLayout();
+ //
+ // richTextBox1
+ //
+ this.richTextBox1.BackColor = System.Drawing.Color.Black;
+ this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.richTextBox1.ForeColor = System.Drawing.Color.White;
+ this.richTextBox1.Location = new System.Drawing.Point(0, 0);
+ this.richTextBox1.Name = "richTextBox1";
+ this.richTextBox1.ReadOnly = true;
+ this.richTextBox1.Size = new System.Drawing.Size(459, 262);
+ this.richTextBox1.TabIndex = 0;
+ this.richTextBox1.Text = "";
+ //
+ // WinClassicTerminal
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.richTextBox1);
+ this.Name = "WinClassicTerminal";
+ this.Size = new System.Drawing.Size(459, 262);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.RichTextBox richTextBox1;
+ }
+}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
new file mode 100644
index 0000000..24cb7dd
--- /dev/null
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Media;
+using System.IO;
+using System.Threading;
+
+namespace TimeHACK.OS.Win95.Win95Apps
+{
+ public partial class WinClassicTerminal : UserControl
+ {
+ public WinClassicTerminal()
+ {
+ InitializeComponent();
+ this.richTextBox1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ }
+ private SoundPlayer startsound;
+ /// <summary>
+ /// Write text to the Terminal and create a new line. Very similar to the Win32 Console.WriteLine Function.
+ /// </summary>
+ /// <param name="Text"></param>
+ public void WriteLine(string Text)
+ {
+ richTextBox1.AppendText(Text + "\n");
+ }
+
+ /// <summary>
+ /// Write text to the Terminal. Very similar to the Win32 Console.Write Function.
+ /// </summary>
+ /// <param name="Text"></param>
+ public void Write(String Text)
+ {
+ richTextBox1.AppendText(Text);
+ }
+ }
+}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs
index c71d633..aafe999 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs
@@ -195,26 +195,26 @@
// FolderToolStripMenuItem
//
this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem";
- this.FolderToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.FolderToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.FolderToolStripMenuItem.Text = "Folder";
this.FolderToolStripMenuItem.Click += new System.EventHandler(this.FolderToolStripMenuItem_Click);
//
// ShortcutToolStripMenuItem
//
this.ShortcutToolStripMenuItem.Name = "ShortcutToolStripMenuItem";
- this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.ShortcutToolStripMenuItem.Text = "Shortcut";
//
// TextDocumentToolStripMenuItem
//
this.TextDocumentToolStripMenuItem.Name = "TextDocumentToolStripMenuItem";
- this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.TextDocumentToolStripMenuItem.Text = "Text Document";
//
// BitmapImageToolStripMenuItem
//
this.BitmapImageToolStripMenuItem.Name = "BitmapImageToolStripMenuItem";
- this.BitmapImageToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.BitmapImageToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.BitmapImageToolStripMenuItem.Text = "Bitmap Image";
//
// DeleteToolStripMenuItem
@@ -229,7 +229,6 @@
this.RenameToolStripMenuItem.Name = "RenameToolStripMenuItem";
this.RenameToolStripMenuItem.Size = new System.Drawing.Size(127, 22);
this.RenameToolStripMenuItem.Text = "Rename";
- this.RenameToolStripMenuItem.Click += new System.EventHandler(this.RenameToolStripMenuItem_Click);
//
// PropertiesToolStripMenuItem
//
@@ -414,7 +413,7 @@
this.DisconnectNetworkDriveToolStripMenuItem,
this.GoToToolStripMenuItem});
this.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem";
- this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20);
+ this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20);
this.ToolsToolStripMenuItem.Text = "Tools";
//
// FindToolStripMenuItem
@@ -599,7 +598,6 @@
this.mainView.TabIndex = 10;
this.mainView.UseCompatibleStateImageBehavior = false;
this.mainView.View = System.Windows.Forms.View.List;
- this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit);
this.mainView.DoubleClick += new System.EventHandler(this.mainView_DoubleClick);
//
// iconsList
@@ -620,7 +618,7 @@
this.pnlHidden.Controls.Add(this.Label2);
this.pnlHidden.Location = new System.Drawing.Point(9, 54);
this.pnlHidden.Name = "pnlHidden";
- this.pnlHidden.Size = new System.Drawing.Size(692, 417);
+ this.pnlHidden.Size = new System.Drawing.Size(461, 417);
this.pnlHidden.TabIndex = 14;
this.pnlHidden.Visible = false;
//
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
index 2c84133..e8f97a0 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
@@ -19,10 +19,8 @@ namespace TimeHACK.OS.Win95.Win95Apps
public Boolean IsFileOpenDialog = false;
public Boolean IsFileSaveDialog = false;
public String onlyViewExtension = "";
-
String ToReplaceWith = ProfileDirectory;
String currentDirectory = Path.Combine(ProfileDirectory, "folders");
- String oldLabelText;
Int32 fileType = 6;
String attemptedDirectory = "";
WindowManager wm = new WindowManager();
@@ -116,12 +114,12 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
if (new FileInfo(str).Extension == onlyViewExtension)
{
- this.mainView.Items.Add(Path.GetFileName(str), 2);
+ this.mainView.Items.Add(Path.GetFileName(str), 0);
}
}
} else {
if (!(Path.GetFileName(str) == "_data.info")) {
- this.mainView.Items.Add(Path.GetFileName(str), 2);
+ this.mainView.Items.Add(Path.GetFileName(str));
}
}
}
@@ -429,7 +427,6 @@ namespace TimeHACK.OS.Win95.Win95Apps
// IsFileDialog = False
//End Sub
void WinClassicWindowsExplorer_Load(object sender, EventArgs e) {
-
//icons.Images.Add(Properties.Resources.WinClassicFolder);
//icons.Images.Add(Properties.Resources.WinClassicComputer);
program.BringToFront();
@@ -467,18 +464,23 @@ namespace TimeHACK.OS.Win95.Win95Apps
if ((String)mainView.FocusedItem.Tag != "") { // If it isn't a file
GoToDir(currentDirectory + "\\" + mainView.FocusedItem.Tag);
} else { // If it is a file
- if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension)
- {
- Program.WindowsExplorerReturnPath = currentDirectory + "\\" + txtSave.Text;
- }
+ if (IsFileOpenDialog == true || IsFileSaveDialog == true) { // If it is a open/save file dialog box
+ Program.WindowsExplorerReturnPath = currentDirectory + "\\" + mainView.FocusedItem.Text;
+ ((Form)this.TopLevelControl).Close();
+ } else {
- FileDialogBoxManager.IsInOpenDialog = false;
- FileDialogBoxManager.IsInSaveDialog = false;
+ ReturnType(new FileInfo(currentDirectory + "\\" + mainView.FocusedItem.Text).Extension);
- ((Form)this.TopLevelControl).Close();
+ switch (fileType) {
+ case 1:
+ //ManageTextFile.OpenNewTextFile(currentDirectory + "\\" + mainView.FocusedItem.Text);
+ break;
+ }
+ }
}
- } catch {
+
+ } catch (Exception ex) {
}
}
@@ -490,9 +492,11 @@ namespace TimeHACK.OS.Win95.Win95Apps
if (diskView.FocusedItem.Text == "My Computer") {
GoToDir(ProfileFileSystemDirectory);
+
}
- } catch {
+
+ } catch (Exception ex) {
}
}
@@ -536,42 +540,24 @@ namespace TimeHACK.OS.Win95.Win95Apps
private void Button1_Click(object sender, EventArgs e)
{
- try
+ if (txtSave.Text == "")
{
- Boolean OpenFile = false;
- if (mainView.FocusedItem != null)
- {
- if ((String)mainView.FocusedItem.Tag != "")
- { // If it isn't a file
- GoToDir(currentDirectory + "\\" + mainView.FocusedItem.Tag);
- }
- else OpenFile = true; // If it is a file
- }
- else OpenFile = true;
- if (OpenFile == true)
+ wm.startInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info);
+ }
+ else
+ {
+ if (new FileInfo(currentDirectory + "\\" + txtSave.Text).Extension == onlyViewExtension)
{
- if (txtSave.Text == "")
- {
- wm.startInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info);
- }
- else
- {
- if (new FileInfo(currentDirectory + "\\" + txtSave.Text).Extension == onlyViewExtension)
- {
- Program.WindowsExplorerReturnPath = currentDirectory + "\\" + txtSave.Text;
-
- }
+ Program.WindowsExplorerReturnPath = currentDirectory + "\\" + txtSave.Text;
-
- FileDialogBoxManager.IsInOpenDialog = false;
- FileDialogBoxManager.IsInSaveDialog = false;
-
- ((Form)this.TopLevelControl).Close();
- }
}
- } catch {
+
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
+
+ ((Form)this.TopLevelControl).Close();
}
}
@@ -579,7 +565,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
try
{
- if (!File.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text)))
+ if (!File.Exists(currentDirectory + mainView.FocusedItem.Text))
{
wm.startInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info);
}
@@ -600,48 +586,11 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
((Form)this.TopLevelControl).Close();
}
+
private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e)
{
WindowManager wm = new WindowManager();
wm.startAboutBox95("Windows 95", "Microsoft Windows 95 Rev B", Properties.Resources.WinClassicAbout95);
}
-
- private void RenameToolStripMenuItem_Click(object sender, EventArgs e)
- {
- try
- {
- // The AfterLabelEdit event will kick in after this
- oldLabelText = mainView.FocusedItem.Text;
- mainView.LabelEdit = true;
- mainView.FocusedItem.BeginEdit();
- } catch
- {
-
- }
- }
-
- private void mainView_AfterLabelEdit(object sender, LabelEditEventArgs e)
- {
-
- String setText;
- setText = mainView.FocusedItem.Text;
- if (setText == "")
- {
- wm.startInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info);
- }
- else
- {
- if (Directory.Exists(setText))
- {
- wm.startInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info);
- }
- else
- {
- Directory.Delete(Path.Combine(currentDirectory, oldLabelText), true);
- Directory.CreateDirectory(Path.Combine(currentDirectory, setText));
- }
- }
- RefreshAll();
- }
}
}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx
index ecbc974..8e25a32 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD8
- CQAAAk1TRnQBSQFMAgEBAwEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CQAAAk1TRnQBSQFMAgEBAwEAASgBAAEoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -181,7 +181,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD8
- CQAAAk1TRnQBSQFMAgEBAwEAASABAAEgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CQAAAk1TRnQBSQFMAgEBAwEAARABAAEQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA