diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-06-10 12:24:38 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-06-10 12:24:38 +0100 |
| commit | 801ac36d5691a8a20ef4ea63a701f6157982e53e (patch) | |
| tree | 4ed1f7005fb5a9149078f4a0d9953cffce058b2c /TimeHACK.Main/OS | |
| parent | 9f7790cef9e9f08c46d12d374e8733254d56eaf0 (diff) | |
| parent | 316b7739bd1f2e19ba67d7fd6302b8ec0c8fa75a (diff) | |
| download | histacom2-801ac36d5691a8a20ef4ea63a701f6157982e53e.tar.gz histacom2-801ac36d5691a8a20ef4ea63a701f6157982e53e.tar.bz2 histacom2-801ac36d5691a8a20ef4ea63a701f6157982e53e.zip | |
Merge pull request #83 from Alex-TIMEHACK/master
A lot of stuff done
Diffstat (limited to 'TimeHACK.Main/OS')
6 files changed, 64 insertions, 22 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs index aafe999..c71d633 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(155, 22); + this.FolderToolStripMenuItem.Size = new System.Drawing.Size(154, 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(155, 22); + this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.ShortcutToolStripMenuItem.Text = "Shortcut"; // // TextDocumentToolStripMenuItem // this.TextDocumentToolStripMenuItem.Name = "TextDocumentToolStripMenuItem"; - this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.TextDocumentToolStripMenuItem.Text = "Text Document"; // // BitmapImageToolStripMenuItem // this.BitmapImageToolStripMenuItem.Name = "BitmapImageToolStripMenuItem"; - this.BitmapImageToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.BitmapImageToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.BitmapImageToolStripMenuItem.Text = "Bitmap Image"; // // DeleteToolStripMenuItem @@ -229,6 +229,7 @@ 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 // @@ -413,7 +414,7 @@ this.DisconnectNetworkDriveToolStripMenuItem, this.GoToToolStripMenuItem}); this.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem"; - this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20); + this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); this.ToolsToolStripMenuItem.Text = "Tools"; // // FindToolStripMenuItem @@ -598,6 +599,7 @@ 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 @@ -618,7 +620,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(461, 417); + this.pnlHidden.Size = new System.Drawing.Size(692, 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 e8f97a0..44002fd 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs @@ -19,8 +19,10 @@ 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(); @@ -427,6 +429,7 @@ 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(); @@ -565,7 +568,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { try { - if (!File.Exists(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); } @@ -586,11 +589,48 @@ 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 8e25a32..ecbc974 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 - CQAAAk1TRnQBSQFMAgEBAwEAASgBAAEoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CQAAAk1TRnQBSQFMAgEBAwEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -181,7 +181,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD8 - CQAAAk1TRnQBSQFMAgEBAwEAARABAAEQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CQAAAk1TRnQBSQFMAgEBAwEAASABAAEgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/TimeHACK.Main/OS/Win98/Win98.Designer.cs b/TimeHACK.Main/OS/Win98/Win98.Designer.cs index 484c931..255a97a 100644 --- a/TimeHACK.Main/OS/Win98/Win98.Designer.cs +++ b/TimeHACK.Main/OS/Win98/Win98.Designer.cs @@ -1,6 +1,6 @@ namespace TimeHACK.OS.Win98 { - partial class Win98 + partial class Windows98 { /// <summary> /// Required designer variable. @@ -28,7 +28,7 @@ /// </summary> private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Win98)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Windows98)); System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("My Computer", 0); System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Network Neighborhood", 5); System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Inbox", 3); @@ -116,9 +116,9 @@ // this.taskbar.BackColor = System.Drawing.Color.Silver; this.taskbar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("taskbar.BackgroundImage"))); + this.taskbar.Controls.Add(this.startbutton); this.taskbar.Controls.Add(this.clockPanel); this.taskbar.Controls.Add(this.taskbarItems); - this.taskbar.Controls.Add(this.startbutton); this.taskbar.Dock = System.Windows.Forms.DockStyle.Bottom; this.taskbar.Location = new System.Drawing.Point(0, 452); this.taskbar.Name = "taskbar"; @@ -148,11 +148,14 @@ // // taskbarItems // + this.taskbarItems.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.taskbarItems.BackColor = System.Drawing.Color.Transparent; this.taskbarItems.Cursor = System.Windows.Forms.Cursors.Default; - this.taskbarItems.Location = new System.Drawing.Point(63, 4); + this.taskbarItems.Location = new System.Drawing.Point(69, 4); this.taskbarItems.Name = "taskbarItems"; - this.taskbarItems.Size = new System.Drawing.Size(3648, 22); + this.taskbarItems.Size = new System.Drawing.Size(500, 22); this.taskbarItems.TabIndex = 5; // // startbutton @@ -909,7 +912,7 @@ this.desktopicons.TabIndex = 7; this.desktopicons.UseCompatibleStateImageBehavior = false; // - // Win98 + // Windows98 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -919,7 +922,7 @@ this.Controls.Add(this.startmenu); this.Controls.Add(this.desktopicons); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Win98"; + this.Name = "Windows98"; this.Text = "Win98"; this.taskbar.ResumeLayout(false); this.clockPanel.ResumeLayout(false); diff --git a/TimeHACK.Main/OS/Win98/Win98.cs b/TimeHACK.Main/OS/Win98/Win98.cs index b3b5f99..f4f78de 100644 --- a/TimeHACK.Main/OS/Win98/Win98.cs +++ b/TimeHACK.Main/OS/Win98/Win98.cs @@ -10,9 +10,9 @@ using System.Windows.Forms; namespace TimeHACK.OS.Win98 { - public partial class Win98 : Form + public partial class Windows98 : Form { - public Win98() + public Windows98() { InitializeComponent(); } diff --git a/TimeHACK.Main/OS/Win98/Win98.resx b/TimeHACK.Main/OS/Win98/Win98.resx index 10f3284..ae0c3b7 100644 --- a/TimeHACK.Main/OS/Win98/Win98.resx +++ b/TimeHACK.Main/OS/Win98/Win98.resx @@ -138,9 +138,6 @@ <metadata name="startmenuitems.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <metadata name="startmenuitems.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> <data name="InternetConnectionWizardToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAALRJREFUOE+N |
