diff options
| author | lempamo <[email protected]> | 2018-02-21 23:37:38 -0500 |
|---|---|---|
| committer | lempamo <[email protected]> | 2018-02-21 23:37:38 -0500 |
| commit | 6e993159ddb07803a564e4db911d66c97c45ea40 (patch) | |
| tree | f38584f270bda540d84255828f4e524878a35958 | |
| parent | 74892c42ac9afb987b68cc0f17c8fd16e027bc89 (diff) | |
| download | histacom2-6e993159ddb07803a564e4db911d66c97c45ea40.tar.gz histacom2-6e993159ddb07803a564e4db911d66c97c45ea40.tar.bz2 histacom2-6e993159ddb07803a564e4db911d66c97c45ea40.zip | |
switch-case is a thing, alex. fucking use it
| -rw-r--r-- | Histacom2/OS/Win95/Win95.cs | 111 | ||||
| -rw-r--r-- | Histacom2/OS/WinME/WinME.Designer.cs | 3 | ||||
| -rw-r--r-- | Histacom2/OS/WinME/WinME.cs | 99 | ||||
| -rw-r--r-- | Histacom2/OS/WinME/WinME.resx | 112 |
4 files changed, 147 insertions, 178 deletions
diff --git a/Histacom2/OS/Win95/Win95.cs b/Histacom2/OS/Win95/Win95.cs index 0e2ac3b..ad828ba 100644 --- a/Histacom2/OS/Win95/Win95.cs +++ b/Histacom2/OS/Win95/Win95.cs @@ -264,69 +264,60 @@ namespace Histacom2.OS.Win95 objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y); if (objListViewItem != null) { - if (objListViewItem.Text == "Internet Explorer") + switch (objListViewItem.Text) { - 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 - { - // 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(); - - WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); - app.BringToFront(); + 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 - { - // Just open the file... + 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(); + break; + case "Network Neighborhood": + // Alex's TODO here + break; + case "Recycle Bin": + // Another thing you may need to digital poke Alex about doing. + break; + case "Set Up The Microsoft Network": + wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", InfoboxType.Info, InfoboxButtons.OK); + break; + case "Outlook Express": + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + break; + case "Inbox": + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + 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); + break; + default: + // It is an actual file on the disk + Win95WindowsExplorer wwe = new Win95WindowsExplorer(); + + // If it is a directory + if (Directory.Exists(objListViewItem.Tag.ToString())) + { + wwe.CurrentDirectory = objListViewItem.Tag.ToString(); - we.OpenFile(objListViewItem.Tag.ToString()); - } + 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(); + } + else + { + // Just open the file... + wwe.OpenFile(objListViewItem.Tag.ToString()); + } + break; } } diff --git a/Histacom2/OS/WinME/WinME.Designer.cs b/Histacom2/OS/WinME/WinME.Designer.cs index 1e5cfef..7ef6b54 100644 --- a/Histacom2/OS/WinME/WinME.Designer.cs +++ b/Histacom2/OS/WinME/WinME.Designer.cs @@ -947,12 +947,11 @@ namespace Histacom2.OS.WinME // // 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; // diff --git a/Histacom2/OS/WinME/WinME.cs b/Histacom2/OS/WinME/WinME.cs index 493df52..1470902 100644 --- a/Histacom2/OS/WinME/WinME.cs +++ b/Histacom2/OS/WinME/WinME.cs @@ -263,69 +263,48 @@ namespace Histacom2.OS.WinME objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y); if (objListViewItem != null) { - if (objListViewItem.Text == "Internet Explorer") + switch (objListViewItem.Text) { - 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 - { - // 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(); - - WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); - app.BringToFront(); + 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 - { - // Just open the file... + 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(); - we.OpenFile(objListViewItem.Tag.ToString()); - } + WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); + app.BringToFront(); + startmenu.Hide(); + } + else + { + // Just open the file... + we.OpenFile(objListViewItem.Tag.ToString()); + } + break; } } diff --git a/Histacom2/OS/WinME/WinME.resx b/Histacom2/OS/WinME/WinME.resx index de219fa..85bd4ab 100644 --- a/Histacom2/OS/WinME/WinME.resx +++ b/Histacom2/OS/WinME/WinME.resx @@ -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 @@ -349,6 +293,62 @@ 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"> <value>153, 17</value> </metadata> |
