diff options
| author | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
| commit | 3306d36ecbc024775972e5cf7971b2a7a70671d0 (patch) | |
| tree | 0a79e67b6723a8c75ffd66c7828bdd0ebb1bf74d /Histacom2.Engine/FileDialogBoxManager.cs | |
| parent | 99fef5c57360f07259fc86f433bed8a9ab59c48e (diff) | |
| download | histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.gz histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.bz2 histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.zip | |
Renaming the game!
Diffstat (limited to 'Histacom2.Engine/FileDialogBoxManager.cs')
| -rw-r--r-- | Histacom2.Engine/FileDialogBoxManager.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Histacom2.Engine/FileDialogBoxManager.cs b/Histacom2.Engine/FileDialogBoxManager.cs new file mode 100644 index 0000000..a862bc7 --- /dev/null +++ b/Histacom2.Engine/FileDialogBoxManager.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Histacom2.Engine +{ + public static class FileDialogBoxManager + { + public static bool IsInOpenDialog = false; + public static bool IsInSaveDialog = false; + public static string OnlyViewExtension = ""; + public static void ActivateOpenFileDialog(string ExtensionToView) + { + IsInOpenDialog = true; + IsInSaveDialog = false; + OnlyViewExtension = ExtensionToView; + } + + public static void ActivateSaveFileDialog(string ExtensionToView) + { + IsInOpenDialog = false; + IsInSaveDialog = true; + OnlyViewExtension = ExtensionToView; + } + + public static string ReadTextFile(string path) + { + try + { + return File.ReadAllText(path); + } catch { + return ""; + } + } + } +} |
