mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
switch-case is a thing, alex. fucking use it
This commit is contained in:
parent
74892c42ac
commit
6e993159dd
4 changed files with 147 additions and 178 deletions
|
@ -264,59 +264,50 @@ private void desktopicons_DoubleClick(object sender, EventArgs e)
|
|||
objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
|
||||
if (objListViewItem != null)
|
||||
{
|
||||
if (objListViewItem.Text == "Internet Explorer")
|
||||
switch (objListViewItem.Text)
|
||||
{
|
||||
case "Internet Explorer":
|
||||
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.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true);
|
||||
AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
|
||||
ie.BringToFront();
|
||||
ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing);
|
||||
startmenu.Hide();
|
||||
}
|
||||
else if (objListViewItem.Text == "My Computer") // TODO: Implement slightly limited explorer (with no treeview and a new window each time ya go into a dir)
|
||||
{
|
||||
WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
||||
app.BringToFront();
|
||||
break;
|
||||
case "My Computer":
|
||||
WinClassic we = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
AddTaskBarItem(we, we.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
||||
we.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
else if (objListViewItem.Text == "Network Neighborhood")
|
||||
{
|
||||
break;
|
||||
case "Network Neighborhood":
|
||||
// Alex's TODO here
|
||||
|
||||
}
|
||||
else if (objListViewItem.Text == "Recycle Bin")
|
||||
{
|
||||
break;
|
||||
case "Recycle Bin":
|
||||
// Another thing you may need to digital poke Alex about doing.
|
||||
|
||||
}
|
||||
else if (objListViewItem.Text == "Set Up The Microsoft Network") {
|
||||
break;
|
||||
case "Set Up The Microsoft Network":
|
||||
wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", InfoboxType.Info, InfoboxButtons.OK);
|
||||
} else if (objListViewItem.Text == "Outlook Express") {
|
||||
break;
|
||||
case "Outlook Express":
|
||||
//wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error);
|
||||
}
|
||||
else if (objListViewItem.Text == "Inbox")
|
||||
{
|
||||
break;
|
||||
case "Inbox":
|
||||
//wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error);
|
||||
}
|
||||
else if (objListViewItem.Text == "Online Services")
|
||||
{
|
||||
break;
|
||||
case "Online Services":
|
||||
wm.StartInfobox95("Caught it!", "If you were to run this, the game would crash!\nLuckily, it won't crash this time!", InfoboxType.Error, InfoboxButtons.OK);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
break;
|
||||
default:
|
||||
// It is an actual file on the disk
|
||||
|
||||
Win95WindowsExplorer we = new Win95WindowsExplorer();
|
||||
Win95WindowsExplorer wwe = new Win95WindowsExplorer();
|
||||
|
||||
// If it is a directory
|
||||
|
||||
if (Directory.Exists(objListViewItem.Tag.ToString()))
|
||||
{
|
||||
we.CurrentDirectory = objListViewItem.Tag.ToString();
|
||||
wwe.CurrentDirectory = objListViewItem.Tag.ToString();
|
||||
|
||||
WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
WinClassic app = wm.Init(wwe, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
|
@ -324,9 +315,9 @@ private void desktopicons_DoubleClick(object sender, EventArgs e)
|
|||
else
|
||||
{
|
||||
// Just open the file...
|
||||
|
||||
we.OpenFile(objListViewItem.Tag.ToString());
|
||||
wwe.OpenFile(objListViewItem.Tag.ToString());
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
3
Histacom2/OS/WinME/WinME.Designer.cs
generated
3
Histacom2/OS/WinME/WinME.Designer.cs
generated
|
@ -947,12 +947,11 @@ private void InitializeComponent()
|
|||
//
|
||||
// osimage
|
||||
//
|
||||
this.osimage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.osimage.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.osimage.Image = global::Histacom2.Properties.Resources.Win95SideBar;
|
||||
this.osimage.Location = new System.Drawing.Point(0, 0);
|
||||
this.osimage.Name = "osimage";
|
||||
this.osimage.Size = new System.Drawing.Size(21, 265);
|
||||
this.osimage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.osimage.TabIndex = 0;
|
||||
this.osimage.TabStop = false;
|
||||
//
|
||||
|
|
|
@ -263,54 +263,33 @@ private void desktopicons_DoubleClick(object sender, EventArgs e)
|
|||
objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
|
||||
if (objListViewItem != null)
|
||||
{
|
||||
if (objListViewItem.Text == "Internet Explorer")
|
||||
switch (objListViewItem.Text)
|
||||
{
|
||||
case "Internet Explorer":
|
||||
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.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true);
|
||||
AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
|
||||
ie.BringToFront();
|
||||
ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing);
|
||||
startmenu.Hide();
|
||||
}
|
||||
else if (objListViewItem.Text == "My Computer") // TODO: Implement slightly limited explorer (with no treeview and a new window each time ya go into a dir)
|
||||
{
|
||||
WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
else if (objListViewItem.Text == "Network Neighborhood")
|
||||
{
|
||||
// Alex's TODO here
|
||||
|
||||
}
|
||||
else if (objListViewItem.Text == "Recycle Bin")
|
||||
{
|
||||
// Another thing you may need to digital poke Alex about doing.
|
||||
|
||||
}
|
||||
else if (objListViewItem.Text == "Set Up The Microsoft Network") {
|
||||
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);
|
||||
}
|
||||
else if (objListViewItem.Text == "Inbox")
|
||||
{
|
||||
//wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error);
|
||||
}
|
||||
else if (objListViewItem.Text == "Online Services")
|
||||
{
|
||||
wm.StartInfobox95("Caught it!", "If you were to run this, the game would crash!\nLuckily, it won't crash this time!", InfoboxType.Error, InfoboxButtons.OK);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
break;
|
||||
case "My Computer":
|
||||
break;
|
||||
case "Recycle Bin":
|
||||
break;
|
||||
case "Setup MSN Internet Access":
|
||||
break;
|
||||
case "Outlook Express":
|
||||
break;
|
||||
case "My Network Places":
|
||||
break;
|
||||
case "My Documents":
|
||||
break;
|
||||
default:
|
||||
// It is an actual file on the disk
|
||||
|
||||
Win95WindowsExplorer we = new Win95WindowsExplorer();
|
||||
|
||||
// If it is a directory
|
||||
|
||||
if (Directory.Exists(objListViewItem.Tag.ToString()))
|
||||
{
|
||||
we.CurrentDirectory = objListViewItem.Tag.ToString();
|
||||
|
@ -323,9 +302,9 @@ private void desktopicons_DoubleClick(object sender, EventArgs e)
|
|||
else
|
||||
{
|
||||
// Just open the file...
|
||||
|
||||
we.OpenFile(objListViewItem.Tag.ToString());
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,62 +121,6 @@
|
|||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="ControlPanelToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PrintersToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TaskbarToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="FindToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="FilesOrFoldersToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ComputerToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="OnTheInternetToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PeopleToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="InternetConnectionWizardToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAALRJREFUOE+N
|
||||
|
@ -347,6 +291,62 @@
|
|||
wQAADsEBuJFr7QAAAJJJREFUOE+tkYEOgCAIRP10/tzk4FISZ7ZuuzDwnq4KJSL1aR/txc21llBfQVbh
|
||||
EZJZZ5C+nEoEcIN0QDyxLVGzm6WAsMYTvRSSAqaw2jRBloApbJUBhLVub4ABqwMY1poCuEYzhPWjRkgK
|
||||
6EP7A+obqOc2EzIBeELmtqNFDECI9R3gYmPhCPH+qX6HfAJAQ7iUCwlxft5LSoDNAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ControlPanelToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PrintersToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TaskbarToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="FindToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="FilesOrFoldersToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ComputerToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="OnTheInternetToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PeopleToolStripMenuItem.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw
|
||||
4AAABIQCQUtXaBsAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="clockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
|
|
Loading…
Reference in a new issue