diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-11-04 17:48:05 +0000 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-11-04 17:48:05 +0000 |
| commit | cc07981aa3603c74507c9ea0acb6dd0d8418d58e (patch) | |
| tree | 3a912bad67da226cc0f27e35f8bbd0f568d2f9fe /Histacom2/OS/Win95 | |
| parent | 4af08fc6e341a45158e23beb13be10aa1a6a3590 (diff) | |
| download | histacom2-cc07981aa3603c74507c9ea0acb6dd0d8418d58e.tar.gz histacom2-cc07981aa3603c74507c9ea0acb6dd0d8418d58e.tar.bz2 histacom2-cc07981aa3603c74507c9ea0acb6dd0d8418d58e.zip | |
Address Book can now save data!
Diffstat (limited to 'Histacom2/OS/Win95')
| -rw-r--r-- | Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index 4efdd6f..1ac4512 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -22,14 +22,12 @@ namespace Histacom2.OS.Win95.Win95Apps { public bool IsFileOpenDialog = false; public bool IsFileSaveDialog = false; - public string onlyViewExtension = ""; + public List<string> onlyViewExtension = new List<string>(); string ToReplaceWith = ProfileDirectory; public string CurrentDirectory = ProfileMyComputerDirectory; string OldLabelText; string CurrentCopyFile; - - int fileType = 6; //string attemptedDirectory = ""; WindowManager wm = new WindowManager(); @@ -89,7 +87,8 @@ namespace Histacom2.OS.Win95.Win95Apps Properties.Resources.TimeDistorter1, Properties.Resources.WinClassicGTN, Properties.Resources.WinClassicFTP, - Properties.Resources.WinClassicRtfFile}); //20 + Properties.Resources.WinClassicRtfFile, // 20 + Properties.Resources.WinClassicAddressBook}); program.BringToFront(); @@ -124,6 +123,9 @@ namespace Histacom2.OS.Win95.Win95Apps } onlyViewExtension = FileDialogBoxManager.OnlyViewExtension; + + foreach (string str in onlyViewExtension) + cmbType.Items.Add(str); } string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) { @@ -162,7 +164,7 @@ namespace Histacom2.OS.Win95.Win95Apps { if (!(Path.GetFileName(str) == "_data.info")) { - if (new FileInfo(str).Extension == onlyViewExtension) + if (onlyViewExtension.Contains(new FileInfo(str).Extension)) { itm = this.mainView.Items.Add(Path.GetFileName(str)); itm.Tag = str; @@ -232,8 +234,7 @@ namespace Histacom2.OS.Win95.Win95Apps { try { - ReturnType(new FileInfo(fileDir).Extension); - switch (fileType) + switch (ReturnType(new FileInfo(fileDir).Extension)) { case 1: WinClassicNotepad np = new WinClassicNotepad(); @@ -501,7 +502,7 @@ namespace Histacom2.OS.Win95.Win95Apps { // If it is a file if (IsFileOpenDialog || IsFileSaveDialog) { - if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) + if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension)) { Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text); } @@ -513,9 +514,7 @@ namespace Histacom2.OS.Win95.Win95Apps ((Form)this.TopLevelControl).Close(); } else - { OpenFile(mainView.FocusedItem.Tag.ToString()); - } } } catch { /* TODO: Illegal operation */ } } @@ -595,7 +594,7 @@ namespace Histacom2.OS.Win95.Win95Apps if (txtSave.Text == "") wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); else { - if (new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension == onlyViewExtension) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text); + if (onlyViewExtension.Contains(new FileInfo(Path.Combine(CurrentDirectory, txtSave.Text)).Extension)) Program.WindowsExplorerReturnPath = Path.Combine(CurrentDirectory, txtSave.Text); FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; |
