From 3d46bd0c2ea1239d7677612de767ae6f4181e5a3 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Tue, 31 Oct 2017 13:12:23 -0500 Subject: [PATCH] save form data if we have changed it. --- EduNetworkBuilder/TranslationWindow.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/EduNetworkBuilder/TranslationWindow.cs b/EduNetworkBuilder/TranslationWindow.cs index 98eaee4..4e0127b 100644 --- a/EduNetworkBuilder/TranslationWindow.cs +++ b/EduNetworkBuilder/TranslationWindow.cs @@ -25,6 +25,7 @@ namespace EduNetworkBuilder string FormChosenDir = ""; List TranslationResxFiles = new List(); string EnglishTargetFile = "edustrings.resx"; + bool ChangedFormData = false; public TranslationWindow(Network ToEdit) @@ -128,6 +129,12 @@ namespace EduNetworkBuilder //Console.WriteLine("Saved"); lblStatus.Text = NB.Translate("_Saved"); } + if(ChangedFormData) + { + foreach (TranslationResxFile one in TranslationResxFiles) + one.Save(); + ChangedFormData = false; + } } private void TranslationWindow_KeyDown(object sender, KeyEventArgs e)