diff options
| author | AShifter <[email protected]> | 2017-06-10 09:58:07 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-06-10 09:58:07 -0700 |
| commit | 1d1d8286e76751f29b354ef9d5f0ddfa455b3bd7 (patch) | |
| tree | 5a945ec6d1e2e565ffb0f5c67bb963846f04f26e /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs | |
| parent | d9b6009e4909508bfb880b9f61e9e0f81d5ffa8b (diff) | |
| parent | ec8361de2a221cdb405df7c9400461e41785e12b (diff) | |
| download | histacom2-1d1d8286e76751f29b354ef9d5f0ddfa455b3bd7.tar.gz histacom2-1d1d8286e76751f29b354ef9d5f0ddfa455b3bd7.tar.bz2 histacom2-1d1d8286e76751f29b354ef9d5f0ddfa455b3bd7.zip | |
Merge pull request #85 from Alex-TIMEHACK/master
Added my changes back!
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs index e08e6ec..6dd6ee8 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs @@ -88,14 +88,38 @@ namespace TimeHACK.OS.Win95.Win95Apps private void openToolStripMenuItem_Click(object sender, EventArgs e) { - ActivateOpenFileDialog(".txt"); - mainText.Text = ReadTextFile(Program.OpenFileExplorerAsDialogAndReturnGivenPath()); + try + { + ActivateSaveFileDialog(".txt"); + String selectedPath; + selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath(); + + MessageBox.Show(selectedPath); + if (selectedPath != "") + { + mainText.Text = ReadTextFile(selectedPath); + } + } + catch + { + } } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { - ActivateSaveFileDialog(".txt"); - File.WriteAllText(Program.OpenFileExplorerAsDialogAndReturnGivenPath(), mainText.Text); + try + { + ActivateSaveFileDialog(".txt"); + String selectedPath; + selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath(); + + MessageBox.Show(selectedPath); + if (selectedPath != "") + { + File.WriteAllText(selectedPath, mainText.Text); + } + } catch { + } } } } |
