Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' add success text
Browse files Browse the repository at this point in the history
# Conflicts:
#	tabler/Forms/GridUI.Designer.cs
#	tabler/Forms/GridUI.resx
#	tabler/Properties/AssemblyInfo.cs
  • Loading branch information
kh-jda committed Jul 22, 2016
2 parents 1cb896c + 18c017a commit d88afbc
Show file tree
Hide file tree
Showing 8 changed files with 304 additions and 283 deletions.
30 changes: 20 additions & 10 deletions tabler/Classes/TranslationManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using OfficeOpenXml;
using tabler.Classes;


namespace tabler {
public class TranslationManager {
Expand Down Expand Up @@ -81,23 +84,30 @@ public void ConvertExcelToXml(DirectoryInfo lastPathToDataFiles) {
SaveModInfosToXml(lastPathToDataFiles, lstModInfos);
}

private static void SaveModInfosToXml(DirectoryInfo lastPathToDataFiles, List<ModInfoContainer> lstModInfos) {
//if going through mods instead of files,
// we could create files
// too tired :D -> TODO
List<FileInfo> filesByNameInDirectory = FileSystemHelper.GetFilesByNameInDirectory(lastPathToDataFiles, STRINGTABLE_NAME, SearchOption.AllDirectories);
private static bool SaveModInfosToXml(DirectoryInfo lastPathToDataFiles, List<ModInfoContainer> lstModInfos) {
try {
//if going through mods instead of files,
// we could create files
// too tired :D -> TODO
List<FileInfo> filesByNameInDirectory = FileSystemHelper.GetFilesByNameInDirectory(lastPathToDataFiles, STRINGTABLE_NAME, SearchOption.AllDirectories);

var xh = new XmlHelper();
xh.UpdateXmlFiles(filesByNameInDirectory, lstModInfos);
} catch (Exception e) {
Logger.Log(e.Message);
return false;
}

var xh = new XmlHelper();
xh.UpdateXmlFiles(filesByNameInDirectory, lstModInfos);
return true;
}


public TranslationComponents GetGridData(DirectoryInfo lastPathToDataFiles) {
return GetTranslationComponents(lastPathToDataFiles, false);
}

public void SaveGridData(DirectoryInfo lastPathToDataFiles, List<ModInfoContainer> lstModInfos) {
SaveModInfosToXml(lastPathToDataFiles, lstModInfos);
public bool SaveGridData(DirectoryInfo lastPathToDataFiles, List<ModInfoContainer> lstModInfos) {
return SaveModInfosToXml(lastPathToDataFiles, lstModInfos);
}
}
}
385 changes: 191 additions & 194 deletions tabler/Forms/AboutBox.resx

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion tabler/Forms/GridUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ private void openModFolderToolStripMenuItem_Click(object sender, EventArgs e) {
private void saveToolStripMenuItem_Click(object sender, EventArgs e) {
var lstModInfos = _gridUiHelper.ParseAllTables();

TranslationManager.SaveGridData(ConfigHelper.GetLastPathOfDataFiles(), lstModInfos);
var success = TranslationManager.SaveGridData(ConfigHelper.GetLastPathOfDataFiles(), lstModInfos);

if (success) {
Logger.Log(Resources.GridUI_saveToolStripMenuItem_Click_Successfully_saved);
}
}

private void tabControl1_Selected(object sender, TabControlEventArgs e) {
Expand Down
150 changes: 72 additions & 78 deletions tabler/Forms/GridUI.resx

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions tabler/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tabler/Properties/Resources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@ Eintrag: '{2}'</value>
<data name="GridUI_No_stringtable_xml_files_found" xml:space="preserve">
<value>Keine 'stringtable.xml'-Dateien gefunden.</value>
</data>
<data name="GridUI_saveToolStripMenuItem_Click_Successfully_saved" xml:space="preserve">
<value>Erfolgreich gespeichert</value>
</data>
</root>
3 changes: 3 additions & 0 deletions tabler/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,7 @@ Entry: '{2}'</value>
<data name="GridUI_CheckForNewVersion_Download_the_new_version_at" xml:space="preserve">
<value>Download the new version at</value>
</data>
<data name="GridUI_saveToolStripMenuItem_Click_Successfully_saved" xml:space="preserve">
<value>Successfully saved.</value>
</data>
</root>
1 change: 1 addition & 0 deletions tabler/tabler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Icon-32.png" />
<Content Include="Content\Icon-256.png" />
<Content Include="Content\Icon-48.png" />
<Content Include="icon.ico" />
</ItemGroup>
Expand Down

0 comments on commit d88afbc

Please sign in to comment.