diff options
| author | AShifter <[email protected]> | 2017-08-29 12:34:00 -0600 |
|---|---|---|
| committer | AShifter <[email protected]> | 2017-08-29 12:34:00 -0600 |
| commit | b1689dea36e46933280bfcc0d186746dd6210c0f (patch) | |
| tree | 3644ac63218378082e0afa90d4c42d73d6d3980c /Histacom2.Engine/FileDialogBoxManager.cs | |
| parent | f8e657ddbaf3654f102676a0b51e424c005218c3 (diff) | |
| parent | d4d94f85a6424e4d21cecccec21b0e78860431d6 (diff) | |
| download | histacom2-b1689dea36e46933280bfcc0d186746dd6210c0f.tar.gz histacom2-b1689dea36e46933280bfcc0d186746dd6210c0f.tar.bz2 histacom2-b1689dea36e46933280bfcc0d186746dd6210c0f.zip | |
Merge remote-tracking branch 'refs/remotes/Histacom2-Devs/master'
Diffstat (limited to 'Histacom2.Engine/FileDialogBoxManager.cs')
| -rw-r--r-- | Histacom2.Engine/FileDialogBoxManager.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Histacom2.Engine/FileDialogBoxManager.cs b/Histacom2.Engine/FileDialogBoxManager.cs index a862bc7..161c393 100644 --- a/Histacom2.Engine/FileDialogBoxManager.cs +++ b/Histacom2.Engine/FileDialogBoxManager.cs @@ -13,6 +13,7 @@ namespace Histacom2.Engine public static bool IsInOpenDialog = false; public static bool IsInSaveDialog = false; public static string OnlyViewExtension = ""; + public static void ActivateOpenFileDialog(string ExtensionToView) { IsInOpenDialog = true; @@ -36,5 +37,19 @@ namespace Histacom2.Engine return ""; } } + + public static void SaveRtfDocument(RichTextBox tbox, string path) + { + int fileBytes = 0; + tbox.SaveFile(path); + fileBytes = File.ReadAllText(path).Length; + + THFileInfo info = new THFileInfo(); + info.Name = Path.GetFileName(path); + info.FileIcon = 20; + info.ByteSize = fileBytes; + SaveSystem.CurrentSave.BytesLeft -= fileBytes; + SaveSystem.UpdateDirectoryInfo(new FileInfo(path).Directory.FullName, info); + } } } |
