diff options
| author | lempamo <[email protected]> | 2017-07-04 09:55:19 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-07-04 09:55:19 -0400 |
| commit | d6ea0813da443a0e6a56b24ed2019fb9fc384735 (patch) | |
| tree | 92aa22c09204390dbf50b3e9494dacea28dcac48 /TimeHACK.Main | |
| parent | 59c9e070258db893745f70862c4128b97a87c9fd (diff) | |
| download | histacom2-d6ea0813da443a0e6a56b24ed2019fb9fc384735.tar.gz histacom2-d6ea0813da443a0e6a56b24ed2019fb9fc384735.tar.bz2 histacom2-d6ea0813da443a0e6a56b24ed2019fb9fc384735.zip | |
Fixed TreeView in the not ALEXplorer
Diffstat (limited to 'TimeHACK.Main')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs | 29 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs | 84 | ||||
| -rw-r--r-- | TimeHACK.Main/Properties/Resources.Designer.cs | 60 | ||||
| -rw-r--r-- | TimeHACK.Main/Properties/Resources.resx | 18 | ||||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/Win95ComputerIcon.png | bin | 0 -> 157 bytes | |||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/Win95ControlPanelIcon.png | bin | 0 -> 170 bytes | |||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/Win95NetworkIcon.png | bin | 0 -> 181 bytes | |||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/Win95PrintersFolder.png | bin | 0 -> 164 bytes | |||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/Win95RecycleIcon.png | bin | 0 -> 174 bytes | |||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/WinClassicOpenFolderSmall.png | bin | 0 -> 155 bytes | |||
| -rw-r--r-- | TimeHACK.Main/TimeHACK.Main.csproj | 7 |
11 files changed, 150 insertions, 48 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs index df2bb36..11bb4d3 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs @@ -32,7 +32,6 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinClassicWindowsExplorer)); this.program = new System.Windows.Forms.Panel(); this.diskView = new System.Windows.Forms.TreeView(); - this.icons = new System.Windows.Forms.ImageList(this.components); this.MenuStrip1 = new System.Windows.Forms.MenuStrip(); this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -88,7 +87,6 @@ this.Label1 = new System.Windows.Forms.Label(); this.txtSave = new System.Windows.Forms.TextBox(); this.mainView = new System.Windows.Forms.ListView(); - this.iconsList = new System.Windows.Forms.ImageList(this.components); this.program.SuspendLayout(); this.MenuStrip1.SuspendLayout(); this.pnlSave.SuspendLayout(); @@ -113,7 +111,7 @@ // // diskView // - this.diskView.ImageList = this.icons; + this.diskView.ImageList = new System.Windows.Forms.ImageList(); this.diskView.Location = new System.Drawing.Point(3, 27); this.diskView.Name = "diskView"; this.diskView.Size = new System.Drawing.Size(213, 444); @@ -121,16 +119,6 @@ this.diskView.Visible = true; this.diskView.DoubleClick += new System.EventHandler(this.diskView_DoubleClick); // - // icons - // - this.icons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("icons.ImageStream"))); - this.icons.TransparentColor = System.Drawing.Color.Transparent; - this.icons.Images.SetKeyName(0, "nwnp32_1_SERVER_ICON.png"); - this.icons.Images.SetKeyName(1, "shell32_21.ico_16x16.png"); - this.icons.Images.SetKeyName(2, "blank-file-Windows95Icon.gif"); - this.icons.Images.SetKeyName(3, "WinClassicCalc.png"); - this.icons.Images.SetKeyName(4, "WinClassicComputer.png"); - // // MenuStrip1 // this.MenuStrip1.BackColor = System.Drawing.Color.Silver; @@ -546,27 +534,14 @@ this.mainView.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.mainView.LargeImageList = this.iconsList; this.mainView.Location = new System.Drawing.Point(215, 27); this.mainView.Name = "mainView"; this.mainView.Size = new System.Drawing.Size(486, 444); - this.mainView.SmallImageList = this.iconsList; - this.mainView.StateImageList = this.iconsList; this.mainView.TabIndex = 10; this.mainView.UseCompatibleStateImageBehavior = false; this.mainView.View = System.Windows.Forms.View.List; this.mainView.DoubleClick += new System.EventHandler(this.mainView_DoubleClick); // - // iconsList - // - this.iconsList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("iconsList.ImageStream"))); - this.iconsList.TransparentColor = System.Drawing.Color.Transparent; - this.iconsList.Images.SetKeyName(0, "nwnp32_1_SERVER_ICON.png"); - this.iconsList.Images.SetKeyName(1, "shell32_21.ico_16x16.png"); - this.iconsList.Images.SetKeyName(2, "blank-file-Windows95Icon.gif"); - this.iconsList.Images.SetKeyName(3, "WinClassicCalc.png"); - this.iconsList.Images.SetKeyName(4, "WinClassicComputer.png"); - // // WinClassicWindowsExplorer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -644,7 +619,5 @@ internal System.Windows.Forms.Button Button1; internal System.Windows.Forms.Label Label1; internal System.Windows.Forms.TextBox txtSave; - internal System.Windows.Forms.ImageList icons; - private System.Windows.Forms.ImageList iconsList; } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs index c4673ed..91b88f5 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs @@ -16,15 +16,15 @@ namespace TimeHACK.OS.Win95.Win95Apps { public partial class WinClassicWindowsExplorer : UserControl { - 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 = ""; + public bool IsFileOpenDialog = false; + public bool IsFileSaveDialog = false; + public string onlyViewExtension = ""; + + string ToReplaceWith = ProfileDirectory; + string currentDirectory = Path.Combine(ProfileDirectory, "folders/computer"); + string oldLabelText; + int fileType = 6; + string attemptedDirectory = ""; WindowManager wm = new WindowManager(); public WinClassicWindowsExplorer() @@ -72,10 +72,7 @@ namespace TimeHACK.OS.Win95.Win95Apps void RefreshAll() { try { // Refresh the right listview - icons.Images.Clear(); this.mainView.Items.Clear(); - 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 // diskView.Items.Add("", 0) @@ -139,8 +136,8 @@ namespace TimeHACK.OS.Win95.Win95Apps } } - String ReturnType(String extension) { - String returnVal = ""; + string ReturnType(string extension) { + string returnVal = ""; fileType = 1; switch (extension) { case ".txt": @@ -435,13 +432,40 @@ namespace TimeHACK.OS.Win95.Win95Apps // IsFileDialog = False //End Sub void WinClassicWindowsExplorer_Load(object sender, EventArgs e) { - - diskView.ImageList.Images[0] = Properties.Resources.Win95DesktopIcon; - diskView.ImageList.Images[1] = Properties.Resources.Win95HardDiskIcon; + diskView.ImageList.Images.Add(Properties.Resources.Win95DesktopIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95HardDiskIcon); + diskView.ImageList.Images.Add(Properties.Resources.WinClassicFolderSmall); + diskView.ImageList.Images.Add(Properties.Resources.WinClassicOpenFolderSmall); + diskView.ImageList.Images.Add(Properties.Resources.Win95ControlPanelIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95PrintersFolder); + diskView.ImageList.Images.Add(Properties.Resources.Win95ComputerIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95NetworkIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95RecycleIcon); program.BringToFront(); - TreeNode rootnode = new TreeNode("Desktop", 0, 0); - diskView.Nodes.Add(rootnode); - diskView.Nodes["Desktop"].Nodes.Add(new TreeNode("(C:)", 1, 1)); + int loc = 0; + TreeNode[] folders = new TreeNode[new DirectoryInfo(currentDirectory).GetDirectories().Length]; + foreach (DirectoryInfo folder in new DirectoryInfo(currentDirectory).GetDirectories()) + { + if (folder.GetDirectories().Length > 0) + { + TreeNode[] tn = createSubDirNodes(folder); + folders[loc] = new TreeNode(folder.Name, 2, 3, tn); + } + else + { + folders[loc] = new TreeNode(folder.Name, 2, 3); + } + loc++; + } + TreeNode[] mypcarray = new TreeNode[3]; + mypcarray[0] = new TreeNode("(C:)", 1, 1, folders); + mypcarray[1] = new TreeNode("Control Panel", 4, 4); + mypcarray[2] = new TreeNode("Printers", 5, 5); + TreeNode[] desktoparray = new TreeNode[3]; + desktoparray[0] = new TreeNode("My Computer", 6, 6, mypcarray); + desktoparray[1] = new TreeNode("Network Neighborhood", 7, 7); + desktoparray[2] = new TreeNode("Recycle Bin", 8, 8); + diskView.Nodes.Add(new TreeNode("Desktop", 0, 0, desktoparray)); //diskView.Items.Add("My Computer", 0); Application.DoEvents(); RefreshAll(); @@ -631,5 +655,25 @@ namespace TimeHACK.OS.Win95.Win95Apps } RefreshAll(); } + + private TreeNode[] createSubDirNodes(DirectoryInfo folder) + { + TreeNode[] toReturn = new TreeNode[folder.GetDirectories().Length]; + int loc = 0; + foreach (DirectoryInfo fold in folder.GetDirectories()) + { + if (fold.GetDirectories().Length > 0) + { + TreeNode[] tn = createSubDirNodes(fold); + toReturn[loc] = new TreeNode(fold.Name, 2, 3, tn); + } + else + { + toReturn[loc] = new TreeNode(fold.Name, 2, 3); + } + loc++; + } + return toReturn; + } } } diff --git a/TimeHACK.Main/Properties/Resources.Designer.cs b/TimeHACK.Main/Properties/Resources.Designer.cs index 934b958..a4836d8 100644 --- a/TimeHACK.Main/Properties/Resources.Designer.cs +++ b/TimeHACK.Main/Properties/Resources.Designer.cs @@ -437,6 +437,26 @@ namespace TimeHACK.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap Win95ComputerIcon { + get { + object obj = ResourceManager.GetObject("Win95ComputerIcon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap Win95ControlPanelIcon { + get { + object obj = ResourceManager.GetObject("Win95ControlPanelIcon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap Win95DesktopIcon { get { object obj = ResourceManager.GetObject("Win95DesktopIcon", resourceCulture); @@ -517,6 +537,36 @@ namespace TimeHACK.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap Win95NetworkIcon { + get { + object obj = ResourceManager.GetObject("Win95NetworkIcon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap Win95PrintersFolder { + get { + object obj = ResourceManager.GetObject("Win95PrintersFolder", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap Win95RecycleIcon { + get { + object obj = ResourceManager.GetObject("Win95RecycleIcon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap Win95SideBar { get { object obj = ResourceManager.GetObject("Win95SideBar", resourceCulture); @@ -796,6 +846,16 @@ namespace TimeHACK.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap WinClassicOpenFolderSmall { + get { + object obj = ResourceManager.GetObject("WinClassicOpenFolderSmall", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap WinClassicOutlook { get { object obj = ResourceManager.GetObject("WinClassicOutlook", resourceCulture); diff --git a/TimeHACK.Main/Properties/Resources.resx b/TimeHACK.Main/Properties/Resources.resx index 9e55366..b591188 100644 --- a/TimeHACK.Main/Properties/Resources.resx +++ b/TimeHACK.Main/Properties/Resources.resx @@ -540,4 +540,22 @@ <data name="Win95HardDiskIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\WinClassic\Win95HardDiskIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Win95ComputerIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\Win95ComputerIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Win95ControlPanelIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\Win95ControlPanelIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Win95NetworkIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\Win95NetworkIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Win95PrintersFolder" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\Win95PrintersFolder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Win95RecycleIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\Win95RecycleIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinClassicOpenFolderSmall" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\WinClassicOpenFolderSmall.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root>
\ No newline at end of file diff --git a/TimeHACK.Main/Resources/WinClassic/Win95ComputerIcon.png b/TimeHACK.Main/Resources/WinClassic/Win95ComputerIcon.png Binary files differnew file mode 100644 index 0000000..fe350d1 --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/Win95ComputerIcon.png diff --git a/TimeHACK.Main/Resources/WinClassic/Win95ControlPanelIcon.png b/TimeHACK.Main/Resources/WinClassic/Win95ControlPanelIcon.png Binary files differnew file mode 100644 index 0000000..80db1fd --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/Win95ControlPanelIcon.png diff --git a/TimeHACK.Main/Resources/WinClassic/Win95NetworkIcon.png b/TimeHACK.Main/Resources/WinClassic/Win95NetworkIcon.png Binary files differnew file mode 100644 index 0000000..cf19aec --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/Win95NetworkIcon.png diff --git a/TimeHACK.Main/Resources/WinClassic/Win95PrintersFolder.png b/TimeHACK.Main/Resources/WinClassic/Win95PrintersFolder.png Binary files differnew file mode 100644 index 0000000..7f4fa2e --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/Win95PrintersFolder.png diff --git a/TimeHACK.Main/Resources/WinClassic/Win95RecycleIcon.png b/TimeHACK.Main/Resources/WinClassic/Win95RecycleIcon.png Binary files differnew file mode 100644 index 0000000..6c295ea --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/Win95RecycleIcon.png diff --git a/TimeHACK.Main/Resources/WinClassic/WinClassicOpenFolderSmall.png b/TimeHACK.Main/Resources/WinClassic/WinClassicOpenFolderSmall.png Binary files differnew file mode 100644 index 0000000..2a63e19 --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/WinClassicOpenFolderSmall.png diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index 32a7a00..46f08f6 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -293,6 +293,7 @@ </EmbeddedResource> <EmbeddedResource Include="OS\Win95\Win95Apps\WinClassicWindowsExplorer.resx"> <DependentUpon>WinClassicWindowsExplorer.cs</DependentUpon> + <SubType>Designer</SubType> </EmbeddedResource> <EmbeddedResource Include="OS\Win95\Win95SaveAs.resx"> <DependentUpon>Win95SaveAs.cs</DependentUpon> @@ -439,6 +440,11 @@ <None Include="Resources\WinClassic\Win95IconNotepad.png" /> <None Include="Resources\WinClassic\Win95DesktopIcon.png" /> <None Include="Resources\WinClassic\Win95HardDiskIcon.png" /> + <None Include="Resources\WinClassic\Win95ControlPanelIcon.png" /> + <None Include="Resources\WinClassic\Win95PrintersFolder.png" /> + <None Include="Resources\WinClassic\Win95ComputerIcon.png" /> + <None Include="Resources\WinClassic\Win95NetworkIcon.png" /> + <None Include="Resources\WinClassic\Win95RecycleIcon.png" /> <Content Include="Resources\WinClassic\Win95SideBar.png" /> <Content Include="Resources\WinClassic\Win95Start.wav" /> <None Include="Resources\WinClassic\Win95Warning.png" /> @@ -462,6 +468,7 @@ <Content Include="Resources\WinClassic\WinClassicNetworking.png" /> <None Include="Resources\WinClassic\WinClassicNotepad.png" /> <None Include="Resources\WinClassic\WinClassicNew.png" /> + <None Include="Resources\WinClassic\WinClassicOpenFolderSmall.png" /> <Content Include="Resources\WinClassic\WinClassicOutlook.png" /> <None Include="Resources\WinClassic\WinClassicPaste.png" /> <Content Include="Resources\WinClassic\WinClassicProgramItem.png" /> |
