aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-06-10 17:13:53 +0100
committerGitHub <[email protected]>2017-06-10 17:13:53 +0100
commit819f8021522c27988c2b84ccc217db008cc593da (patch)
treebe0ff6c1fc3c57626e97b4fd9256c29d510c8fbb /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
parent801ac36d5691a8a20ef4ea63a701f6157982e53e (diff)
parente4db9cc77abc4cc79c25a6c489183f58276428e8 (diff)
downloadhistacom2-819f8021522c27988c2b84ccc217db008cc593da.tar.gz
histacom2-819f8021522c27988c2b84ccc217db008cc593da.tar.bz2
histacom2-819f8021522c27988c2b84ccc217db008cc593da.zip
Merge pull request #84 from Alex-TIMEHACK/master
Even more tweaks to the explorer and stuff
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs32
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 {
+ }
}
}
}