diff options
| author | lempamo <[email protected]> | 2017-08-05 08:29:30 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-05 08:29:30 -0400 |
| commit | 4084b7f6e83cdc52114b3b9e579d5d7f505174d1 (patch) | |
| tree | 59e6d4f7fdca70c6b196e0b074248869379349d7 /TimeHACK.Main/OS | |
| parent | 00308c81c9f85a4142d15ec1e6e35e58d4437cde (diff) | |
| download | histacom2-4084b7f6e83cdc52114b3b9e579d5d7f505174d1.tar.gz histacom2-4084b7f6e83cdc52114b3b9e579d5d7f505174d1.tar.bz2 histacom2-4084b7f6e83cdc52114b3b9e579d5d7f505174d1.zip | |
fixed not all icons showing
Diffstat (limited to 'TimeHACK.Main/OS')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 14 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs | 5 |
2 files changed, 11 insertions, 8 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index 3debce7..08cbf78 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -150,24 +150,24 @@ namespace TimeHACK.OS.Win95.Win95Apps itm = this.mainView.Items.Add(Path.GetFileName(str)); itm.Tag = str; } - else return; + else break; } - else return; - } else { + else break; + } + else { if (!(Path.GetFileName(str) == "_data.info")) { itm = this.mainView.Items.Add(Path.GetFileName(str)); itm.Tag = str; } - else return; + else break; } FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(CurrentDirectory, "_data.info"))); - foreach(var item in fsfi.Files) + foreach (var item in fsfi.Files) { Debug.Print(item.Name + " " + Path.GetFileName(str)); - if (item.Name == Path.GetFileName(str)) { itm.ImageIndex = item.FileIcon; return; } + if (item.Name == Path.GetFileName(str)) { itm.ImageIndex = item.FileIcon; break; } } - itm.ImageIndex = 8; } } catch (Exception ex) { //wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); add illegal operation dialog here later diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs index 3117d9c..581b789 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs @@ -110,10 +110,13 @@ namespace TimeHACK.OS.Win95.Win95Apps { ActivateSaveFileDialog(".txt"); string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath(); + List<string> pathList = selectedPath.Split('\\').ToList(); + pathList.RemoveAt(selectedPath.Split('\\').Count() - 1); if (selectedPath != "") { - File.WriteAllText(selectedPath, mainText.Text); + SaveSystem.CreateWindowsFile(pathList.ToString(), selectedPath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length); + //File.WriteAllText(selectedPath, mainText.Text); } } catch { } |
