aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-04 00:15:01 -0400
committerlempamo <[email protected]>2017-07-04 00:15:01 -0400
commit59c9e070258db893745f70862c4128b97a87c9fd (patch)
tree7faf146028a29f1ad5336ea6373407e78409400f /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
parent34ecd67921e7205bf9f7e271458bde6d325d2753 (diff)
downloadhistacom2-59c9e070258db893745f70862c4128b97a87c9fd.tar.gz
histacom2-59c9e070258db893745f70862c4128b97a87c9fd.tar.bz2
histacom2-59c9e070258db893745f70862c4128b97a87c9fd.zip
some work on fixing up windows explorer
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs61
1 files changed, 13 insertions, 48 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
index 89a6b6f..c4673ed 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs
@@ -48,21 +48,6 @@ namespace TimeHACK.OS.Win95.Win95Apps
//' Next
//'End Sub
- void CheckLbl() {
- try
- {
- dirLbl.Text = dirLbl.Text.Replace(GameDirectory, "");
- dirLbl.Text = dirLbl.Text.Replace("\\TimeHACK\\", "");
- dirLbl.Text = dirLbl.Text.Replace(ProfileDirectory, "");
- dirLbl.Text = dirLbl.Text.Replace("\\Profiles\\" + ProfileName + "\\", "");
- dirLbl.Text = dirLbl.Text.Replace("folders", "My Computer");
- //dirLbl.Text = dirLbl.Text.Substring(7, dirLbl.Text.Length - 7);
- } catch
- {
-
- }
- }
-
String ReadDataFile(String reqDirectory, Boolean returnYesIfProtected = false) {
String Val = "";
String directoryFileInfo;
@@ -89,7 +74,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
// Refresh the right listview
icons.Images.Clear();
this.mainView.Items.Clear();
- diskView.SmallImageList = icons;
+ diskView.ImageList = icons;
this.mainView.LargeImageList = icons;
// For Each drive As String In My.Computer.FileSystem.GetDirectories(GameMain.MyDocuments & "\HistacomVB\" & GameMain.SaveProfile & "\HistacomVB\Folders")
// If GetPropetiesForDir(drive)(4) = "isMyDocuments" Then
@@ -148,8 +133,6 @@ namespace TimeHACK.OS.Win95.Win95Apps
}
}
}
- dirLbl.Text = currentDirectory;
- CheckLbl();
} catch (Exception ex) {
wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info);
((Form)this.TopLevelControl).Close();
@@ -453,13 +436,14 @@ namespace TimeHACK.OS.Win95.Win95Apps
//End Sub
void WinClassicWindowsExplorer_Load(object sender, EventArgs e) {
- //icons.Images.Add(Properties.Resources.WinClassicFolder);
- //icons.Images.Add(Properties.Resources.WinClassicComputer);
+ diskView.ImageList.Images[0] = Properties.Resources.Win95DesktopIcon;
+ diskView.ImageList.Images[1] = Properties.Resources.Win95HardDiskIcon;
program.BringToFront();
- dirLbl.Text = "folders";
- diskView.Items.Add("My Computer", 0);
+ TreeNode rootnode = new TreeNode("Desktop", 0, 0);
+ diskView.Nodes.Add(rootnode);
+ diskView.Nodes["Desktop"].Nodes.Add(new TreeNode("(C:)", 1, 1));
+ //diskView.Items.Add("My Computer", 0);
Application.DoEvents();
- CheckLbl();
RefreshAll();
if (FileDialogBoxManager.IsInOpenDialog)
{
@@ -510,8 +494,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
try
{
- if (diskView.FocusedItem.Text == "My Computer") {
-
+ if (diskView.SelectedNode.Text == "My Computer") {
GoToDir(ProfileFileSystemDirectory);
}
@@ -519,30 +502,12 @@ namespace TimeHACK.OS.Win95.Win95Apps
}
}
- void btnGo_Click(object sender, EventArgs e)
+ void GoToDir(string dir)
{
- GoToDir(ProfileDirectory + "\\" + dirLbl.Text.Replace("My Computer", "folders"));
- }
-
- void GoToDir(String dir, Boolean GoneThoughHidden = false)
- {
- if (ReadDataFile(dir, true) == "yes" && (GoneThoughHidden == false)) {
- attemptedDirectory = dir;
- mainView.Hide();
- pnlHidden.BringToFront();
- pnlHidden.Show();
- } else {
- pnlHidden.Hide();
- mainView.Show();
- mainView.BringToFront();
- currentDirectory = dir;
- RefreshAll();
- }
- }
-
- private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
- {
- GoToDir(attemptedDirectory, true);
+ mainView.Show();
+ mainView.BringToFront();
+ currentDirectory = dir;
+ RefreshAll();
}
private void FolderToolStripMenuItem_Click(object sender, EventArgs e)