aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-06-10 17:30:00 +0100
committerAlex-TIMEHACK <[email protected]>2017-06-10 17:30:00 +0100
commit86fc00d98a24c660bf012b33e8d9e22cf584996f (patch)
treebb7d314dc0da2833f36fc44f5bd3b6a96a692c77 /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
parente4db9cc77abc4cc79c25a6c489183f58276428e8 (diff)
parent22b7ec620f8708c0f922e3883b82b01431b5ef05 (diff)
downloadhistacom2-86fc00d98a24c660bf012b33e8d9e22cf584996f.tar.gz
histacom2-86fc00d98a24c660bf012b33e8d9e22cf584996f.tar.bz2
histacom2-86fc00d98a24c660bf012b33e8d9e22cf584996f.zip
Merge remote-tracking branch 'refs/remotes/TimeHACKDevs/master'
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs32
1 files changed, 4 insertions, 28 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
index 6dd6ee8..e08e6ec 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
@@ -88,38 +88,14 @@ namespace TimeHACK.OS.Win95.Win95Apps
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
- try
- {
- ActivateSaveFileDialog(".txt");
- String selectedPath;
- selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
-
- MessageBox.Show(selectedPath);
- if (selectedPath != "")
- {
- mainText.Text = ReadTextFile(selectedPath);
- }
- }
- catch
- {
- }
+ ActivateOpenFileDialog(".txt");
+ mainText.Text = ReadTextFile(Program.OpenFileExplorerAsDialogAndReturnGivenPath());
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
- try
- {
- ActivateSaveFileDialog(".txt");
- String selectedPath;
- selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
-
- MessageBox.Show(selectedPath);
- if (selectedPath != "")
- {
- File.WriteAllText(selectedPath, mainText.Text);
- }
- } catch {
- }
+ ActivateSaveFileDialog(".txt");
+ File.WriteAllText(Program.OpenFileExplorerAsDialogAndReturnGivenPath(), mainText.Text);
}
}
}