diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-06-10 17:45:37 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-06-10 17:45:37 +0100 |
| commit | 1fbd9c1c76d95d14746925113fcaefa50104b1cd (patch) | |
| tree | ece7d1061406a7d32f1a4379af0678967ad9b2b3 /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs | |
| parent | 86fc00d98a24c660bf012b33e8d9e22cf584996f (diff) | |
| download | histacom2-1fbd9c1c76d95d14746925113fcaefa50104b1cd.tar.gz histacom2-1fbd9c1c76d95d14746925113fcaefa50104b1cd.tar.bz2 histacom2-1fbd9c1c76d95d14746925113fcaefa50104b1cd.zip | |
Fixed changes AShifter accidentaly made
Merge conflicts...
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 { + } } } } |
