Merge pull request #109 from jayxkanz666/master

Added lots of features to WinClassicTerminal.cs
This commit is contained in:
AShifter 2017-07-02 13:45:58 -07:00 committed by GitHub
commit ddbca5032c
35 changed files with 442 additions and 71 deletions

View file

@ -21,7 +21,7 @@ public enum BSODCauses
public Win9XBSOD throw9XBSOD(bool except, BSODCauses type) public Win9XBSOD throw9XBSOD(bool except, BSODCauses type)
{ {
pfc.AddFontFile(SaveSystem.GameDirectory + "\\Data\\windows_command_prompt.ttf"); pfc.AddFontFile($@"{SaveSystem.GameDirectory}\Data\windows_command_prompt.ttf");
Win9XBSOD bsod = new Win9XBSOD(); Win9XBSOD bsod = new Win9XBSOD();
foreach (Control ctrl in bsod.Controls) { foreach (Control ctrl in bsod.Controls) {
ctrl.Font = new System.Drawing.Font(pfc.Families[0], 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((0))); ctrl.Font = new System.Drawing.Font(pfc.Families[0], 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((0)));

View file

@ -11,7 +11,7 @@ namespace TimeHACK.Engine
public class Paintbrush public class Paintbrush
{ {
public static void paintClassicBorders(object sender, PaintEventArgs e, int borderwidth) public static void PaintClassicBorders(object sender, PaintEventArgs e, int borderwidth)
{ {
ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle, ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle,
SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset, SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset,

View file

@ -10,7 +10,7 @@ public class WindowManager
{ {
public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
public WinClassic startWin95(UserControl content, String title, Image icon, Boolean MaxButton, Boolean MinButton, Boolean ShowApplicationAsDialog = false) public WinClassic StartWin95(UserControl content, String title, Image icon, Boolean MaxButton, Boolean MinButton, Boolean ShowApplicationAsDialog = false)
{ {
// Setup Window // Setup Window
WinClassic app = new WinClassic(); WinClassic app = new WinClassic();
@ -72,23 +72,24 @@ public WinClassic startWin95(UserControl content, String title, Image icon, Bool
return app; return app;
} }
public WinClassic startInfobox95(String title, String text, Image erroricon) public WinClassic StartInfobox95(String title, String text, Image erroricon)
{ {
Infobox95 app = new Infobox95(); Infobox95 app = new Infobox95();
app.infoText.Text = text; app.infoText.Text = text;
SoundPlayer sp = new SoundPlayer(Properties.Resources.CHORD); SoundPlayer sp = new SoundPlayer(Properties.Resources.CHORD);
sp.Play(); sp.Play();
return startWin95(app, title, null, false, false); return StartWin95(app, title, null, false, false);
} }
public WinClassic startAboutBox95(String shortname, String longname, Image appicon) public WinClassic StartAboutBox95(String shortname, String longname, Image appicon)
{ {
AboutBox95 uc = new AboutBox95(); AboutBox95 uc = new AboutBox95();
uc.pictureBox1.Image = appicon; uc.pictureBox1.Image = appicon;
uc.textBox1.Text = longname + "\r\nWindows 95\r\nCopyright © 1981-1995 Microsoft Corp."; uc.textBox1.Text = longname + "\r\nWindows 95\r\nCopyright © 1981-1995 Microsoft Corp.";
uc.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); uc.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
return startWin95(uc, "About " + shortname, null, false, false); return StartWin95(uc, "About " + shortname, null, false, false);
} }
} }
} }

View file

@ -123,7 +123,7 @@ private void newFolderToolStripMenuItem_Click(object sender, EventArgs e)
void NewFolder() void NewFolder()
{ {
FRMWinClassicAddressBookNewFolder abnf = new FRMWinClassicAddressBookNewFolder(); FRMWinClassicAddressBookNewFolder abnf = new FRMWinClassicAddressBookNewFolder();
WinClassic app = wm.startWin95(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true); WinClassic app = wm.StartWin95(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true);
if (treeView1.SelectedNode != null) if (treeView1.SelectedNode != null)
{ {
@ -133,7 +133,7 @@ void NewFolder()
} }
else 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!", Properties.Resources.Win95Error);
} }
} }
} }
@ -146,7 +146,7 @@ private void newContactToolStripMenuItem_Click(object sender, EventArgs e)
void NewContact() void NewContact()
{ {
FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact(); FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact();
WinClassic app = wm.startWin95(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true); WinClassic app = wm.StartWin95(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true);
if (treeView1.SelectedNode != null) if (treeView1.SelectedNode != null)
{ {
@ -189,7 +189,7 @@ void OpenProperties()
} }
} }
} }
WinClassic app = wm.startWin95(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true); WinClassic app = wm.StartWin95(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true);
if (treeView1.SelectedNode != null) if (treeView1.SelectedNode != null)
{ {

View file

@ -36,7 +36,7 @@ private void exitToolStripMenuItem_Click(object sender, EventArgs e)
private void aboutNotepadToolStripMenuItem_Click(object sender, EventArgs e) private void aboutNotepadToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WindowManager wm = new WindowManager(); WindowManager wm = new WindowManager();
wm.startAboutBox95("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad); wm.StartAboutBox95("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad);
} }
private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e) private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e)

View file

@ -28,35 +28,183 @@ protected override void Dispose(bool disposing)
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.cmdPrompt = new System.Windows.Forms.RichTextBox();
this.actionPanel = new System.Windows.Forms.Panel();
this.btnFont = new System.Windows.Forms.Button();
this.btnCopy = new System.Windows.Forms.Button();
this.termMax = new System.Windows.Forms.Button();
this.btnNothing = new System.Windows.Forms.Button();
this.btnSettings = new System.Windows.Forms.Button();
this.btnPaste = new System.Windows.Forms.Button();
this.btnMark = new System.Windows.Forms.Button();
this.sizeSel = new System.Windows.Forms.ComboBox();
this.actionPanel.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// richTextBox1 // cmdPrompt
// //
this.richTextBox1.BackColor = System.Drawing.Color.Black; this.cmdPrompt.BackColor = System.Drawing.Color.Black;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.cmdPrompt.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmdPrompt.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richTextBox1.ForeColor = System.Drawing.Color.White; this.cmdPrompt.ForeColor = System.Drawing.Color.White;
this.richTextBox1.Location = new System.Drawing.Point(0, 0); this.cmdPrompt.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1"; this.cmdPrompt.Name = "cmdPrompt";
this.richTextBox1.ReadOnly = true; this.cmdPrompt.ShowSelectionMargin = true;
this.richTextBox1.Size = new System.Drawing.Size(459, 262); this.cmdPrompt.Size = new System.Drawing.Size(459, 262);
this.richTextBox1.TabIndex = 0; this.cmdPrompt.TabIndex = 0;
this.richTextBox1.Text = ""; this.cmdPrompt.Text = "";
this.cmdPrompt.KeyUp += new System.Windows.Forms.KeyEventHandler(this.richTextBox1_KeyUp);
//
// actionPanel
//
this.actionPanel.BackColor = System.Drawing.Color.Silver;
this.actionPanel.Controls.Add(this.btnFont);
this.actionPanel.Controls.Add(this.btnCopy);
this.actionPanel.Controls.Add(this.termMax);
this.actionPanel.Controls.Add(this.btnNothing);
this.actionPanel.Controls.Add(this.btnSettings);
this.actionPanel.Controls.Add(this.btnPaste);
this.actionPanel.Controls.Add(this.btnMark);
this.actionPanel.Controls.Add(this.sizeSel);
this.actionPanel.Dock = System.Windows.Forms.DockStyle.Top;
this.actionPanel.Location = new System.Drawing.Point(0, 0);
this.actionPanel.Name = "actionPanel";
this.actionPanel.Size = new System.Drawing.Size(459, 28);
this.actionPanel.TabIndex = 1;
//
// btnFont
//
this.btnFont.BackgroundImage = global::TimeHACK.Properties.Resources.termFont;
this.btnFont.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnFont.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFont.Location = new System.Drawing.Point(266, 3);
this.btnFont.Name = "btnFont";
this.btnFont.Size = new System.Drawing.Size(23, 22);
this.btnFont.TabIndex = 7;
this.btnFont.UseVisualStyleBackColor = true;
this.btnFont.Click += new System.EventHandler(this.btnFont_Click);
//
// btnCopy
//
this.btnCopy.BackgroundImage = global::TimeHACK.Properties.Resources.termCopy;
this.btnCopy.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopy.Location = new System.Drawing.Point(126, 3);
this.btnCopy.Name = "btnCopy";
this.btnCopy.Size = new System.Drawing.Size(23, 22);
this.btnCopy.TabIndex = 6;
this.btnCopy.UseVisualStyleBackColor = true;
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
//
// termMax
//
this.termMax.BackgroundImage = global::TimeHACK.Properties.Resources.termMax;
this.termMax.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.termMax.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.termMax.Location = new System.Drawing.Point(180, 3);
this.termMax.Name = "termMax";
this.termMax.Size = new System.Drawing.Size(23, 22);
this.termMax.TabIndex = 5;
this.termMax.UseVisualStyleBackColor = true;
this.termMax.Click += new System.EventHandler(this.termMax_Click);
//
// btnNothing
//
this.btnNothing.BackgroundImage = global::TimeHACK.Properties.Resources.termNothing;
this.btnNothing.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnNothing.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNothing.Location = new System.Drawing.Point(234, 3);
this.btnNothing.Name = "btnNothing";
this.btnNothing.Size = new System.Drawing.Size(23, 22);
this.btnNothing.TabIndex = 4;
this.btnNothing.UseVisualStyleBackColor = true;
//
// btnSettings
//
this.btnSettings.BackgroundImage = global::TimeHACK.Properties.Resources.termSettings;
this.btnSettings.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnSettings.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSettings.Location = new System.Drawing.Point(212, 3);
this.btnSettings.Name = "btnSettings";
this.btnSettings.Size = new System.Drawing.Size(23, 22);
this.btnSettings.TabIndex = 3;
this.btnSettings.UseVisualStyleBackColor = true;
this.btnSettings.Click += new System.EventHandler(this.btnSettings_Click);
//
// btnPaste
//
this.btnPaste.BackgroundImage = global::TimeHACK.Properties.Resources.termPaste;
this.btnPaste.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnPaste.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPaste.Location = new System.Drawing.Point(148, 3);
this.btnPaste.Name = "btnPaste";
this.btnPaste.Size = new System.Drawing.Size(23, 22);
this.btnPaste.TabIndex = 2;
this.btnPaste.UseVisualStyleBackColor = true;
this.btnPaste.Click += new System.EventHandler(this.btnPaste_Click);
//
// btnMark
//
this.btnMark.BackgroundImage = global::TimeHACK.Properties.Resources.termMark;
this.btnMark.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnMark.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMark.Location = new System.Drawing.Point(104, 3);
this.btnMark.Name = "btnMark";
this.btnMark.Size = new System.Drawing.Size(23, 22);
this.btnMark.TabIndex = 1;
this.btnMark.UseVisualStyleBackColor = true;
//
// sizeSel
//
this.sizeSel.BackColor = System.Drawing.Color.Silver;
this.sizeSel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.sizeSel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.sizeSel.FormattingEnabled = true;
this.sizeSel.Items.AddRange(new object[] {
"Auto",
"4 x 6",
"5 x 12",
"6 x 8",
"6 x 12",
"7 x 12",
"7 x 14",
"7 x 15",
"8 x 8",
"8 x 12",
"8 x 16",
"10 x 18",
"10 x 20",
"12 x 16",
"12 x 22"});
this.sizeSel.Location = new System.Drawing.Point(4, 4);
this.sizeSel.Name = "sizeSel";
this.sizeSel.Size = new System.Drawing.Size(92, 21);
this.sizeSel.TabIndex = 0;
// //
// WinClassicTerminal // WinClassicTerminal
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.richTextBox1); this.Controls.Add(this.actionPanel);
this.Controls.Add(this.cmdPrompt);
this.Name = "WinClassicTerminal"; this.Name = "WinClassicTerminal";
this.Size = new System.Drawing.Size(459, 262); this.Size = new System.Drawing.Size(459, 262);
this.actionPanel.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.RichTextBox richTextBox1; private System.Windows.Forms.RichTextBox cmdPrompt;
private System.Windows.Forms.Panel actionPanel;
private System.Windows.Forms.Button btnFont;
private System.Windows.Forms.Button btnCopy;
private System.Windows.Forms.Button termMax;
private System.Windows.Forms.Button btnNothing;
private System.Windows.Forms.Button btnSettings;
private System.Windows.Forms.Button btnPaste;
private System.Windows.Forms.Button btnMark;
private System.Windows.Forms.ComboBox sizeSel;
} }
} }

View file

@ -12,14 +12,39 @@
using System.Threading; using System.Threading;
using System.Reflection; using System.Reflection;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Diagnostics;
namespace TimeHACK.OS.Win95.Win95Apps namespace TimeHACK.OS.Win95.Win95Apps
{ {
public partial class WinClassicTerminal : UserControl public partial class WinClassicTerminal : UserControl
{ {
public Engine.WindowManager wm = new Engine.WindowManager();
public static int currentLine = 0;
public static string prefix = @"C:\>";
public static string startupDir = $"{Engine.SaveSystem.ProfileMyComputerDirectory}";
public WinClassicTerminal() public WinClassicTerminal()
{ {
InitializeComponent(); InitializeComponent();
// Paint the classic borders
btnCopy.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
btnFont.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
btnMark.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
btnNothing.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
btnPaste.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
btnSettings.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
sizeSel.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
// Set the default index to "Auto"
sizeSel.SelectedIndex = 0;
// Set the font and append the prefix text
cmdPrompt.Font = new System.Drawing.Font(TitleScreen.pfc.Families[1], 10F, System.Drawing.FontStyle.Regular);
cmdPrompt.AppendText(prefix);
cmdPrompt.BringToFront();
} }
/// <summary> /// <summary>
/// Write text to the Terminal and create a new line. Very similar to the Win32 Console.WriteLine Function. /// Write text to the Terminal and create a new line. Very similar to the Win32 Console.WriteLine Function.
@ -27,7 +52,7 @@ public WinClassicTerminal()
/// <param name="Text"></param> /// <param name="Text"></param>
public void WriteLine(string Text) public void WriteLine(string Text)
{ {
richTextBox1.AppendText(Text + "\n"); cmdPrompt.AppendText(Text + "\n");
this.Update(); this.Update();
} }
@ -37,8 +62,71 @@ public void WriteLine(string Text)
/// <param name="Text"></param> /// <param name="Text"></param>
public void Write(String Text) public void Write(String Text)
{ {
richTextBox1.AppendText(Text); cmdPrompt.AppendText(Text);
richTextBox1.Update(); cmdPrompt.Update();
}
private void btnCopy_Click(object sender, EventArgs e)
{
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
}
private void btnPaste_Click(object sender, EventArgs e)
{
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
}
private void termMax_Click(object sender, EventArgs e)
{
var windowState = ((Engine.Template.WinClassic)this.TopLevelControl).WindowState;
if (windowState == FormWindowState.Normal)
windowState = FormWindowState.Maximized;
else if (windowState == FormWindowState.Maximized)
windowState = FormWindowState.Normal;
}
private void btnSettings_Click(object sender, EventArgs e)
{
wm.StartInfobox95("INFO", "This feature has not been implemented yet. Stay tuned! -Jason", Properties.Resources.Win95Info);
//TODO: Well, add the settings...
}
private void btnFont_Click(object sender, EventArgs e)
{
//TODO: Add font UC(?)
}
private void richTextBox1_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Return)
{
/// Temporary CMD redirect
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.WorkingDirectory = startupDir;
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = $"/C {cmdPrompt.Lines[cmdPrompt.GetLineFromCharIndex(currentLine)].Substring(prefix.Length)}";
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
cmdPrompt.Focus();
cmdPrompt.AppendText($"\n{output}");
currentLine++;
cmdPrompt.AppendText($"\n{prefix}");
}
} }
} }
} }

View file

@ -151,7 +151,7 @@ void RefreshAll() {
dirLbl.Text = currentDirectory; dirLbl.Text = currentDirectory;
CheckLbl(); CheckLbl();
} catch (Exception ex) { } 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);
((Form)this.TopLevelControl).Close(); ((Form)this.TopLevelControl).Close();
} }
} }
@ -548,7 +548,7 @@ private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
private void FolderToolStripMenuItem_Click(object sender, EventArgs e) private void FolderToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (File.Exists(currentDirectory + "\\New Folder")) { 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);
} else { } else {
Directory.CreateDirectory(currentDirectory + "\\New Folder"); Directory.CreateDirectory(currentDirectory + "\\New Folder");
SaveDirectoryInfo(currentDirectory + "\\New Folder", false, "New Folder", true); SaveDirectoryInfo(currentDirectory + "\\New Folder", false, "New Folder", true);
@ -575,7 +575,7 @@ private void Button1_Click(object sender, EventArgs e)
{ {
if (txtSave.Text == "") if (txtSave.Text == "")
{ {
wm.startInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info);
} }
else else
{ {
@ -604,7 +604,7 @@ private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (!File.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) if (!File.Exists(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", Properties.Resources.Win95Info);
} }
else else
{ {
@ -626,7 +626,7 @@ private void CloseToolStripMenuItem_Click(object sender, EventArgs e)
private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e) private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WindowManager wm = new WindowManager(); WindowManager wm = new WindowManager();
wm.startAboutBox95("Windows 95", "Microsoft Windows 95 Rev B", Properties.Resources.WinClassicAbout95); wm.StartAboutBox95("Windows 95", "Microsoft Windows 95 Rev B", Properties.Resources.WinClassicAbout95);
} }
private void RenameToolStripMenuItem_Click(object sender, EventArgs e) private void RenameToolStripMenuItem_Click(object sender, EventArgs e)
@ -650,13 +650,13 @@ private void mainView_AfterLabelEdit(object sender, LabelEditEventArgs e)
setText = mainView.FocusedItem.Text; setText = mainView.FocusedItem.Text;
if (setText == "") 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", Properties.Resources.Win95Info);
} }
else else
{ {
if (Directory.Exists(setText)) if (Directory.Exists(setText))
{ {
wm.startInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info);
} }
else else
{ {

View file

@ -122,7 +122,7 @@ private void exitToolStripMenuItem_Click(object sender, EventArgs e)
private void aboutWordpadToolStripMenuItem_Click(object sender, EventArgs e) private void aboutWordpadToolStripMenuItem_Click(object sender, EventArgs e)
{ {
wm.startAboutBox95("Wordpad", "Microsoft Wordpad", Properties.Resources.Win95IconWordpad); wm.StartAboutBox95("Wordpad", "Microsoft Wordpad", Properties.Resources.Win95IconWordpad);
} }
private void newToolStripMenuItem_Click(object sender, EventArgs e) private void newToolStripMenuItem_Click(object sender, EventArgs e)
@ -137,7 +137,7 @@ private void btnNew_Click(object sender, EventArgs e)
private void sendToolStripMenuItem_Click(object sender, EventArgs e) private void sendToolStripMenuItem_Click(object sender, EventArgs e)
{ {
wm.startInfobox95("Wordpad", "An error occured opening send option.", null); wm.StartInfobox95("Wordpad", "An error occured opening send option.", null);
} }
void Cut() void Cut()

View file

@ -244,7 +244,7 @@ private void InitializeComponent()
this.startmenuitems.Name = "startmenuitems"; this.startmenuitems.Name = "startmenuitems";
this.startmenuitems.Padding = new System.Windows.Forms.Padding(6, 2, 0, 0); this.startmenuitems.Padding = new System.Windows.Forms.Padding(6, 2, 0, 0);
this.startmenuitems.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; 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.TabIndex = 0;
this.startmenuitems.Text = "StartMenu"; this.startmenuitems.Text = "StartMenu";
// //
@ -644,6 +644,7 @@ private void InitializeComponent()
this.MSDOSPromptToolStripMenuItem1.Name = "MSDOSPromptToolStripMenuItem1"; this.MSDOSPromptToolStripMenuItem1.Name = "MSDOSPromptToolStripMenuItem1";
this.MSDOSPromptToolStripMenuItem1.Size = new System.Drawing.Size(181, 28); this.MSDOSPromptToolStripMenuItem1.Size = new System.Drawing.Size(181, 28);
this.MSDOSPromptToolStripMenuItem1.Text = "MS-DOS Prompt"; this.MSDOSPromptToolStripMenuItem1.Text = "MS-DOS Prompt";
this.MSDOSPromptToolStripMenuItem1.Click += new System.EventHandler(this.MSDOSPromptToolStripMenuItem1_Click);
// //
// OutlookExpressToolStripMenuItem // OutlookExpressToolStripMenuItem
// //

View file

@ -149,7 +149,7 @@ private void NotePadToolStripMenuItem_Click(object sender, EventArgs e)
private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e) private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e)
{ {
TestApp test = new TestApp(); TestApp test = new TestApp();
WinClassic app = wm.startWin95(test, "TestApp", null, true, true); WinClassic app = wm.StartWin95(test, "TestApp", null, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null); AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null);
app.BringToFront(); app.BringToFront();
startmenu.Hide(); startmenu.Hide();
@ -158,7 +158,7 @@ private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e
private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e) private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WinClassicDownloader opendownload = new WinClassicDownloader(); WinClassicDownloader opendownload = new WinClassicDownloader();
WinClassic app = wm.startWin95(opendownload, "Downloader", null, false, true); WinClassic app = wm.StartWin95(opendownload, "Downloader", null, false, true);
opendownload.appName.Text = "Downloading: Survive The Day"; opendownload.appName.Text = "Downloading: Survive The Day";
AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null); AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null);
@ -170,7 +170,7 @@ private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
private void installerTestToolStripMenuItem_Click(object sender, EventArgs e) private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WinClassicInstaller openinstaller = new WinClassicInstaller(); WinClassicInstaller openinstaller = new WinClassicInstaller();
WinClassic app = wm.startWin95(openinstaller, "Installer", null, false, true); WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true);
AddTaskBarItem(app, app.Tag.ToString(), "Installer", null); AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);
@ -211,7 +211,7 @@ private void desktopicons_Click(object sender, EventArgs e)
private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) 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, Image erroricon)!", Properties.Resources.Win95Info);
app.BringToFront(); app.BringToFront();
startmenu.Hide(); startmenu.Hide();
@ -219,7 +219,7 @@ private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WebChat1998 wc = new WebChat1998(); WebChat1998 wc = new WebChat1998();
WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true); WinClassic app = wm.StartWin95(wc, "Web Chat 1998", null, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null); AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null);
@ -290,6 +290,11 @@ void StartSurviveTheDay()
startmenu.Hide(); startmenu.Hide();
} }
private void MSDOSPromptToolStripMenuItem1_Click(object sender, EventArgs e)
{
openApp.OpenApp("msdos");
}
//TODO: Add Outlook Express 4 //TODO: Add Outlook Express 4
} }
} }

View file

@ -407,7 +407,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq
ggAAAk1TRnQBSQFMAgEBDAEAAXABAQFwAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA ggAAAk1TRnQBSQFMAgEBDAEAAXgBAQF4AQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A 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/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/ /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/

View file

@ -109,7 +109,7 @@ private void NotePadToolStripMenuItem_Click(object sender, EventArgs e)
private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e) private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e)
{ {
TestApp test = new TestApp(); TestApp test = new TestApp();
WinClassic app = wm.startWin95(test, "TestApp", null, true, true); WinClassic app = wm.StartWin95(test, "TestApp", null, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null); AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null);
app.BringToFront(); app.BringToFront();
startmenu.Hide(); startmenu.Hide();
@ -118,7 +118,7 @@ private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e
private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e) private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WinClassicDownloader opendownload = new WinClassicDownloader(); WinClassicDownloader opendownload = new WinClassicDownloader();
WinClassic app = wm.startWin95(opendownload, "Downloader", null, false, true); WinClassic app = wm.StartWin95(opendownload, "Downloader", null, false, true);
opendownload.appName.Text = "Downloading: Survive The Day"; opendownload.appName.Text = "Downloading: Survive The Day";
AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null); AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null);
@ -130,7 +130,7 @@ private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
private void installerTestToolStripMenuItem_Click(object sender, EventArgs e) private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WinClassicInstaller openinstaller = new WinClassicInstaller(); WinClassicInstaller openinstaller = new WinClassicInstaller();
WinClassic app = wm.startWin95(openinstaller, "Installer", null, false, true); WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true);
AddTaskBarItem(app, app.Tag.ToString(), "Installer", null); AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);
@ -145,7 +145,7 @@ private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e)
private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) 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, Image erroricon)!", Properties.Resources.Win95Info);
app.BringToFront(); app.BringToFront();
startmenu.Hide(); startmenu.Hide();
@ -153,7 +153,7 @@ private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
{ {
WebChat1998 wc = new WebChat1998(); WebChat1998 wc = new WebChat1998();
WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true); WinClassic app = wm.StartWin95(wc, "Web Chat 1998", null, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null); AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null);

View file

@ -26,7 +26,7 @@ public static void startObjective()
System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer(); System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer();
WinClassicTerminal Console = new WinClassicTerminal(); WinClassicTerminal Console = new WinClassicTerminal();
WinClassic app = wm.startWin95(Console, "MS-DOS Prompt", null, true, true); WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true);
Console.WriteLine("telnet> 104.27.135.159 Connecting..."); Console.WriteLine("telnet> 104.27.135.159 Connecting...");
@ -51,7 +51,7 @@ public static void startObjective()
public static void continueObjective() public static void continueObjective()
{ {
WinClassicTerminal Console = new WinClassicTerminal(); WinClassicTerminal Console = new WinClassicTerminal();
wm.startWin95(Console, "MS-DOS Prompt", null, true, true); wm.StartWin95(Console, "MS-DOS Prompt", null, true, true);
Application.DoEvents(); Application.DoEvents();

View file

@ -202,7 +202,7 @@ private void InitializeComponent()
this.button1.Text = "Login"; this.button1.Text = "Login";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click); this.button1.Click += new System.EventHandler(this.Button1_Click);
this.button1.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); this.button1.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
// //
// txtscreenname // txtscreenname
// //
@ -241,7 +241,7 @@ private void InitializeComponent()
this.button2.Text = "Speak"; this.button2.Text = "Speak";
this.button2.UseVisualStyleBackColor = true; this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.Button2_Click); this.button2.Click += new System.EventHandler(this.Button2_Click);
this.button2.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); this.button2.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
// //
// button3 // button3
// //
@ -254,7 +254,7 @@ private void InitializeComponent()
this.button3.Text = "Paul"; this.button3.Text = "Paul";
this.button3.UseVisualStyleBackColor = true; this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.Button3_Click); this.button3.Click += new System.EventHandler(this.Button3_Click);
this.button3.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); this.button3.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
// //
// button4 // button4
// //

View file

@ -52,10 +52,10 @@ private void WebChat1998_Load(object sender, EventArgs e)
} }
private void Button1_Click(object sender, EventArgs e) 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 == "") { 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.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.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 == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.StartInfobox95("Invalid Username", "That username is already taken.", Properties.Resources.Win95Warning); return; }
ParentForm.AcceptButton = button2; ParentForm.AcceptButton = button2;
TitleScreen.username = txtscreenname.Text; TitleScreen.username = txtscreenname.Text;
login.Hide(); login.Hide();

View file

@ -123,7 +123,7 @@ private void WCDownloadButton_Click(object sender, HtmlElementEventArgs e)
{ {
WinClassicDownloader opendownload = new WinClassicDownloader(); WinClassicDownloader opendownload = new WinClassicDownloader();
WindowManager wm = new WindowManager(); WindowManager wm = new WindowManager();
wm.startWin95(opendownload, "Downloader", null, false, true); wm.StartWin95(opendownload, "Downloader", null, false, true);
opendownload.appName.Text = "Downloading: Web Chat"; opendownload.appName.Text = "Downloading: Web Chat";
} }

View file

@ -177,7 +177,7 @@ private void InitializeComponent()
this.startmenu.Name = "startmenu"; this.startmenu.Name = "startmenu";
this.startmenu.Size = new System.Drawing.Size(174, 300); this.startmenu.Size = new System.Drawing.Size(174, 300);
this.startmenu.TabIndex = 4; this.startmenu.TabIndex = 4;
this.startmenu.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); this.startmenu.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
// //
// startmenuitems // startmenuitems
// //

View file

@ -26,7 +26,7 @@ public void OpenApp(String appName)
switch (appName.ToLower()) switch (appName.ToLower())
{ {
case "notepad": case "notepad":
toReturn = wm.startWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad, true, true); toReturn = wm.StartWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad, true, true);
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad);
Program.nonimportantapps.Add(toReturn); Program.nonimportantapps.Add(toReturn);
@ -37,7 +37,7 @@ public void OpenApp(String appName)
break; break;
case "wordpad": case "wordpad":
toReturn = wm.startWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95IconWordpad, true, true); toReturn = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95IconWordpad, true, true);
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);
Program.nonimportantapps.Add(toReturn); Program.nonimportantapps.Add(toReturn);
@ -46,7 +46,7 @@ public void OpenApp(String appName)
break; break;
case "addressbook": case "addressbook":
toReturn = wm.startWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); toReturn = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true);
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook);
Program.nonimportantapps.Add(toReturn); Program.nonimportantapps.Add(toReturn);
@ -55,7 +55,7 @@ public void OpenApp(String appName)
break; break;
case "ie4": case "ie4":
toReturn = wm.startWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconNotepad, true, true); toReturn = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconNotepad, true, true);
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconNotepad); Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconNotepad);
break; break;
@ -63,7 +63,7 @@ public void OpenApp(String appName)
FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInOpenDialog = false;
FileDialogBoxManager.IsInSaveDialog = false; FileDialogBoxManager.IsInSaveDialog = false;
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
Program.nonimportantapps.Add(app); Program.nonimportantapps.Add(app);
@ -75,7 +75,7 @@ public void OpenApp(String appName)
break; break;
case "survivetheday": case "survivetheday":
TimeHACK.OS.Win2K.Win2KApps.SurviveTheDay std = new TimeHACK.OS.Win2K.Win2KApps.SurviveTheDay(); TimeHACK.OS.Win2K.Win2KApps.SurviveTheDay std = new TimeHACK.OS.Win2K.Win2KApps.SurviveTheDay();
toReturn = wm.startWin95(std, "Survive The Day", null, false, false); toReturn = wm.StartWin95(std, "Survive The Day", null, false, false);
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Survive The Day", null); Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Survive The Day", null);
Program.nonimportantapps.Add(toReturn); Program.nonimportantapps.Add(toReturn);
@ -87,11 +87,19 @@ public void OpenApp(String appName)
break; break;
case "webchat1998": case "webchat1998":
WebChat1998 wc = new WebChat1998(); WebChat1998 wc = new WebChat1998();
toReturn = wm.startWin95(wc, "Web Chat 1998", null, true, true); toReturn = wm.StartWin95(wc, "Web Chat 1998", null, true, true);
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Web Chat 1998", null); Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Web Chat 1998", null);
toReturn.BringToFront(); toReturn.BringToFront();
break;
case "msdos":
WinClassicTerminal msdos = new WinClassicTerminal();
toReturn = wm.StartWin95(msdos, "MS-DOS Prompt", Properties.Resources.MS_DOS, true, true, false);
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "MS-DOS Prompt", Properties.Resources.MS_DOS);
toReturn.BringToFront();
break; break;
} }
} }

View file

@ -73,7 +73,7 @@ public static String OpenFileExplorerAsDialogAndReturnGivenPath()
{ {
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true);
try try
{ {
return WindowsExplorerReturnPath; return WindowsExplorerReturnPath;

View file

@ -194,6 +194,16 @@ internal static System.IO.UnmanagedMemoryStream modem_dial {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap MS_DOS {
get {
object obj = ResourceManager.GetObject("MS_DOS", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -324,6 +334,76 @@ internal static System.Drawing.Bitmap TaskBarClock {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap termCopy {
get {
object obj = ResourceManager.GetObject("termCopy", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap termFont {
get {
object obj = ResourceManager.GetObject("termFont", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap termMark {
get {
object obj = ResourceManager.GetObject("termMark", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap termMax {
get {
object obj = ResourceManager.GetObject("termMax", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap termNothing {
get {
object obj = ResourceManager.GetObject("termNothing", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap termPaste {
get {
object obj = ResourceManager.GetObject("termPaste", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap termSettings {
get {
object obj = ResourceManager.GetObject("termSettings", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View file

@ -504,4 +504,34 @@
<data name="WinClassicCalc" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="WinClassicCalc" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WinClassic\WinClassicCalc.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\WinClassic\WinClassicCalc.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="termCopy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\termCopy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="termFont" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\termFont.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="termMark" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\termMark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="termMax" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\termMax.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="termNothing" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\termNothing.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="termPaste" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\termPaste.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="termSettings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\termSettings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LauncherSideBar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LauncherSideBar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Win98SideBar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Win98SideBar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MS_DOS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MS-DOS-logo-1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

View file

@ -397,9 +397,18 @@
<Content Include="Resources\IE4\padams.html" /> <Content Include="Resources\IE4\padams.html" />
<None Include="Resources\wmsui32_1001.ico_16x16.png" /> <None Include="Resources\wmsui32_1001.ico_16x16.png" />
<None Include="Resources\shell32_21.ico_16x16.png" /> <None Include="Resources\shell32_21.ico_16x16.png" />
<None Include="Resources\LauncherSideBar.png" />
<Content Include="Resources\modem_dial.wav" /> <Content Include="Resources\modem_dial.wav" />
<None Include="Resources\MS-DOS-logo-1.png" />
<Content Include="Resources\std_beep.wav" /> <Content Include="Resources\std_beep.wav" />
<Content Include="Resources\std_gobeep.wav" /> <Content Include="Resources\std_gobeep.wav" />
<None Include="Resources\termCopy.png" />
<None Include="Resources\termFont.png" />
<None Include="Resources\termMark.png" />
<None Include="Resources\termMax.png" />
<None Include="Resources\termNothing.png" />
<None Include="Resources\termPaste.png" />
<None Include="Resources\termSettings.png" />
<Content Include="Resources\TitleScreen\Exit.png" /> <Content Include="Resources\TitleScreen\Exit.png" />
<Content Include="Resources\TitleScreen\LoadGame.png" /> <Content Include="Resources\TitleScreen\LoadGame.png" />
<Content Include="Resources\TitleScreen\MSExit.png" /> <Content Include="Resources\TitleScreen\MSExit.png" />
@ -414,6 +423,7 @@
<None Include="Resources\WinClassic\WinClassicUndo.png" /> <None Include="Resources\WinClassic\WinClassicUndo.png" />
<None Include="Resources\LeviWindows.ttf" /> <None Include="Resources\LeviWindows.ttf" />
<None Include="Resources\WinClassicAbout95.png" /> <None Include="Resources\WinClassicAbout95.png" />
<None Include="Resources\Win98SideBar.png" />
<Content Include="Resources\WinClassic\16Color.png" /> <Content Include="Resources\WinClassic\16Color.png" />
<Content Include="Resources\WinClassic\256Color.png" /> <Content Include="Resources\WinClassic\256Color.png" />
<None Include="Resources\WinClassic\tada.wav" /> <None Include="Resources\WinClassic\tada.wav" />

View file

@ -213,7 +213,7 @@ private void InitializeComponent()
this.startmenu.Name = "startmenu"; this.startmenu.Name = "startmenu";
this.startmenu.Size = new System.Drawing.Size(165, 187); this.startmenu.Size = new System.Drawing.Size(165, 187);
this.startmenu.TabIndex = 11; this.startmenu.TabIndex = 11;
this.startmenu.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); this.startmenu.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
// //
// startmenuitems // startmenuitems
// //

View file

@ -195,7 +195,7 @@ private static void leet()
label1.Parent = leet; label1.Parent = leet;
label1.AutoSize = true; label1.AutoSize = true;
label1.Text = "Thank you for making TimeHACK possible."; label1.Text = "Thank you for making TimeHACK possible.";
wm.startWin95(leet, "Thank You", null, true, true); wm.StartWin95(leet, "Thank You", null, true, true);
} }
// The VM Mode timer / checker. Updates every 100ms // The VM Mode timer / checker. Updates every 100ms