aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/FileDialogBoxManager.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-05-24 21:42:48 +0100
committerAlex-TIMEHACK <[email protected]>2017-05-24 21:42:48 +0100
commitac576c05905b55a5059dab672c1882f01fc074d0 (patch)
treea2053e6184289ec00133dc075c3a32fdd4f0fe01 /TimeHACK.Engine/FileDialogBoxManager.cs
parent832660987c5afb2f559fee7870e0de5eb325748f (diff)
downloadhistacom2-ac576c05905b55a5059dab672c1882f01fc074d0.tar.gz
histacom2-ac576c05905b55a5059dab672c1882f01fc074d0.tar.bz2
histacom2-ac576c05905b55a5059dab672c1882f01fc074d0.zip
Kind of done my File Explorer...
IT'S NOT FINISHED!!!!!!!!
Diffstat (limited to 'TimeHACK.Engine/FileDialogBoxManager.cs')
-rw-r--r--TimeHACK.Engine/FileDialogBoxManager.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/TimeHACK.Engine/FileDialogBoxManager.cs b/TimeHACK.Engine/FileDialogBoxManager.cs
new file mode 100644
index 0000000..334ebdd
--- /dev/null
+++ b/TimeHACK.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 TimeHACK.Engine
+{
+ public static class FileDialogBoxManager
+ {
+ public static Boolean IsInOpenDialog = false;
+ public static Boolean 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 "";
+ }
+ }
+ }
+}