├── .editorconfig ├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── README.md ├── README_RU.md ├── tabler.Logic ├── Classes │ ├── Container.cs │ ├── IChangeable.cs │ ├── Key.cs │ ├── LanguageStatistics.cs │ ├── ModInfoContainer.cs │ ├── Package.cs │ ├── Project.cs │ ├── ReleaseVersion.cs │ ├── Settings.cs │ ├── Stringtable.cs │ └── TranslationComponents.cs ├── Enums │ └── Languages.cs ├── Exceptions │ ├── DuplicateKeyException.cs │ ├── GenericXmlException.cs │ └── MalformedStringtableException.cs ├── Extensions │ └── EnumUtils.cs ├── Helper │ ├── ConfigHelper.cs │ ├── FileHelper.cs │ ├── FileSystemHelper.cs │ ├── GithubVersionHelper.cs │ ├── StringtableHelper.cs │ └── TranslationHelper.cs ├── Properties │ └── AssemblyInfo.cs ├── packages.config ├── tabler.Logic.csproj └── xml │ └── stringtable.xsd ├── tabler.sln └── tabler ├── App.config ├── Classes ├── CellEditHistory.cs ├── Extensions.cs └── Logger.cs ├── Content ├── Icon-16.png ├── Icon-16.psd ├── Icon-256.png ├── Icon-256.psd ├── Icon-32.png ├── Icon-32.psd ├── Icon-48.png └── Icon-48.psd ├── Forms ├── About.Designer.cs ├── About.cs ├── About.de.resx ├── About.resx ├── About.ru.resx ├── AboutBox.Designer.cs ├── AboutBox.cs ├── AboutBox.de.resx ├── AboutBox.resx ├── AboutBox.ru.resx ├── AddLanguage.Designer.cs ├── AddLanguage.cs ├── AddLanguage.de.resx ├── AddLanguage.resx ├── AddLanguage.ru.resx ├── FindForm.Designer.cs ├── FindForm.cs ├── FindForm.de.resx ├── FindForm.resx ├── GridUI.Designer.cs ├── GridUI.cs ├── GridUI.de.resx ├── GridUI.resx ├── GridUI.ru.resx ├── OverlayForm.cs ├── RemoveLanguage.Designer.cs ├── RemoveLanguage.cs ├── RemoveLanguage.de.resx ├── RemoveLanguage.resx ├── SettingsForm.Designer.cs ├── SettingsForm.cs ├── SettingsForm.de.resx ├── SettingsForm.resx ├── SettingsForm.ru.resx ├── TabSelector.Designer.cs ├── TabSelector.cs ├── TabSelector.resx ├── TranslationProgress.Designer.cs ├── TranslationProgress.cs ├── TranslationProgress.de.resx ├── TranslationProgress.resx ├── TranslationProgress.ru.resx ├── WaitingForm.Designer.cs ├── WaitingForm.cs └── WaitingForm.resx ├── Helper ├── GitHubHelper.cs └── GridUiHelper.cs ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.de.resx ├── Resources.resx ├── Resources.ru.resx ├── Settings.Designer.cs ├── Settings.settings └── app.manifest ├── data └── stringtable.xml ├── icon.ico ├── packages.config ├── tabler.csproj └── tabler.csproj.DotSettings /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = crlf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: bux 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 4 |

5 |

Arma 3 Translation Helper

6 |

7 | 8 | BIF Thread 10 | 11 | 12 | Version 14 | 15 | 16 | Issues 18 | 19 | 20 | License 22 | 23 |

24 |

25 | tabler provides easier translation handling for Arma 3 missions and mods. 26 |

27 |

28 | Parse all the stringtable.xml files in every subfolder, edit them and then parse them back with one click of a button. There's no need anymore to open every localization file one by one. 29 |

30 |

Features

31 | 37 | 38 | ### Open a mod project 39 | 40 | ![Opening a mod project](https://cloud.githubusercontent.com/assets/1235520/24458018/0d9a825e-1498-11e7-980d-6e895d3cacd9.gif) 41 | 42 | ### Perform changes 43 | 44 | ![Perform changes](https://cloud.githubusercontent.com/assets/1235520/24458101/3eed2596-1498-11e7-9959-162da6d0c15e.gif) 45 | 46 | ### Track progress 47 | 48 | ![Track progress](https://cloud.githubusercontent.com/assets/1235520/24458135/5685f494-1498-11e7-8ce9-413c4a7a7569.gif) 49 | 50 | ### Settings 51 | 52 | ![Settings](https://cloud.githubusercontent.com/assets/1235520/24458174/7659991a-1498-11e7-8df1-4c8e3707311f.gif) 53 | -------------------------------------------------------------------------------- /README_RU.md: -------------------------------------------------------------------------------- 1 |

2 | 4 |

5 |

Arma 3 Помошник Перевода

6 |

7 | 8 | BIF Тема 10 | 11 | 12 | Версия 14 | 15 | 16 | Задачи 18 | 19 | 20 | Лицензия 22 | 23 |

24 |

25 | tabler упрощает и делает более доступным процесс локализации Arma 3 миссий и модов. 26 |

27 |

28 | Позволяет легко загрузить все имеющиеся в определённой директории (и её подпапках) файлы stringtable.xml, отредактировать их через общий интерфейс и одной кнопкой сохранить все изменения, с автоматическим штампом даты изменения во всех файлах. Таким образом, Вам больше не придется вручную редактировать каждый файл переводов по отдельности, при этом переживая о целостности структуры XML формата. 29 |

30 |

Функции

31 | 37 | 41 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/Container.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Xml.Serialization; 3 | 4 | namespace tabler.Logic.Classes { 5 | public class Container { 6 | 7 | [XmlAttribute("name")] 8 | public string Name { get; set; } 9 | 10 | [XmlElement("Key")] 11 | public List Keys { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/IChangeable.cs: -------------------------------------------------------------------------------- 1 | namespace tabler.Logic.Classes 2 | { 3 | public interface IChangeable 4 | { 5 | bool HasChanges { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/Key.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace tabler.Logic.Classes { 4 | public class Key { 5 | 6 | [XmlAttribute("ID")] 7 | public string Id { get; set; } 8 | 9 | public string Original { get; set; } 10 | 11 | public string English { get; set; } 12 | 13 | public string German { get; set; } 14 | 15 | public string French { get; set; } 16 | 17 | public string Italian { get; set; } 18 | 19 | public string Spanish { get; set; } 20 | 21 | public string Portuguese { get; set; } 22 | 23 | public string Polish { get; set; } 24 | 25 | public string Czech { get; set; } 26 | 27 | public string Hungarian { get; set; } 28 | 29 | public string Russian { get; set; } 30 | 31 | public string Turkish { get; set; } 32 | 33 | public string Japanese { get; set; } 34 | 35 | public string Chinesesimp { get; set; } 36 | 37 | public string Chinese { get; set; } 38 | 39 | public string Korean { get; set; } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/LanguageStatistics.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace tabler.Logic.Classes 4 | { 5 | public class LanguageStatistics 6 | { 7 | public string LanguageName { get; set; } 8 | public Dictionary MissingModStrings { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/ModInfoContainer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | 4 | namespace tabler.Logic.Classes 5 | { 6 | public class ModInfoContainer 7 | { 8 | //Values(ID)(LANGUAGE) 9 | public Dictionary> Values = new Dictionary>(); 10 | 11 | public string Name { get; set; } 12 | public FileInfo FileInfoStringTable { get; set; } 13 | public bool FileHasBom { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/Package.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Xml.Serialization; 3 | 4 | namespace tabler.Logic.Classes { 5 | public class Package { 6 | 7 | [XmlAttribute("name")] 8 | public string Name { get; set; } 9 | 10 | [XmlElement("Container")] 11 | public List Containers { get; set; } 12 | 13 | [XmlElement("Key")] 14 | public List Keys { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/Project.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Xml.Serialization; 3 | 4 | namespace tabler.Logic.Classes { 5 | 6 | [XmlRoot("Project")] 7 | public class Project { 8 | 9 | [XmlAttribute("name")] 10 | public string Name { get; set; } 11 | 12 | [XmlElement("Package")] 13 | public List Packages { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/ReleaseVersion.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace tabler.Logic.Classes 4 | { 5 | public class ReleaseVersion 6 | { 7 | public string Version { get; set; } 8 | public string HtmlUrl { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace tabler.Logic.Classes 2 | { 3 | public class Settings 4 | { 5 | public Settings() 6 | { 7 | // defaults 8 | IndentationSettings = IndentationSettings.Spaces; 9 | TabSize = 4; 10 | } 11 | 12 | public IndentationSettings IndentationSettings { get; set; } 13 | 14 | public int TabSize { get; set; } 15 | } 16 | 17 | public enum IndentationSettings 18 | { 19 | Spaces = 0, 20 | Tabs = 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/Stringtable.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | 5 | namespace tabler.Logic.Classes 6 | { 7 | public class Stringtable 8 | { 9 | 10 | public string Name { get; set; } 11 | 12 | public FileInfo File { get; set; } 13 | 14 | public Project Project { get; set; } 15 | 16 | public bool HasChanges { get; set; } 17 | 18 | public bool FileHasBom { get; set; } 19 | 20 | public IEnumerable AllKeys => Project?.Packages?.SelectMany(p => 21 | { 22 | var keys = new List(); 23 | 24 | if (p.Containers.Any()) 25 | { 26 | keys.AddRange(p.Containers.SelectMany(c => c.Keys)); 27 | } 28 | 29 | keys.AddRange(p.Keys); 30 | 31 | return keys; 32 | }); 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tabler.Logic/Classes/TranslationComponents.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace tabler.Logic.Classes 6 | { 7 | public class TranslationComponents 8 | { 9 | private List _statistics; 10 | 11 | public List Headers { get; set; } 12 | 13 | public IEnumerable Stringtables { get; set; } 14 | 15 | public List Statistics 16 | { 17 | get 18 | { 19 | if (_statistics == null) 20 | { 21 | _statistics = new List(); 22 | } 23 | 24 | return _statistics; 25 | } 26 | set => _statistics = value; 27 | } 28 | 29 | public int KeyCount 30 | { 31 | get 32 | { 33 | return Stringtables.Sum(stringtable => stringtable.AllKeys.Count()); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tabler.Logic/Enums/Languages.cs: -------------------------------------------------------------------------------- 1 | namespace tabler.Logic.Enums { 2 | public enum Languages { 3 | Original, 4 | English, 5 | German, 6 | French, 7 | Italian, 8 | Spanish, 9 | Portuguese, 10 | Polish, 11 | Czech, 12 | Hungarian, 13 | Russian, 14 | Japanese, 15 | Chinesesimp, 16 | Chinese, 17 | Korean, 18 | Turkish 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tabler.Logic/Exceptions/DuplicateKeyException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace tabler.Logic.Exceptions 4 | { 5 | public class DuplicateKeyException : Exception 6 | { 7 | public DuplicateKeyException(string keyName) 8 | { 9 | KeyName = keyName; 10 | } 11 | 12 | public DuplicateKeyException(string keyName, string fileName) 13 | { 14 | KeyName = keyName; 15 | FileName = fileName; 16 | } 17 | 18 | public DuplicateKeyException(string keyName, string fileName, string entryName) 19 | { 20 | KeyName = keyName; 21 | FileName = fileName; 22 | EntryName = entryName; 23 | } 24 | 25 | public string KeyName { get; set; } 26 | public string FileName { get; set; } 27 | public string EntryName { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tabler.Logic/Exceptions/GenericXmlException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace tabler.Logic.Exceptions 4 | { 5 | public class GenericXmlException : Exception 6 | { 7 | public GenericXmlException(string keyName) 8 | { 9 | KeyName = keyName; 10 | } 11 | 12 | public GenericXmlException(string keyName, string fileName) 13 | { 14 | KeyName = keyName; 15 | FileName = fileName; 16 | } 17 | 18 | public GenericXmlException(string keyName, string fileName, string entryName) 19 | { 20 | KeyName = keyName; 21 | FileName = fileName; 22 | EntryName = entryName; 23 | } 24 | 25 | public string KeyName { get; set; } 26 | public string FileName { get; set; } 27 | public string EntryName { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tabler.Logic/Exceptions/MalformedStringtableException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace tabler.Logic.Exceptions { 4 | public class MalformedStringtableException : Exception { 5 | public string FileName { get; set; } 6 | 7 | public new string Message { get; set; } 8 | 9 | public MalformedStringtableException(string fileName, string message) { 10 | FileName = fileName; 11 | Message = message; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tabler.Logic/Extensions/EnumUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace tabler.Logic.Extensions 5 | { 6 | public static class EnumUtils 7 | { 8 | public static IEnumerable GetValues() 9 | { 10 | return (T[])Enum.GetValues(typeof(T)); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tabler.Logic/Helper/ConfigHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Xml; 6 | using System.Xml.Linq; 7 | using tabler.Logic.Classes; 8 | 9 | namespace tabler.Logic.Helper 10 | { 11 | public class ConfigHelper 12 | { 13 | private const string LASTPATHTODATAFILES_NAME = "LastPathToDataFiles"; 14 | private const string INDENTATION_NAME = "Indentation"; 15 | private const string TABSIZE_NAME = "TabSize"; 16 | private const string EMPTYNODES_NAME = "RemoveEmptyNodes"; 17 | 18 | private readonly FileInfo _fiConfig = new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"config\config.xml")); 19 | private XDocument _xDocConfig; 20 | 21 | public ConfigHelper() 22 | { 23 | //create dir 24 | if (_fiConfig.Directory != null && _fiConfig.Directory.Exists == false) 25 | { 26 | _fiConfig.Directory.Create(); 27 | } 28 | } 29 | 30 | 31 | private XDocument CreateOrLoadConfig(bool forceCreation) 32 | { 33 | if (_xDocConfig != null && forceCreation == false) 34 | { 35 | return _xDocConfig; 36 | } 37 | 38 | if (_fiConfig.Exists && forceCreation == false) 39 | { 40 | _xDocConfig = XDocument.Load(_fiConfig.FullName); 41 | } 42 | else 43 | { 44 | var path = new XElement(LASTPATHTODATAFILES_NAME); 45 | var indent = new XElement(INDENTATION_NAME, 0); 46 | var tabsize = new XElement(TABSIZE_NAME, 4); 47 | var removeEmptyNodes = new XElement(EMPTYNODES_NAME, true); 48 | 49 | var lstElements = new List {path, indent, tabsize, removeEmptyNodes}; 50 | 51 | _xDocConfig = new XDocument( 52 | new XDeclaration("1.0", "utf-8", "yes"), 53 | new XComment("Config file"), 54 | new XElement("config", lstElements.ToArray())); 55 | 56 | SaveConfigXml(); 57 | 58 | return _xDocConfig; 59 | } 60 | 61 | return null; 62 | } 63 | 64 | public void SetLastPathOfDataFiles(DirectoryInfo path) 65 | { 66 | if (path == null || path.Exists == false) 67 | { 68 | return; 69 | } 70 | 71 | if (_xDocConfig == null) 72 | { 73 | CreateOrLoadConfig(false); 74 | } 75 | 76 | 77 | if (_xDocConfig != null) 78 | { 79 | var pathElement = _xDocConfig.Descendants().FirstOrDefault(d => d.Name == LASTPATHTODATAFILES_NAME); 80 | 81 | if (pathElement != null) 82 | { 83 | pathElement.Value = XmlConvert.EncodeName(path.FullName); 84 | } 85 | } 86 | 87 | SaveConfigXml(); 88 | } 89 | 90 | public DirectoryInfo GetLastPathOfDataFiles() 91 | { 92 | if (_xDocConfig == null) 93 | { 94 | CreateOrLoadConfig(false); 95 | } 96 | 97 | 98 | if (_xDocConfig != null) 99 | { 100 | var pathElement = _xDocConfig.Descendants().FirstOrDefault(d => d.Name == LASTPATHTODATAFILES_NAME); 101 | 102 | if (pathElement != null) 103 | { 104 | var value = XmlConvert.DecodeName(pathElement.Value); 105 | if (string.IsNullOrEmpty(value) == false) 106 | { 107 | return new DirectoryInfo(value); 108 | } 109 | } 110 | else 111 | { 112 | CreateOrLoadConfig(true); 113 | } 114 | } 115 | 116 | return null; 117 | } 118 | 119 | /// 120 | /// Saves the xml to the file system 121 | /// 122 | private void SaveConfigXml() 123 | { 124 | if (_xDocConfig != null) 125 | { 126 | _xDocConfig.Save(_fiConfig.FullName); 127 | } 128 | } 129 | 130 | /// 131 | /// Read Settings from config file 132 | /// 133 | /// 134 | public Settings GetSettings() 135 | { 136 | if (_xDocConfig == null) 137 | { 138 | CreateOrLoadConfig(false); 139 | } 140 | 141 | if (_xDocConfig == null) 142 | { 143 | return null; 144 | } 145 | 146 | var loadedSettings = new Settings(); 147 | 148 | var indentElement = _xDocConfig.Descendants().FirstOrDefault(d => d.Name == INDENTATION_NAME); 149 | if (indentElement != null) 150 | { 151 | try 152 | { 153 | loadedSettings.IndentationSettings = (IndentationSettings) Enum.Parse(typeof(IndentationSettings), indentElement.Value); 154 | } 155 | catch (Exception) 156 | { 157 | // in case of error, use the better method 158 | loadedSettings.IndentationSettings = IndentationSettings.Spaces; 159 | } 160 | } 161 | 162 | var tabSizeElement = _xDocConfig.Descendants().FirstOrDefault(d => d.Name == TABSIZE_NAME); 163 | if (tabSizeElement != null) 164 | { 165 | loadedSettings.TabSize = int.Parse(tabSizeElement.Value); 166 | } 167 | 168 | return loadedSettings; 169 | } 170 | 171 | /// 172 | /// Read Settings from config file 173 | /// 174 | /// 175 | public bool SaveSettings(Settings settingsToSave) 176 | { 177 | if (settingsToSave == null) 178 | { 179 | return false; 180 | } 181 | 182 | if (_xDocConfig == null) 183 | { 184 | CreateOrLoadConfig(false); 185 | } 186 | 187 | if (_xDocConfig != null) 188 | { 189 | var indentElement = _xDocConfig.Descendants().FirstOrDefault(d => d.Name == INDENTATION_NAME); 190 | if (indentElement != null) 191 | { 192 | indentElement.Value = settingsToSave.IndentationSettings.ToString(); 193 | } 194 | else 195 | { 196 | CreateOrLoadConfig(true); 197 | } 198 | 199 | var tabSizeElement = _xDocConfig.Descendants().FirstOrDefault(d => d.Name == TABSIZE_NAME); 200 | if (tabSizeElement != null) 201 | { 202 | tabSizeElement.Value = settingsToSave.TabSize.ToString(); 203 | } 204 | else 205 | { 206 | CreateOrLoadConfig(true); 207 | } 208 | 209 | SaveConfigXml(); 210 | return true; 211 | } 212 | 213 | return false; 214 | } 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /tabler.Logic/Helper/FileHelper.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Linq; 3 | using System.Text; 4 | 5 | namespace tabler.Logic.Helper 6 | { 7 | public static class FileHelper 8 | { 9 | public static bool FileHasBom(Stream stream) 10 | { 11 | using (var ms = new MemoryStream()) 12 | { 13 | stream.CopyTo(ms); 14 | var bytes = ms.ToArray(); 15 | 16 | // be nice and reset position 17 | stream.Position = 0; 18 | 19 | var enc = new UTF8Encoding(true); 20 | var preamble = enc.GetPreamble(); 21 | return preamble.Where((p, i) => p == bytes[i]).Any(); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tabler.Logic/Helper/FileSystemHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | 5 | namespace tabler.Logic.Helper 6 | { 7 | public class FileSystemHelper 8 | { 9 | public static List GetFilesByNameInDirectory(DirectoryInfo di, string fileName, SearchOption searchOption) 10 | { 11 | var allStringTablePaths = di.GetFiles(fileName, searchOption).ToList(); 12 | return allStringTablePaths; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tabler.Logic/Helper/GithubVersionHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Octokit; 4 | using tabler.Logic.Classes; 5 | 6 | namespace tabler.Logic.Helper 7 | { 8 | public class GitHubVersionHelper 9 | { 10 | public ReleaseVersion CheckForNewVersion(string productVersion) 11 | { 12 | var github = new GitHubClient(new ProductHeaderValue("tabler")); 13 | var releases = github.Repository.Release.GetAll("bux", "tabler").Result; 14 | 15 | var newerRelease = releases.Where(x => x.PublishedAt.HasValue && new Version(x.TagName.Replace("v", "")) > new Version(productVersion)).OrderByDescending(x => x.PublishedAt).FirstOrDefault(); 16 | 17 | if (newerRelease == null) 18 | { 19 | return null; 20 | } 21 | 22 | return new ReleaseVersion 23 | { 24 | Version = newerRelease.Name, 25 | HtmlUrl = newerRelease.HtmlUrl 26 | }; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tabler.Logic/Helper/StringtableHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Xml; 8 | using System.Xml.Serialization; 9 | using tabler.Logic.Classes; 10 | using tabler.Logic.Exceptions; 11 | 12 | namespace tabler.Logic.Helper 13 | { 14 | public class StringtableHelper 15 | { 16 | private XmlReaderSettings _xmlReaderSettings; 17 | 18 | public XmlReaderSettings XmlReaderSettings 19 | { 20 | get { 21 | if (_xmlReaderSettings == null) 22 | { 23 | var settings = new XmlReaderSettings 24 | { 25 | ValidationType = ValidationType.Schema, 26 | DtdProcessing = DtdProcessing.Parse //it did not allow to parse on my machine, so i had to enable this 27 | }; 28 | settings.Schemas.Add(null, "xml\\stringtable.xsd"); 29 | _xmlReaderSettings = settings; 30 | } 31 | return _xmlReaderSettings; 32 | } 33 | } 34 | 35 | /// 36 | /// 37 | /// 38 | /// 39 | public IEnumerable ParseStringtables(IEnumerable allStringtableFiles) 40 | { 41 | var stringtables = new System.Collections.Concurrent.ConcurrentBag(); 42 | Parallel.ForEach(allStringtableFiles, currentFile => 43 | { 44 | var stringtable = ParseXmlFile(currentFile); 45 | ValidateStringtable(stringtable); 46 | stringtables.Add(stringtable); 47 | }); 48 | 49 | return stringtables.ToList(); 50 | } 51 | 52 | /// 53 | /// 54 | /// 55 | /// 56 | /// 57 | private Stringtable ParseXmlFile(FileInfo fileInfo) 58 | { 59 | var stringtable = new Stringtable 60 | { 61 | File = fileInfo, 62 | Name = fileInfo.Directory.Name 63 | }; 64 | 65 | try 66 | { 67 | var ser = new XmlSerializer(typeof(Project)); 68 | 69 | using (var sr = new StreamReader(fileInfo.FullName)) 70 | { 71 | stringtable.FileHasBom = FileHelper.FileHasBom(sr.BaseStream); 72 | 73 | using (var reader = XmlReader.Create(sr.BaseStream, XmlReaderSettings)) 74 | { 75 | stringtable.Project = (Project) ser.Deserialize(reader); 76 | } 77 | } 78 | } 79 | catch (XmlException ex) 80 | { 81 | throw new GenericXmlException("", fileInfo.FullName, ex.Message); 82 | } 83 | catch (InvalidOperationException ex) 84 | { 85 | var message = new StringBuilder(); 86 | message.Append(ex.Message); 87 | if (ex.InnerException != null) 88 | { 89 | message.AppendLine().Append(ex.InnerException.Message); 90 | } 91 | 92 | throw new MalformedStringtableException(fileInfo.FullName, message.ToString()); 93 | } 94 | 95 | return stringtable; 96 | } 97 | 98 | /// 99 | /// 100 | /// 101 | /// 102 | private void ValidateStringtable(Stringtable stringtable) 103 | { 104 | var duplicates = stringtable.AllKeys.GroupBy(k => k.Id).Where(g => g.Skip(1).Any()).ToList(); 105 | if (duplicates.Any()) 106 | { 107 | var keys = duplicates.Select(g => g.Key).Distinct().ToList(); 108 | var keyNames = string.Join(", ", keys); 109 | throw new DuplicateKeyException(keyNames, stringtable.File.FullName, keyNames); 110 | } 111 | } 112 | 113 | /// 114 | /// 115 | /// 116 | /// 117 | /// 118 | public void SaveStringtableFiles(List filesByNameInDirectory, IEnumerable lstStringtables) 119 | { 120 | var configHelper = new ConfigHelper(); 121 | var settings = configHelper.GetSettings(); 122 | 123 | var dummyNamespace = new XmlSerializerNamespaces(); 124 | dummyNamespace.Add("",""); 125 | 126 | Parallel.ForEach(filesByNameInDirectory, currentFileInfo => 127 | { 128 | var currentStringtable = lstStringtables.FirstOrDefault(x => string.Equals(x.Name.ToLowerInvariant(), currentFileInfo.Directory.Name.ToLowerInvariant(), StringComparison.OrdinalIgnoreCase)); 129 | 130 | if (currentStringtable == null) 131 | { 132 | return; 133 | } 134 | 135 | if (!currentStringtable.HasChanges) 136 | { 137 | return; 138 | } 139 | 140 | 141 | var xmlSettings = new XmlWriterSettings 142 | { 143 | Indent = true, 144 | IndentChars = " ", 145 | Encoding = new UTF8Encoding(currentStringtable.FileHasBom) 146 | }; 147 | 148 | if (settings != null) 149 | { 150 | if (settings.IndentationSettings == IndentationSettings.Spaces) 151 | { 152 | var indentChars = ""; 153 | 154 | for (var i = 0; i < settings.TabSize; i++) 155 | { 156 | indentChars += " "; 157 | } 158 | 159 | xmlSettings.IndentChars = indentChars; 160 | } 161 | 162 | if (settings.IndentationSettings == IndentationSettings.Tabs) 163 | { 164 | xmlSettings.IndentChars = "\t"; 165 | } 166 | 167 | // TODO Remove empty nodes 168 | 169 | } 170 | 171 | var xmlSerializer = new XmlSerializer(typeof(Project)); 172 | using (var writer = XmlWriter.Create(currentFileInfo.FullName, xmlSettings)) 173 | { 174 | xmlSerializer.Serialize(writer, currentStringtable.Project,dummyNamespace); 175 | } 176 | 177 | File.AppendAllText(currentFileInfo.FullName, Environment.NewLine); 178 | 179 | currentStringtable.HasChanges = false; 180 | }); 181 | } 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /tabler.Logic/Helper/TranslationHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Reflection; 5 | using tabler.Logic.Classes; 6 | using tabler.Logic.Enums; 7 | 8 | namespace tabler.Logic.Helper 9 | { 10 | public class TranslationHelper 11 | { 12 | public const string COLUMN_MODNAME = "Mod"; 13 | public const string COLUMN_IDNAME = "ID"; 14 | public const string STRINGTABLE_NAME = "stringtable.xml"; 15 | 16 | private readonly FileInfo _fiExcelFile; 17 | public TranslationComponents TranslationComponents; 18 | 19 | 20 | private List PrepareHeaders(IEnumerable stringtables) 21 | { 22 | 23 | var headers = new List(); 24 | // Get list of all used languages 25 | var allKeys = stringtables.SelectMany(s => s.Project.Packages).SelectMany(p => 26 | { 27 | var keys = new List(); 28 | 29 | if (p.Containers.Any()) 30 | { 31 | keys.AddRange(p.Containers.SelectMany(c => c.Keys)); 32 | } 33 | 34 | keys.AddRange(p.Keys); 35 | 36 | return keys; 37 | }); 38 | 39 | var keyPropertyInfos = typeof(Key).GetProperties(BindingFlags.Public | BindingFlags.Instance); 40 | foreach (var key in allKeys) 41 | { 42 | foreach (var property in keyPropertyInfos) 43 | { 44 | if (property.Name.ToLowerInvariant() == COLUMN_IDNAME.ToLowerInvariant() || headers.Contains(property.Name)) 45 | { 46 | continue; 47 | } 48 | 49 | var value = property.GetValue(key, null)?.ToString(); 50 | if (value != null && !string.IsNullOrEmpty(value)) 51 | { 52 | headers.Add(property.Name); 53 | } 54 | } 55 | } 56 | 57 | headers = headers.OrderBy(l => l).ToList(); 58 | 59 | var hasOriginal = false; 60 | 61 | if (headers.Any(x => x.ToLowerInvariant() == Languages.Original.ToString().ToLowerInvariant())) 62 | { 63 | hasOriginal = true; 64 | headers.Remove(Languages.Original.ToString()); 65 | headers.Insert(0, Languages.Original.ToString()); 66 | } 67 | 68 | if (headers.Any(x => x.ToLowerInvariant() == Languages.English.ToString().ToLowerInvariant())) 69 | { 70 | headers.Remove(Languages.English.ToString()); 71 | headers.Insert(hasOriginal ? 1 : 0, Languages.English.ToString()); 72 | } 73 | 74 | headers.Insert(0, COLUMN_IDNAME); 75 | 76 | return headers; 77 | } 78 | 79 | 80 | private TranslationComponents GetTranslationComponents(DirectoryInfo lastPathToDataFiles) 81 | { 82 | var allStringtableFiles = FileSystemHelper.GetFilesByNameInDirectory(lastPathToDataFiles, STRINGTABLE_NAME, SearchOption.AllDirectories).ToList(); 83 | 84 | if (allStringtableFiles.Any() == false) 85 | { 86 | return null; 87 | } 88 | 89 | var sh = new StringtableHelper(); 90 | var transComp = new TranslationComponents 91 | { 92 | Stringtables = sh.ParseStringtables(allStringtableFiles) 93 | }; 94 | 95 | transComp.Headers = PrepareHeaders(transComp.Stringtables); 96 | 97 | TranslationComponents = transComp; 98 | return TranslationComponents; 99 | } 100 | 101 | 102 | private static bool SaveModInfosToXml(DirectoryInfo lastPathToDataFiles, IEnumerable lstStringtables) 103 | { 104 | //if going through mods instead of files, 105 | // we could create files 106 | // too tired :D -> TODO 107 | var filesByNameInDirectory = FileSystemHelper.GetFilesByNameInDirectory(lastPathToDataFiles, STRINGTABLE_NAME, SearchOption.AllDirectories); 108 | 109 | var sh = new StringtableHelper(); 110 | sh.SaveStringtableFiles(filesByNameInDirectory, lstStringtables); 111 | 112 | return true; 113 | } 114 | 115 | 116 | public TranslationComponents GetGridData(DirectoryInfo lastPathToDataFiles) 117 | { 118 | return GetTranslationComponents(lastPathToDataFiles); 119 | } 120 | 121 | //public bool SaveGridData(DirectoryInfo lastPathToDataFiles, List lstModInfos) 122 | //{ 123 | // return SaveModInfosToXml(lastPathToDataFiles, lstModInfos); 124 | //} 125 | 126 | public bool SaveGridData(DirectoryInfo lastPathToDataFiles, IEnumerable lstStringtables) 127 | { 128 | return SaveModInfosToXml(lastPathToDataFiles, lstStringtables); 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /tabler.Logic/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("tabler logic")] 8 | [assembly: AssemblyDescription("Arma 3 Translation Helper")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("https://github.com/bux/tabler/")] 11 | [assembly: AssemblyProduct("tabler")] 12 | [assembly: AssemblyCopyright("© Copyright MaMilaCan, bux")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("651801fa-f7ae-4f9b-9a7c-2ddea5965440")] 23 | 24 | // http://semver.org/ 25 | // Version information for an assembly consists of the following values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Patch 30 | 31 | [assembly: AssemblyVersion("1.0.0")] 32 | [assembly: AssemblyFileVersion("1.0.0")] 33 | -------------------------------------------------------------------------------- /tabler.Logic/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tabler.Logic/tabler.Logic.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {651801FA-F7AE-4F9B-9A7C-2DDEA5965440} 8 | Library 9 | Properties 10 | tabler.Logic 11 | tabler.Logic 12 | v4.7.2 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | none 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | ..\packages\Octokit.0.32.0\lib\net45\Octokit.dll 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | Designer 75 | Always 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /tabler.Logic/xml/stringtable.xsd: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /tabler.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2042 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tabler", "tabler\tabler.csproj", "{FE0D5379-28A9-47F8-86F5-19100816A8D9}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B6A3E567-73A0-4218-81FE-A752B47C73B4}" 9 | ProjectSection(SolutionItems) = preProject 10 | .editorconfig = .editorconfig 11 | EndProjectSection 12 | EndProject 13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tabler.Logic", "tabler.Logic\tabler.Logic.csproj", "{651801FA-F7AE-4F9B-9A7C-2DDEA5965440}" 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {FE0D5379-28A9-47F8-86F5-19100816A8D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {FE0D5379-28A9-47F8-86F5-19100816A8D9}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {FE0D5379-28A9-47F8-86F5-19100816A8D9}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {FE0D5379-28A9-47F8-86F5-19100816A8D9}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {651801FA-F7AE-4F9B-9A7C-2DDEA5965440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {651801FA-F7AE-4F9B-9A7C-2DDEA5965440}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {651801FA-F7AE-4F9B-9A7C-2DDEA5965440}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {651801FA-F7AE-4F9B-9A7C-2DDEA5965440}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {7FC39EB7-11C2-4763-B2BB-7E2BB579A0CC} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /tabler/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tabler/Classes/CellEditHistory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | 4 | namespace tabler.Classes 5 | { 6 | public class CellEditHistory 7 | { 8 | public int CellColumnIndex { get; set; } 9 | 10 | public int CellRowIndex { get; set; } 11 | 12 | public string OldValue { get; set; } 13 | 14 | public string NewValue { get; set; } 15 | 16 | public DateTime ModifiedDate { get; set; } 17 | 18 | public string Mod { get; set; } 19 | 20 | public Color OldBackColor { get; set; } 21 | 22 | public bool Saved { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tabler/Classes/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace tabler.Classes 5 | { 6 | internal static class ControlExtensions 7 | { 8 | public static void UiThread(this Control control, Action code) 9 | { 10 | if (control.InvokeRequired) 11 | { 12 | control.BeginInvoke(code); 13 | return; 14 | } 15 | 16 | code.Invoke(); 17 | } 18 | 19 | public static void UiThreadInvoke(this Control control, Action code) 20 | { 21 | if (control.InvokeRequired) 22 | { 23 | control.Invoke(code); 24 | return; 25 | } 26 | 27 | code.Invoke(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tabler/Classes/Logger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Timers; 4 | using System.Windows.Forms; 5 | using Timer = System.Timers.Timer; 6 | 7 | namespace tabler.Classes 8 | { 9 | public static class Logger 10 | { 11 | private static readonly StringBuilder StringBuilderForLogging = new StringBuilder(); 12 | public static TextBox TextBoxToLogIn; 13 | 14 | private static Timer _timer; 15 | 16 | public static void ClearLog() 17 | { 18 | StringBuilderForLogging.Clear(); 19 | } 20 | 21 | public static void Log(string message) 22 | { 23 | if (TextBoxToLogIn == null) 24 | { 25 | return; 26 | } 27 | 28 | if (_timer == null) 29 | { 30 | _timer = new Timer {Interval = 500}; 31 | _timer.Elapsed += timer_Elapsed; 32 | } 33 | 34 | StringBuilderForLogging.Insert(0, DateTime.Now.ToString("yyyy.MM.dd hh:mm:ss") + " - " + message + Environment.NewLine); 35 | _timer.Start(); 36 | } 37 | 38 | private static void timer_Elapsed(object sender, ElapsedEventArgs e) 39 | { 40 | _timer.Stop(); 41 | 42 | if (TextBoxToLogIn == null) 43 | { 44 | _timer.Start(); 45 | } 46 | 47 | TextBoxToLogIn.UiThread(delegate { TextBoxToLogIn.Text = StringBuilderForLogging.ToString(); }); 48 | 49 | 50 | _timer.Start(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /tabler/Content/Icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-16.png -------------------------------------------------------------------------------- /tabler/Content/Icon-16.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-16.psd -------------------------------------------------------------------------------- /tabler/Content/Icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-256.png -------------------------------------------------------------------------------- /tabler/Content/Icon-256.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-256.psd -------------------------------------------------------------------------------- /tabler/Content/Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-32.png -------------------------------------------------------------------------------- /tabler/Content/Icon-32.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-32.psd -------------------------------------------------------------------------------- /tabler/Content/Icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-48.png -------------------------------------------------------------------------------- /tabler/Content/Icon-48.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/Content/Icon-48.psd -------------------------------------------------------------------------------- /tabler/Forms/About.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler { 2 | partial class About { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Windows Form Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About)); 27 | this.pbLogo = new System.Windows.Forms.PictureBox(); 28 | this.label1 = new System.Windows.Forms.Label(); 29 | this.lblCopyright = new System.Windows.Forms.Label(); 30 | this.lblVersion = new System.Windows.Forms.Label(); 31 | this.lblVersionName = new System.Windows.Forms.Label(); 32 | this.lblCopyrightName = new System.Windows.Forms.Label(); 33 | this.lblLicenseName = new System.Windows.Forms.Label(); 34 | this.lnkLicense = new System.Windows.Forms.LinkLabel(); 35 | this.lnkGithub = new System.Windows.Forms.LinkLabel(); 36 | this.lblGitHubName = new System.Windows.Forms.Label(); 37 | ((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit(); 38 | this.SuspendLayout(); 39 | // 40 | // pbLogo 41 | // 42 | resources.ApplyResources(this.pbLogo, "pbLogo"); 43 | this.pbLogo.Name = "pbLogo"; 44 | this.pbLogo.TabStop = false; 45 | // 46 | // label1 47 | // 48 | resources.ApplyResources(this.label1, "label1"); 49 | this.label1.Name = "label1"; 50 | // 51 | // lblCopyright 52 | // 53 | resources.ApplyResources(this.lblCopyright, "lblCopyright"); 54 | this.lblCopyright.Name = "lblCopyright"; 55 | // 56 | // lblVersion 57 | // 58 | resources.ApplyResources(this.lblVersion, "lblVersion"); 59 | this.lblVersion.Name = "lblVersion"; 60 | // 61 | // lblVersionName 62 | // 63 | resources.ApplyResources(this.lblVersionName, "lblVersionName"); 64 | this.lblVersionName.Name = "lblVersionName"; 65 | // 66 | // lblCopyrightName 67 | // 68 | resources.ApplyResources(this.lblCopyrightName, "lblCopyrightName"); 69 | this.lblCopyrightName.Name = "lblCopyrightName"; 70 | // 71 | // lblLicenseName 72 | // 73 | resources.ApplyResources(this.lblLicenseName, "lblLicenseName"); 74 | this.lblLicenseName.AccessibleRole = System.Windows.Forms.AccessibleRole.None; 75 | this.lblLicenseName.Name = "lblLicenseName"; 76 | // 77 | // lnkLicense 78 | // 79 | resources.ApplyResources(this.lnkLicense, "lnkLicense"); 80 | this.lnkLicense.Name = "lnkLicense"; 81 | this.lnkLicense.TabStop = true; 82 | // 83 | // lnkGithub 84 | // 85 | resources.ApplyResources(this.lnkGithub, "lnkGithub"); 86 | this.lnkGithub.Name = "lnkGithub"; 87 | this.lnkGithub.TabStop = true; 88 | // 89 | // lblGitHubName 90 | // 91 | resources.ApplyResources(this.lblGitHubName, "lblGitHubName"); 92 | this.lblGitHubName.AccessibleRole = System.Windows.Forms.AccessibleRole.None; 93 | this.lblGitHubName.Name = "lblGitHubName"; 94 | // 95 | // About 96 | // 97 | resources.ApplyResources(this, "$this"); 98 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 99 | this.Controls.Add(this.lnkGithub); 100 | this.Controls.Add(this.lblGitHubName); 101 | this.Controls.Add(this.lnkLicense); 102 | this.Controls.Add(this.lblLicenseName); 103 | this.Controls.Add(this.lblCopyrightName); 104 | this.Controls.Add(this.lblVersionName); 105 | this.Controls.Add(this.lblVersion); 106 | this.Controls.Add(this.lblCopyright); 107 | this.Controls.Add(this.label1); 108 | this.Controls.Add(this.pbLogo); 109 | this.Name = "About"; 110 | this.Load += new System.EventHandler(this.About_Load); 111 | ((System.ComponentModel.ISupportInitialize)(this.pbLogo)).EndInit(); 112 | this.ResumeLayout(false); 113 | this.PerformLayout(); 114 | 115 | } 116 | 117 | #endregion 118 | 119 | private System.Windows.Forms.PictureBox pbLogo; 120 | private System.Windows.Forms.Label label1; 121 | private System.Windows.Forms.Label lblCopyright; 122 | private System.Windows.Forms.Label lblVersion; 123 | private System.Windows.Forms.Label lblVersionName; 124 | private System.Windows.Forms.Label lblCopyrightName; 125 | private System.Windows.Forms.Label lblLicenseName; 126 | private System.Windows.Forms.LinkLabel lnkLicense; 127 | private System.Windows.Forms.LinkLabel lnkGithub; 128 | private System.Windows.Forms.Label lblGitHubName; 129 | } 130 | } -------------------------------------------------------------------------------- /tabler/Forms/About.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | 6 | namespace tabler { 7 | public partial class About : Form { 8 | public About() { 9 | InitializeComponent(); 10 | } 11 | 12 | private void About_Load(object sender, System.EventArgs e) { 13 | 14 | var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location); 15 | 16 | lblCopyright.Text = versionInfo.LegalCopyright.ToString(); 17 | lblVersion.Text = versionInfo.FileVersion.ToString(); 18 | 19 | const string licenseUrl = "http://creativecommons.org/licenses/by-sa/4.0/"; 20 | lnkLicense.Links.Add(0, licenseUrl.Length, licenseUrl); 21 | 22 | const string githubUrl = "https://github.com/bux578/tabler"; 23 | lnkGithub.Links.Add(0, githubUrl.Length, githubUrl); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tabler/Forms/AboutBox.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler 2 | { 3 | partial class AboutBox 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | protected override void Dispose(bool disposing) 14 | { 15 | if (disposing && (components != null)) 16 | { 17 | components.Dispose(); 18 | } 19 | base.Dispose(disposing); 20 | } 21 | 22 | #region Windows Form Designer generated code 23 | 24 | /// 25 | /// Required method for Designer support - do not modify 26 | /// the contents of this method with the code editor. 27 | /// 28 | private void InitializeComponent() 29 | { 30 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox)); 31 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 32 | this.logoPictureBox = new System.Windows.Forms.PictureBox(); 33 | this.labelProductName = new System.Windows.Forms.Label(); 34 | this.labelVersion = new System.Windows.Forms.Label(); 35 | this.labelCopyright = new System.Windows.Forms.Label(); 36 | this.labelCompanyName = new System.Windows.Forms.LinkLabel(); 37 | this.textBoxDescription = new System.Windows.Forms.TextBox(); 38 | this.okButton = new System.Windows.Forms.Button(); 39 | this.tableLayoutPanel.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // tableLayoutPanel 44 | // 45 | resources.ApplyResources(this.tableLayoutPanel, "tableLayoutPanel"); 46 | this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0); 47 | this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); 48 | this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); 49 | this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); 50 | this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); 51 | this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); 52 | this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); 53 | this.tableLayoutPanel.Name = "tableLayoutPanel"; 54 | // 55 | // logoPictureBox 56 | // 57 | resources.ApplyResources(this.logoPictureBox, "logoPictureBox"); 58 | this.logoPictureBox.Name = "logoPictureBox"; 59 | this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); 60 | this.logoPictureBox.TabStop = false; 61 | // 62 | // labelProductName 63 | // 64 | resources.ApplyResources(this.labelProductName, "labelProductName"); 65 | this.labelProductName.Name = "labelProductName"; 66 | // 67 | // labelVersion 68 | // 69 | resources.ApplyResources(this.labelVersion, "labelVersion"); 70 | this.labelVersion.Name = "labelVersion"; 71 | // 72 | // labelCopyright 73 | // 74 | resources.ApplyResources(this.labelCopyright, "labelCopyright"); 75 | this.labelCopyright.Name = "labelCopyright"; 76 | // 77 | // labelCompanyName 78 | // 79 | resources.ApplyResources(this.labelCompanyName, "labelCompanyName"); 80 | this.labelCompanyName.Name = "labelCompanyName"; 81 | this.labelCompanyName.TabStop = true; 82 | this.labelCompanyName.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.labelCompanyName_LinkClicked); 83 | // 84 | // textBoxDescription 85 | // 86 | resources.ApplyResources(this.textBoxDescription, "textBoxDescription"); 87 | this.textBoxDescription.Name = "textBoxDescription"; 88 | this.textBoxDescription.ReadOnly = true; 89 | this.textBoxDescription.TabStop = false; 90 | // 91 | // okButton 92 | // 93 | resources.ApplyResources(this.okButton, "okButton"); 94 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 95 | this.okButton.Name = "okButton"; 96 | // 97 | // AboutBox 98 | // 99 | this.AcceptButton = this.okButton; 100 | resources.ApplyResources(this, "$this"); 101 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 102 | this.Controls.Add(this.tableLayoutPanel); 103 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 104 | this.MaximizeBox = false; 105 | this.MinimizeBox = false; 106 | this.Name = "AboutBox"; 107 | this.ShowIcon = false; 108 | this.ShowInTaskbar = false; 109 | this.tableLayoutPanel.ResumeLayout(false); 110 | this.tableLayoutPanel.PerformLayout(); 111 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); 112 | this.ResumeLayout(false); 113 | 114 | } 115 | 116 | #endregion 117 | 118 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 119 | private System.Windows.Forms.PictureBox logoPictureBox; 120 | private System.Windows.Forms.Label labelProductName; 121 | private System.Windows.Forms.Label labelVersion; 122 | private System.Windows.Forms.Label labelCopyright; 123 | private System.Windows.Forms.TextBox textBoxDescription; 124 | private System.Windows.Forms.Button okButton; 125 | private System.Windows.Forms.LinkLabel labelCompanyName; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /tabler/Forms/AboutBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.Reflection; 5 | using System.Windows.Forms; 6 | 7 | namespace tabler 8 | { 9 | internal partial class AboutBox : Form 10 | { 11 | public AboutBox() 12 | { 13 | InitializeComponent(); 14 | Text = $"About {AssemblyTitle}"; 15 | labelProductName.Text = AssemblyProduct; 16 | labelVersion.Text = $"Version {AssemblyVersion}"; 17 | labelCopyright.Text = AssemblyCopyright; 18 | 19 | labelCompanyName.Text = AssemblyCompany; 20 | var link = new LinkLabel.Link {LinkData = AssemblyCompany}; 21 | labelCompanyName.Links.Add(link); 22 | 23 | textBoxDescription.Text = AssemblyDescription; 24 | } 25 | 26 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 27 | { 28 | if (keyData == Keys.Escape) 29 | { 30 | Close(); 31 | return true; 32 | } 33 | return base.ProcessCmdKey(ref msg, keyData); 34 | } 35 | 36 | private void labelCompanyName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 37 | { 38 | // Send the URL to the operating system. 39 | Process.Start(e.Link.LinkData as string ?? throw new InvalidOperationException()); 40 | } 41 | 42 | #region Assembly Attribute Accessors 43 | 44 | public string AssemblyTitle 45 | { 46 | get 47 | { 48 | var attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); 49 | if (attributes.Length > 0) 50 | { 51 | var titleAttribute = (AssemblyTitleAttribute) attributes[0]; 52 | if (titleAttribute.Title != "") 53 | { 54 | return titleAttribute.Title; 55 | } 56 | } 57 | 58 | return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); 59 | } 60 | } 61 | 62 | public string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString(); 63 | 64 | public string AssemblyDescription 65 | { 66 | get 67 | { 68 | var attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); 69 | if (attributes.Length == 0) 70 | { 71 | return ""; 72 | } 73 | 74 | return ((AssemblyDescriptionAttribute) attributes[0]).Description; 75 | } 76 | } 77 | 78 | public string AssemblyProduct 79 | { 80 | get 81 | { 82 | var attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); 83 | if (attributes.Length == 0) 84 | { 85 | return ""; 86 | } 87 | 88 | return ((AssemblyProductAttribute) attributes[0]).Product; 89 | } 90 | } 91 | 92 | public string AssemblyCopyright 93 | { 94 | get 95 | { 96 | var attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); 97 | if (attributes.Length == 0) 98 | { 99 | return ""; 100 | } 101 | 102 | return ((AssemblyCopyrightAttribute) attributes[0]).Copyright; 103 | } 104 | } 105 | 106 | public string AssemblyCompany 107 | { 108 | get 109 | { 110 | var attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); 111 | if (attributes.Length == 0) 112 | { 113 | return ""; 114 | } 115 | 116 | return ((AssemblyCompanyAttribute) attributes[0]).Company; 117 | } 118 | } 119 | 120 | #endregion 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /tabler/Forms/AddLanguage.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler 2 | { 3 | partial class AddLanguage 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddLanguage)); 32 | this.lblLanguage = new System.Windows.Forms.Label(); 33 | this.btnAddThisLanguage = new System.Windows.Forms.Button(); 34 | this.btnCancel = new System.Windows.Forms.Button(); 35 | this.cmbLanguage = new System.Windows.Forms.ComboBox(); 36 | this.SuspendLayout(); 37 | // 38 | // lblLanguage 39 | // 40 | resources.ApplyResources(this.lblLanguage, "lblLanguage"); 41 | this.lblLanguage.Name = "lblLanguage"; 42 | // 43 | // btnAddThisLanguage 44 | // 45 | resources.ApplyResources(this.btnAddThisLanguage, "btnAddThisLanguage"); 46 | this.btnAddThisLanguage.Name = "btnAddThisLanguage"; 47 | this.btnAddThisLanguage.UseVisualStyleBackColor = true; 48 | this.btnAddThisLanguage.Click += new System.EventHandler(this.btnAddThisLanguage_Click); 49 | // 50 | // btnCancel 51 | // 52 | resources.ApplyResources(this.btnCancel, "btnCancel"); 53 | this.btnCancel.Name = "btnCancel"; 54 | this.btnCancel.UseVisualStyleBackColor = true; 55 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 56 | // 57 | // cmbLanguage 58 | // 59 | resources.ApplyResources(this.cmbLanguage, "cmbLanguage"); 60 | this.cmbLanguage.FormattingEnabled = true; 61 | this.cmbLanguage.Name = "cmbLanguage"; 62 | // 63 | // AddLanguage 64 | // 65 | resources.ApplyResources(this, "$this"); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 67 | this.Controls.Add(this.cmbLanguage); 68 | this.Controls.Add(this.btnCancel); 69 | this.Controls.Add(this.btnAddThisLanguage); 70 | this.Controls.Add(this.lblLanguage); 71 | this.MaximizeBox = false; 72 | this.MinimizeBox = false; 73 | this.Name = "AddLanguage"; 74 | this.ShowIcon = false; 75 | this.ShowInTaskbar = false; 76 | this.Load += new System.EventHandler(this.AddLanguage_Load); 77 | this.ResumeLayout(false); 78 | this.PerformLayout(); 79 | 80 | } 81 | 82 | #endregion 83 | private System.Windows.Forms.Label lblLanguage; 84 | private System.Windows.Forms.Button btnAddThisLanguage; 85 | private System.Windows.Forms.Button btnCancel; 86 | private System.Windows.Forms.ComboBox cmbLanguage; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /tabler/Forms/AddLanguage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows.Forms; 4 | using tabler.Logic.Enums; 5 | using tabler.Logic.Extensions; 6 | 7 | namespace tabler 8 | { 9 | public partial class AddLanguage : Form 10 | { 11 | private readonly GridUI _gridUi; 12 | 13 | public AddLanguage(GridUI gridUi) 14 | { 15 | _gridUi = gridUi; 16 | InitializeComponent(); 17 | } 18 | 19 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 20 | { 21 | if (keyData == Keys.Escape) 22 | { 23 | Close(); 24 | return true; 25 | } 26 | return base.ProcessCmdKey(ref msg, keyData); 27 | } 28 | 29 | private void btnCancel_Click(object sender, EventArgs e) 30 | { 31 | DialogResult = DialogResult.Cancel; 32 | Close(); 33 | } 34 | 35 | private void btnAddThisLanguage_Click(object sender, EventArgs e) 36 | { 37 | _gridUi.HandleAddLanguage(cmbLanguage.SelectedItem?.ToString()); 38 | DialogResult = DialogResult.OK; 39 | Close(); 40 | } 41 | 42 | private void AddLanguage_Load(object sender, EventArgs e) 43 | { 44 | var allPossibleLanguages = EnumUtils.GetValues(); 45 | var usedLanguages = _gridUi.TranslationHelper.TranslationComponents.Headers; 46 | 47 | var remainingLanguages = allPossibleLanguages.Select(l => l.ToString()).ToList().Except(usedLanguages).ToList(); 48 | 49 | cmbLanguage.DataSource = remainingLanguages; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tabler/Forms/FindForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler.Forms 2 | { 3 | partial class FindForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FindForm)); 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.cbSearchTerm = new System.Windows.Forms.ComboBox(); 34 | this.btnFind = new System.Windows.Forms.Button(); 35 | this.btnClose = new System.Windows.Forms.Button(); 36 | this.lblFindWhat = new System.Windows.Forms.Label(); 37 | this.panel1.SuspendLayout(); 38 | this.SuspendLayout(); 39 | // 40 | // panel1 41 | // 42 | this.panel1.Controls.Add(this.cbSearchTerm); 43 | this.panel1.Controls.Add(this.btnFind); 44 | this.panel1.Controls.Add(this.btnClose); 45 | this.panel1.Controls.Add(this.lblFindWhat); 46 | resources.ApplyResources(this.panel1, "panel1"); 47 | this.panel1.Name = "panel1"; 48 | // 49 | // cbSearchTerm 50 | // 51 | resources.ApplyResources(this.cbSearchTerm, "cbSearchTerm"); 52 | this.cbSearchTerm.FormattingEnabled = true; 53 | this.cbSearchTerm.Name = "cbSearchTerm"; 54 | this.cbSearchTerm.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbSearchTerm_KeyDown); 55 | // 56 | // btnFind 57 | // 58 | resources.ApplyResources(this.btnFind, "btnFind"); 59 | this.btnFind.Name = "btnFind"; 60 | this.btnFind.UseVisualStyleBackColor = true; 61 | this.btnFind.Click += new System.EventHandler(this.btnFind_Click); 62 | // 63 | // btnClose 64 | // 65 | resources.ApplyResources(this.btnClose, "btnClose"); 66 | this.btnClose.Name = "btnClose"; 67 | this.btnClose.UseVisualStyleBackColor = true; 68 | this.btnClose.Click += new System.EventHandler(this.btnClose_Click); 69 | // 70 | // lblFindWhat 71 | // 72 | resources.ApplyResources(this.lblFindWhat, "lblFindWhat"); 73 | this.lblFindWhat.Name = "lblFindWhat"; 74 | // 75 | // FindForm 76 | // 77 | resources.ApplyResources(this, "$this"); 78 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 79 | this.Controls.Add(this.panel1); 80 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 81 | this.KeyPreview = true; 82 | this.MaximizeBox = false; 83 | this.MinimizeBox = false; 84 | this.Name = "FindForm"; 85 | this.ShowIcon = false; 86 | this.ShowInTaskbar = false; 87 | this.TopMost = true; 88 | this.Load += new System.EventHandler(this.FindForm_Load); 89 | this.panel1.ResumeLayout(false); 90 | this.panel1.PerformLayout(); 91 | this.ResumeLayout(false); 92 | 93 | } 94 | 95 | #endregion 96 | 97 | private System.Windows.Forms.Panel panel1; 98 | private System.Windows.Forms.Button btnFind; 99 | private System.Windows.Forms.Button btnClose; 100 | private System.Windows.Forms.Label lblFindWhat; 101 | private System.Windows.Forms.ComboBox cbSearchTerm; 102 | } 103 | } -------------------------------------------------------------------------------- /tabler/Forms/FindForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace tabler.Forms 5 | { 6 | public partial class FindForm : Form 7 | { 8 | private readonly GridUI _gridUi; 9 | 10 | public FindForm(GridUI gridUi) 11 | { 12 | _gridUi = gridUi; 13 | InitializeComponent(); 14 | } 15 | 16 | 17 | private void CloseForm(DialogResult result) 18 | { 19 | DialogResult = result; 20 | _gridUi.FindFormOpen = false; 21 | Close(); 22 | } 23 | 24 | 25 | #region Events 26 | 27 | private void FindForm_Load(object sender, EventArgs e) 28 | { 29 | _gridUi.FindFormOpen = true; 30 | cbSearchTerm.Select(); 31 | } 32 | 33 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 34 | { 35 | if (keyData == Keys.Escape) 36 | { 37 | _gridUi.FindFormOpen = false; 38 | Close(); 39 | return true; 40 | } 41 | return base.ProcessCmdKey(ref msg, keyData); 42 | } 43 | 44 | 45 | private void btnClose_Click(object sender, EventArgs e) 46 | { 47 | CloseForm(DialogResult.None); 48 | } 49 | 50 | private void btnFind_Click(object sender, EventArgs e) 51 | { 52 | if (!string.IsNullOrEmpty(cbSearchTerm.Text)) 53 | { 54 | _gridUi.PerformFind(cbSearchTerm.Text); 55 | } 56 | } 57 | 58 | private void cbSearchTerm_KeyDown(object sender, KeyEventArgs e) 59 | { 60 | if (e.KeyCode == Keys.Enter) 61 | { 62 | if (!string.IsNullOrEmpty(cbSearchTerm.Text)) 63 | { 64 | _gridUi.PerformFind(cbSearchTerm.Text); 65 | } 66 | } 67 | } 68 | 69 | 70 | #endregion 71 | 72 | 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /tabler/Forms/FindForm.de.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 167, 12 123 | 124 | 125 | 379, 23 126 | 127 | 128 | Suchen 129 | 130 | 131 | Schließen 132 | 133 | 134 | 73, 15 135 | 136 | 137 | Was suchen: 138 | 139 | 140 | Im aktiven Tab suchen 141 | 142 | -------------------------------------------------------------------------------- /tabler/Forms/FindForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | Right 123 | 124 | 125 | 126 | 92, 12 127 | 128 | 129 | 454, 23 130 | 131 | 132 | 133 | 1 134 | 135 | 136 | cbSearchTerm 137 | 138 | 139 | System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 140 | 141 | 142 | panel1 143 | 144 | 145 | 0 146 | 147 | 148 | 360, 72 149 | 150 | 151 | 87, 27 152 | 153 | 154 | 2 155 | 156 | 157 | Find Next 158 | 159 | 160 | btnFind 161 | 162 | 163 | System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 164 | 165 | 166 | panel1 167 | 168 | 169 | 1 170 | 171 | 172 | 455, 72 173 | 174 | 175 | 87, 27 176 | 177 | 178 | 3 179 | 180 | 181 | Close 182 | 183 | 184 | btnClose 185 | 186 | 187 | System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 188 | 189 | 190 | panel1 191 | 192 | 193 | 2 194 | 195 | 196 | True 197 | 198 | 199 | 15, 17 200 | 201 | 202 | 62, 15 203 | 204 | 205 | 0 206 | 207 | 208 | Find what: 209 | 210 | 211 | lblFindWhat 212 | 213 | 214 | System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 215 | 216 | 217 | panel1 218 | 219 | 220 | 3 221 | 222 | 223 | Fill 224 | 225 | 226 | 0, 0 227 | 228 | 229 | 12, 12, 12, 12 230 | 231 | 232 | 558, 115 233 | 234 | 235 | 0 236 | 237 | 238 | panel1 239 | 240 | 241 | System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 242 | 243 | 244 | $this 245 | 246 | 247 | 0 248 | 249 | 250 | True 251 | 252 | 253 | 7, 15 254 | 255 | 256 | 558, 115 257 | 258 | 259 | Segoe UI, 9pt 260 | 261 | 262 | CenterScreen 263 | 264 | 265 | Find in Current Tab 266 | 267 | 268 | FindForm 269 | 270 | 271 | System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 272 | 273 | -------------------------------------------------------------------------------- /tabler/Forms/OverlayForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Runtime.InteropServices; 4 | using System.Windows.Forms; 5 | 6 | namespace tabler.Forms 7 | { 8 | // https://social.msdn.microsoft.com/Forums/en-US/d28d8fbb-655a-45b4-a692-21420c5e014e/dark-transparent-layer-for-child-winform?forum=winforms 9 | public class OverlayForm : Form 10 | { 11 | private static readonly int HTTRANSPARENT = -1; 12 | private static readonly int WM_NCHITTEST = 0x0084; 13 | private static readonly int WS_EX_TOOLWINDOW = 0x00000080; 14 | private static readonly int SW_SHOWNOACTIVATE = 4; 15 | private static readonly int SW_SHOWNORMAL = 1; 16 | 17 | private OverlayForm(Form parent) 18 | { 19 | FormBorderStyle = FormBorderStyle.None; 20 | BackColor = Color.Black; 21 | Opacity = 0.5; 22 | ShowInTaskbar = false; 23 | StartPosition = FormStartPosition.Manual; 24 | SetStyle(ControlStyles.Selectable, false); 25 | 26 | parent.LocationChanged += (o, e) => { ResetLocationAndSize(parent); }; 27 | parent.SizeChanged += (o, e) => { ResetLocationAndSize(parent); }; 28 | //parent.Activated += (o, e) => { Hide(); }; 29 | 30 | ResetLocationAndSize(parent); 31 | } 32 | 33 | protected override CreateParams CreateParams 34 | { 35 | get 36 | { 37 | var createParams = base.CreateParams; 38 | createParams.ExStyle |= WS_EX_TOOLWINDOW; 39 | return createParams; 40 | } 41 | } 42 | 43 | [DllImport("user32.dll")] 44 | public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); 45 | 46 | //protected override void WndProc(ref Message m) 47 | //{ 48 | // if (m.Msg == WM_NCHITTEST) 49 | // { 50 | // m.Result = (IntPtr) HTTRANSPARENT; 51 | // return; 52 | // } 53 | 54 | // base.WndProc(ref m); 55 | //} 56 | 57 | private void ResetLocationAndSize(Form parent) 58 | { 59 | var location = parent.PointToScreen(Point.Empty); 60 | Bounds = new Rectangle(location, parent.ClientSize); 61 | } 62 | 63 | // 64 | public static void ShowOverlay(Form parent, Form child) 65 | { 66 | var overlay = new OverlayForm(parent); 67 | overlay.Show(parent); 68 | 69 | child.Activated += (o, e) => { ShowWindow(overlay.Handle, SW_SHOWNORMAL); }; 70 | child.FormClosed += (o, e) => { overlay.Close(); }; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /tabler/Forms/RemoveLanguage.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler 2 | { 3 | partial class RemoveLanguage 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RemoveLanguage)); 32 | this.lblLanguage = new System.Windows.Forms.Label(); 33 | this.btnRemoveThisLanguage = new System.Windows.Forms.Button(); 34 | this.btnCancel = new System.Windows.Forms.Button(); 35 | this.cmbLanguage = new System.Windows.Forms.ComboBox(); 36 | this.SuspendLayout(); 37 | // 38 | // lblLanguage 39 | // 40 | resources.ApplyResources(this.lblLanguage, "lblLanguage"); 41 | this.lblLanguage.Name = "lblLanguage"; 42 | // 43 | // btnRemoveThisLanguage 44 | // 45 | resources.ApplyResources(this.btnRemoveThisLanguage, "btnRemoveThisLanguage"); 46 | this.btnRemoveThisLanguage.Name = "btnRemoveThisLanguage"; 47 | this.btnRemoveThisLanguage.UseVisualStyleBackColor = true; 48 | this.btnRemoveThisLanguage.Click += new System.EventHandler(this.btnRemoveThisLanguage_Click); 49 | // 50 | // btnCancel 51 | // 52 | resources.ApplyResources(this.btnCancel, "btnCancel"); 53 | this.btnCancel.Name = "btnCancel"; 54 | this.btnCancel.UseVisualStyleBackColor = true; 55 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 56 | // 57 | // cmbLanguage 58 | // 59 | this.cmbLanguage.FormattingEnabled = true; 60 | resources.ApplyResources(this.cmbLanguage, "cmbLanguage"); 61 | this.cmbLanguage.Name = "cmbLanguage"; 62 | // 63 | // RemoveLanguage 64 | // 65 | resources.ApplyResources(this, "$this"); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 67 | this.Controls.Add(this.cmbLanguage); 68 | this.Controls.Add(this.btnCancel); 69 | this.Controls.Add(this.btnRemoveThisLanguage); 70 | this.Controls.Add(this.lblLanguage); 71 | this.MaximizeBox = false; 72 | this.MinimizeBox = false; 73 | this.Name = "RemoveLanguage"; 74 | this.ShowIcon = false; 75 | this.ShowInTaskbar = false; 76 | this.Load += new System.EventHandler(this.RemoveLanguage_Load); 77 | this.ResumeLayout(false); 78 | this.PerformLayout(); 79 | 80 | } 81 | 82 | #endregion 83 | private System.Windows.Forms.Label lblLanguage; 84 | private System.Windows.Forms.Button btnRemoveThisLanguage; 85 | private System.Windows.Forms.Button btnCancel; 86 | private System.Windows.Forms.ComboBox cmbLanguage; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /tabler/Forms/RemoveLanguage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows.Forms; 4 | using tabler.Logic.Enums; 5 | using tabler.Logic.Extensions; 6 | 7 | namespace tabler 8 | { 9 | public partial class RemoveLanguage : Form 10 | { 11 | private readonly GridUI _gridUi; 12 | 13 | public RemoveLanguage(GridUI gridUi) 14 | { 15 | _gridUi = gridUi; 16 | InitializeComponent(); 17 | } 18 | 19 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 20 | { 21 | if (keyData == Keys.Escape) 22 | { 23 | Close(); 24 | return true; 25 | } 26 | return base.ProcessCmdKey(ref msg, keyData); 27 | } 28 | 29 | private void btnCancel_Click(object sender, EventArgs e) 30 | { 31 | DialogResult = DialogResult.Cancel; 32 | Close(); 33 | } 34 | 35 | private void btnRemoveThisLanguage_Click(object sender, EventArgs e) 36 | { 37 | _gridUi.HandleRemoveLanguage(cmbLanguage.SelectedItem?.ToString()); 38 | DialogResult = DialogResult.OK; 39 | Close(); 40 | } 41 | 42 | private void RemoveLanguage_Load(object sender, EventArgs e) 43 | { 44 | var allPossibleLanguages = EnumUtils.GetValues().Select(l => l.ToString()); 45 | var usedLanguages = _gridUi.TranslationHelper.TranslationComponents.Headers; 46 | 47 | var test = usedLanguages.Intersect(allPossibleLanguages).ToList(); 48 | 49 | cmbLanguage.DataSource = test; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tabler/Forms/SettingsForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler { 2 | partial class SettingsForm { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Windows Form Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm)); 27 | this.btnCancel = new System.Windows.Forms.Button(); 28 | this.btnSaveSettings = new System.Windows.Forms.Button(); 29 | this.grpBIndentation = new System.Windows.Forms.GroupBox(); 30 | this.rbIndentSpaces = new System.Windows.Forms.RadioButton(); 31 | this.tbIndentation = new System.Windows.Forms.TextBox(); 32 | this.rbIndentTabs = new System.Windows.Forms.RadioButton(); 33 | this.grpBIndentation.SuspendLayout(); 34 | this.SuspendLayout(); 35 | // 36 | // btnCancel 37 | // 38 | resources.ApplyResources(this.btnCancel, "btnCancel"); 39 | this.btnCancel.Name = "btnCancel"; 40 | this.btnCancel.UseVisualStyleBackColor = true; 41 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 42 | // 43 | // btnSaveSettings 44 | // 45 | resources.ApplyResources(this.btnSaveSettings, "btnSaveSettings"); 46 | this.btnSaveSettings.Name = "btnSaveSettings"; 47 | this.btnSaveSettings.UseVisualStyleBackColor = true; 48 | this.btnSaveSettings.Click += new System.EventHandler(this.btnSaveSettings_Click); 49 | // 50 | // grpBIndentation 51 | // 52 | resources.ApplyResources(this.grpBIndentation, "grpBIndentation"); 53 | this.grpBIndentation.Controls.Add(this.rbIndentSpaces); 54 | this.grpBIndentation.Controls.Add(this.tbIndentation); 55 | this.grpBIndentation.Controls.Add(this.rbIndentTabs); 56 | this.grpBIndentation.Name = "grpBIndentation"; 57 | this.grpBIndentation.TabStop = false; 58 | // 59 | // rbIndentSpaces 60 | // 61 | resources.ApplyResources(this.rbIndentSpaces, "rbIndentSpaces"); 62 | this.rbIndentSpaces.Checked = true; 63 | this.rbIndentSpaces.Name = "rbIndentSpaces"; 64 | this.rbIndentSpaces.TabStop = true; 65 | this.rbIndentSpaces.UseVisualStyleBackColor = true; 66 | // 67 | // tbIndentation 68 | // 69 | resources.ApplyResources(this.tbIndentation, "tbIndentation"); 70 | this.tbIndentation.Name = "tbIndentation"; 71 | // 72 | // rbIndentTabs 73 | // 74 | resources.ApplyResources(this.rbIndentTabs, "rbIndentTabs"); 75 | this.rbIndentTabs.Name = "rbIndentTabs"; 76 | this.rbIndentTabs.UseVisualStyleBackColor = true; 77 | this.rbIndentTabs.CheckedChanged += new System.EventHandler(this.rbIndentTabs_CheckedChanged); 78 | // 79 | // SettingsForm 80 | // 81 | resources.ApplyResources(this, "$this"); 82 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 83 | this.Controls.Add(this.grpBIndentation); 84 | this.Controls.Add(this.btnCancel); 85 | this.Controls.Add(this.btnSaveSettings); 86 | this.MaximizeBox = false; 87 | this.MinimizeBox = false; 88 | this.Name = "SettingsForm"; 89 | this.ShowIcon = false; 90 | this.Load += new System.EventHandler(this.Settings_Load); 91 | this.grpBIndentation.ResumeLayout(false); 92 | this.grpBIndentation.PerformLayout(); 93 | this.ResumeLayout(false); 94 | 95 | } 96 | 97 | #endregion 98 | 99 | private System.Windows.Forms.Button btnCancel; 100 | private System.Windows.Forms.Button btnSaveSettings; 101 | private System.Windows.Forms.GroupBox grpBIndentation; 102 | private System.Windows.Forms.RadioButton rbIndentSpaces; 103 | private System.Windows.Forms.TextBox tbIndentation; 104 | private System.Windows.Forms.RadioButton rbIndentTabs; 105 | } 106 | } -------------------------------------------------------------------------------- /tabler/Forms/SettingsForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using tabler.Logic.Classes; 4 | using tabler.Logic.Helper; 5 | 6 | namespace tabler 7 | { 8 | public partial class SettingsForm : Form 9 | { 10 | private readonly GridUI _myParent; 11 | 12 | public SettingsForm(GridUI myParent) 13 | { 14 | _myParent = myParent; 15 | InitializeComponent(); 16 | } 17 | 18 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 19 | { 20 | if (keyData == Keys.Escape) 21 | { 22 | Close(); 23 | return true; 24 | } 25 | return base.ProcessCmdKey(ref msg, keyData); 26 | } 27 | 28 | private void Settings_Load(object sender, EventArgs e) 29 | { 30 | var configHelper = new ConfigHelper(); 31 | 32 | var settings = configHelper.GetSettings(); 33 | 34 | if (settings != null) 35 | { 36 | if (settings.IndentationSettings == IndentationSettings.Tabs) 37 | { 38 | rbIndentTabs.Checked = true; 39 | } 40 | 41 | tbIndentation.Text = settings.TabSize.ToString(); 42 | } 43 | } 44 | 45 | 46 | private void btnCancel_Click(object sender, EventArgs e) 47 | { 48 | Close(); 49 | } 50 | 51 | private void rbIndentTabs_CheckedChanged(object sender, EventArgs e) 52 | { 53 | var me = (RadioButton) sender; 54 | tbIndentation.Enabled = !me.Checked; 55 | } 56 | 57 | private void btnSaveSettings_Click(object sender, EventArgs e) 58 | { 59 | var configHelper = new ConfigHelper(); 60 | var newSettings = new Settings(); 61 | 62 | if (rbIndentTabs.Checked) 63 | { 64 | newSettings.IndentationSettings = IndentationSettings.Tabs; 65 | } 66 | 67 | if (rbIndentSpaces.Checked) 68 | { 69 | newSettings.IndentationSettings = IndentationSettings.Spaces; 70 | //newSettings.TabSize = 71 | int tabSizeValue; 72 | if (int.TryParse(tbIndentation.Text, out tabSizeValue)) 73 | { 74 | newSettings.TabSize = tabSizeValue; 75 | } 76 | else 77 | { 78 | tbIndentation.Text = "4"; 79 | return; 80 | } 81 | } 82 | 83 | configHelper.SaveSettings(newSettings); 84 | Close(); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /tabler/Forms/TabSelector.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler.Forms 2 | { 3 | partial class TabSelector 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TabSelector)); 32 | this.tbSelectTab = new System.Windows.Forms.TextBox(); 33 | this.panelContainer = new System.Windows.Forms.Panel(); 34 | this.panelContainer.SuspendLayout(); 35 | this.SuspendLayout(); 36 | // 37 | // tbSelectTab 38 | // 39 | this.tbSelectTab.Dock = System.Windows.Forms.DockStyle.Fill; 40 | this.tbSelectTab.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 41 | this.tbSelectTab.Location = new System.Drawing.Point(12, 12); 42 | this.tbSelectTab.Name = "tbSelectTab"; 43 | this.tbSelectTab.Size = new System.Drawing.Size(879, 32); 44 | this.tbSelectTab.TabIndex = 1; 45 | this.tbSelectTab.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbSelectTab_KeyDown); 46 | // 47 | // panelContainer 48 | // 49 | this.panelContainer.Controls.Add(this.tbSelectTab); 50 | this.panelContainer.Dock = System.Windows.Forms.DockStyle.Fill; 51 | this.panelContainer.Location = new System.Drawing.Point(0, 0); 52 | this.panelContainer.Name = "panelContainer"; 53 | this.panelContainer.Padding = new System.Windows.Forms.Padding(12, 12, 12, 12); 54 | this.panelContainer.Size = new System.Drawing.Size(903, 63); 55 | this.panelContainer.TabIndex = 1; 56 | // 57 | // TabSelector 58 | // 59 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); 60 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 61 | this.ClientSize = new System.Drawing.Size(903, 63); 62 | this.Controls.Add(this.panelContainer); 63 | this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 64 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 65 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 66 | this.KeyPreview = true; 67 | this.Name = "TabSelector"; 68 | this.ShowIcon = false; 69 | this.ShowInTaskbar = false; 70 | this.Text = "TabSelector"; 71 | this.TopMost = true; 72 | this.Load += new System.EventHandler(this.TabSelector_Load); 73 | this.panelContainer.ResumeLayout(false); 74 | this.panelContainer.PerformLayout(); 75 | this.ResumeLayout(false); 76 | 77 | } 78 | 79 | #endregion 80 | 81 | private System.Windows.Forms.TextBox tbSelectTab; 82 | private System.Windows.Forms.Panel panelContainer; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /tabler/Forms/TabSelector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace tabler.Forms 6 | { 7 | public partial class TabSelector : Form 8 | { 9 | private readonly GridUI _parent; 10 | private readonly List _lstTabNames; 11 | 12 | public TabSelector(GridUI parent) 13 | { 14 | InitializeComponent(); 15 | 16 | _parent = parent; 17 | _lstTabNames = new List(); 18 | foreach (TabPage tabPage in _parent.tabControl1.TabPages) 19 | { 20 | _lstTabNames.Add(tabPage.Text); 21 | } 22 | } 23 | 24 | private void TabSelector_Load(object sender, EventArgs e) 25 | { 26 | tbSelectTab.Select(); 27 | tbSelectTab.AutoCompleteSource = AutoCompleteSource.CustomSource; 28 | 29 | var autoCompleteSource = new AutoCompleteStringCollection(); 30 | autoCompleteSource.AddRange(_lstTabNames.ToArray()); 31 | 32 | tbSelectTab.AutoCompleteCustomSource = autoCompleteSource; 33 | tbSelectTab.AutoCompleteMode = AutoCompleteMode.SuggestAppend; 34 | 35 | tbSelectTab.LostFocus += TabSelector_LostFocus; 36 | } 37 | 38 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 39 | { 40 | if (keyData == Keys.Escape) 41 | { 42 | Close(); 43 | return true; 44 | } 45 | return base.ProcessCmdKey(ref msg, keyData); 46 | } 47 | 48 | protected override void OnShown(EventArgs e) 49 | { 50 | tbSelectTab.Select(); 51 | tbSelectTab.Focus(); 52 | base.OnShown(e); 53 | } 54 | 55 | public string SelectedTabName { get; set; } 56 | 57 | private void TabSelector_LostFocus(object sender, EventArgs args) 58 | { 59 | this.DialogResult = DialogResult.Cancel; 60 | this.Close(); 61 | } 62 | 63 | private void tbSelectTab_KeyDown(object sender, KeyEventArgs e) 64 | { 65 | if (e.KeyCode == Keys.Enter) 66 | { 67 | SelectedTabName = tbSelectTab.Text; 68 | _parent.SelectTabByName(tbSelectTab.Text); 69 | 70 | this.DialogResult = DialogResult.OK; 71 | this.Close(); 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /tabler/Forms/TranslationProgress.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler 2 | { 3 | partial class TranslationProgress 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TranslationProgress)); 33 | System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 34 | System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 35 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 36 | this.chart = new System.Windows.Forms.DataVisualization.Charting.Chart(); 37 | this.panel1 = new System.Windows.Forms.Panel(); 38 | this.lblTranslationCount = new System.Windows.Forms.Label(); 39 | this.label1 = new System.Windows.Forms.Label(); 40 | this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); 41 | this.copyDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 42 | this.copyDataasMdTableToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 43 | this.tableLayoutPanel1.SuspendLayout(); 44 | ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 45 | this.panel1.SuspendLayout(); 46 | this.contextMenu.SuspendLayout(); 47 | this.SuspendLayout(); 48 | // 49 | // tableLayoutPanel1 50 | // 51 | resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); 52 | this.tableLayoutPanel1.Controls.Add(this.chart, 0, 1); 53 | this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0); 54 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 55 | // 56 | // chart 57 | // 58 | resources.ApplyResources(this.chart, "chart"); 59 | chartArea1.Name = "ChartArea1"; 60 | this.chart.ChartAreas.Add(chartArea1); 61 | legend1.Name = "Legend1"; 62 | this.chart.Legends.Add(legend1); 63 | this.chart.Name = "chart"; 64 | // 65 | // panel1 66 | // 67 | resources.ApplyResources(this.panel1, "panel1"); 68 | this.panel1.Controls.Add(this.lblTranslationCount); 69 | this.panel1.Controls.Add(this.label1); 70 | this.panel1.Name = "panel1"; 71 | // 72 | // lblTranslationCount 73 | // 74 | resources.ApplyResources(this.lblTranslationCount, "lblTranslationCount"); 75 | this.lblTranslationCount.Name = "lblTranslationCount"; 76 | // 77 | // label1 78 | // 79 | resources.ApplyResources(this.label1, "label1"); 80 | this.label1.Name = "label1"; 81 | // 82 | // contextMenu 83 | // 84 | resources.ApplyResources(this.contextMenu, "contextMenu"); 85 | this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 86 | this.copyDataToolStripMenuItem, 87 | this.copyDataasMdTableToolStripMenuItem}); 88 | this.contextMenu.Name = "contextMenu"; 89 | // 90 | // copyDataToolStripMenuItem 91 | // 92 | resources.ApplyResources(this.copyDataToolStripMenuItem, "copyDataToolStripMenuItem"); 93 | this.copyDataToolStripMenuItem.Name = "copyDataToolStripMenuItem"; 94 | this.copyDataToolStripMenuItem.Click += new System.EventHandler(this.copyDataToolStripMenuItem_Click); 95 | // 96 | // copyDataasMdTableToolStripMenuItem 97 | // 98 | resources.ApplyResources(this.copyDataasMdTableToolStripMenuItem, "copyDataasMdTableToolStripMenuItem"); 99 | this.copyDataasMdTableToolStripMenuItem.Name = "copyDataasMdTableToolStripMenuItem"; 100 | this.copyDataasMdTableToolStripMenuItem.Click += new System.EventHandler(this.copyDataasMdTableToolStripMenuItem_Click); 101 | // 102 | // TranslationProgress 103 | // 104 | resources.ApplyResources(this, "$this"); 105 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 106 | this.Controls.Add(this.tableLayoutPanel1); 107 | this.Name = "TranslationProgress"; 108 | this.Load += new System.EventHandler(this.TranslationStatistics_Load); 109 | this.tableLayoutPanel1.ResumeLayout(false); 110 | ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit(); 111 | this.panel1.ResumeLayout(false); 112 | this.panel1.PerformLayout(); 113 | this.contextMenu.ResumeLayout(false); 114 | this.ResumeLayout(false); 115 | 116 | } 117 | 118 | #endregion 119 | 120 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 121 | private System.Windows.Forms.DataVisualization.Charting.Chart chart; 122 | private System.Windows.Forms.ContextMenuStrip contextMenu; 123 | private System.Windows.Forms.ToolStripMenuItem copyDataToolStripMenuItem; 124 | private System.Windows.Forms.ToolStripMenuItem copyDataasMdTableToolStripMenuItem; 125 | private System.Windows.Forms.Panel panel1; 126 | private System.Windows.Forms.Label lblTranslationCount; 127 | private System.Windows.Forms.Label label1; 128 | } 129 | } -------------------------------------------------------------------------------- /tabler/Forms/TranslationProgress.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows.Forms; 6 | using System.Windows.Forms.DataVisualization.Charting; 7 | using tabler.Logic.Classes; 8 | using tabler.Properties; 9 | 10 | namespace tabler 11 | { 12 | public partial class TranslationProgress : Form 13 | { 14 | private readonly GridUI _myParent; 15 | 16 | public TranslationProgress(GridUI parent) 17 | { 18 | _myParent = parent; 19 | InitializeComponent(); 20 | } 21 | 22 | private void TranslationStatistics_Load(object sender, EventArgs e) 23 | { 24 | chart.ContextMenuStrip = contextMenu; 25 | 26 | _myParent.TranslationHelper.TranslationComponents.Statistics = _myParent.TranslationHelper.TranslationComponents.Statistics.OrderBy(x => x.LanguageName).ToList(); 27 | 28 | lblTranslationCount.Text = _myParent.TranslationHelper.TranslationComponents.KeyCount.ToString(); 29 | 30 | PopulateChart(); 31 | } 32 | 33 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 34 | { 35 | if (keyData == Keys.Escape) 36 | { 37 | Close(); 38 | return true; 39 | } 40 | return base.ProcessCmdKey(ref msg, keyData); 41 | } 42 | 43 | 44 | private void PopulateChart() 45 | { 46 | var inc = 0; 47 | 48 | var series = new Series("Missing Translations") 49 | { 50 | IsVisibleInLegend = false, 51 | XValueType = ChartValueType.String 52 | }; 53 | 54 | var highestCount = 0; 55 | 56 | foreach (var header in _myParent.TranslationHelper.TranslationComponents.Headers) 57 | { 58 | if (header == "ID") 59 | { 60 | continue; 61 | } 62 | 63 | DataPoint dataPoint; 64 | 65 | var modInfoStat = _myParent.TranslationHelper.TranslationComponents.Statistics.FirstOrDefault(s => s.LanguageName.ToLower().Equals(header.ToLower())); 66 | 67 | if (modInfoStat == null) 68 | { 69 | dataPoint = new DataPoint(inc, 0) 70 | { 71 | AxisLabel = header, 72 | Label = "0" 73 | }; 74 | } 75 | else 76 | { 77 | var missingTranslationCount = GetMissingTranslationCount(modInfoStat); 78 | 79 | if (missingTranslationCount > highestCount) 80 | { 81 | highestCount = missingTranslationCount; 82 | } 83 | 84 | 85 | dataPoint = new DataPoint(inc, missingTranslationCount) 86 | { 87 | AxisLabel = modInfoStat.LanguageName, 88 | Label = missingTranslationCount.ToString(CultureInfo.CurrentCulture), 89 | ToolTip = AggregateMods(modInfoStat, "\n") 90 | }; 91 | } 92 | 93 | 94 | series.Points.Add(dataPoint); 95 | 96 | inc += 1; 97 | } 98 | 99 | chart.Series.Add(series); 100 | 101 | var chartArea = chart.ChartAreas.FirstOrDefault(); 102 | if (chartArea != null) 103 | { 104 | chartArea.AxisX.MajorGrid.Enabled = false; 105 | chartArea.AxisX.Title = Resources.TranslationProgress_AxisX_Title; 106 | chartArea.AxisY.Title = Resources.TranslationProgress_AxisY_Title; 107 | 108 | chartArea.AxisY.Interval = 10.0; 109 | 110 | if (highestCount > 100) 111 | { 112 | chartArea.AxisY.Interval = 25.0; 113 | } 114 | 115 | if (highestCount > 1000) 116 | { 117 | chartArea.AxisY.Interval = 100.0; 118 | } 119 | } 120 | } 121 | 122 | private static int GetMissingTranslationCount(LanguageStatistics modInfoStatistics) 123 | { 124 | return modInfoStatistics.MissingModStrings.Sum(ms => ms.Value); 125 | } 126 | 127 | private static string AggregateMods(LanguageStatistics modInfoStatistics, string seperator) 128 | { 129 | return modInfoStatistics.MissingModStrings.Select(ms => ms.Key).ToList().Aggregate((cur, next) => cur + seperator + next); 130 | } 131 | 132 | private void copyDataToolStripMenuItem_Click(object sender, EventArgs e) 133 | { 134 | var outerSb = new StringBuilder(); 135 | var innterSb = new StringBuilder(); 136 | 137 | var total = 0; 138 | 139 | foreach (var modInfoStatistics in _myParent.TranslationHelper.TranslationComponents.Statistics) 140 | { 141 | var missingTranslationCount = GetMissingTranslationCount(modInfoStatistics); 142 | var mods = AggregateMods(modInfoStatistics, ", "); 143 | 144 | total += missingTranslationCount; 145 | 146 | var spacer = "".PadRight(15 - modInfoStatistics.LanguageName.Length); 147 | 148 | innterSb.AppendLine(string.Format("{0}{1}{2} missing stringtable entry/entries. ({3})", modInfoStatistics.LanguageName, spacer, missingTranslationCount.ToString().PadLeft(3), mods)); 149 | } 150 | 151 | outerSb.AppendLine(string.Format("Total number of keys: {0}", _myParent.TranslationHelper.TranslationComponents.KeyCount)); 152 | outerSb.AppendLine(string.Format("Total number of missing translations: {0}", total)); 153 | outerSb.AppendLine(""); 154 | outerSb.Append(innterSb); 155 | 156 | Clipboard.SetText(outerSb.ToString()); 157 | } 158 | 159 | private void copyDataasMdTableToolStripMenuItem_Click(object sender, EventArgs e) 160 | { 161 | var outerSb = new StringBuilder(); 162 | var innerSb = new StringBuilder(); 163 | 164 | var totalKeys = _myParent.TranslationHelper.TranslationComponents.KeyCount; 165 | 166 | 167 | foreach (var modInfoStatistics in _myParent.TranslationHelper.TranslationComponents.Statistics) 168 | { 169 | var missingTranslationCount = GetMissingTranslationCount(modInfoStatistics); 170 | var mods = AggregateMods(modInfoStatistics, ", "); 171 | 172 | var percentage = (totalKeys - (double) missingTranslationCount) / totalKeys * 100; 173 | 174 | innerSb.AppendLine(string.Format("| {0} | {1} | {2} | {3} |", modInfoStatistics.LanguageName, missingTranslationCount, mods, Math.Round(percentage, 1))); 175 | } 176 | 177 | outerSb.AppendLine(DateTime.Now.ToString("yyMMdd HH:mm")); 178 | outerSb.AppendLine(string.Format("Total number of keys: {0}", totalKeys)); 179 | outerSb.AppendLine(""); 180 | outerSb.AppendLine("| Language | Missing Entries | Relevant Modules | % done |"); 181 | outerSb.AppendLine("|----------|----------------:|------------------|--------|"); 182 | 183 | outerSb.Append(innerSb); 184 | 185 | Clipboard.SetText(outerSb.ToString()); 186 | } 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /tabler/Forms/WaitingForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace tabler.Forms 2 | { 3 | partial class WaitingForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.progressBar1 = new System.Windows.Forms.ProgressBar(); 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.panel1.SuspendLayout(); 34 | this.SuspendLayout(); 35 | // 36 | // progressBar1 37 | // 38 | this.progressBar1.Dock = System.Windows.Forms.DockStyle.Fill; 39 | this.progressBar1.Location = new System.Drawing.Point(0, 0); 40 | this.progressBar1.Name = "progressBar1"; 41 | this.progressBar1.Size = new System.Drawing.Size(318, 44); 42 | this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee; 43 | this.progressBar1.TabIndex = 0; 44 | // 45 | // panel1 46 | // 47 | this.panel1.Controls.Add(this.progressBar1); 48 | this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; 49 | this.panel1.Location = new System.Drawing.Point(0, 0); 50 | this.panel1.Name = "panel1"; 51 | this.panel1.Size = new System.Drawing.Size(318, 44); 52 | this.panel1.TabIndex = 1; 53 | // 54 | // WaitingForm 55 | // 56 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 57 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 58 | this.ClientSize = new System.Drawing.Size(318, 44); 59 | this.ControlBox = false; 60 | this.Controls.Add(this.panel1); 61 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 62 | this.Name = "WaitingForm"; 63 | this.ShowInTaskbar = false; 64 | this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; 65 | this.Text = "WaitingForm"; 66 | this.TopMost = true; 67 | this.panel1.ResumeLayout(false); 68 | this.ResumeLayout(false); 69 | 70 | } 71 | 72 | #endregion 73 | 74 | private System.Windows.Forms.ProgressBar progressBar1; 75 | private System.Windows.Forms.Panel panel1; 76 | } 77 | } -------------------------------------------------------------------------------- /tabler/Forms/WaitingForm.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Threading; 3 | using System.Windows.Forms; 4 | using Microsoft.WindowsAPICodePack.Taskbar; 5 | 6 | namespace tabler.Forms 7 | { 8 | public partial class WaitingForm : Form 9 | { 10 | private static Thread _waitingThread; 11 | private static WaitingForm _waitingForm; 12 | private static Form _parentForm; 13 | 14 | public WaitingForm(Form parentForm) 15 | { 16 | InitializeComponent(); 17 | 18 | var startX = (parentForm.Width - ClientSize.Width) / 2; 19 | var startY = (parentForm.Height - ClientSize.Height) / 2; 20 | 21 | Location = new Point(parentForm.Location.X + startX, parentForm.Location.Y + startY); 22 | 23 | progressBar1.MarqueeAnimationSpeed = 30; 24 | TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.Normal); 25 | } 26 | 27 | public static void ShowForm(Form parentForm) 28 | { 29 | _parentForm = parentForm; 30 | _waitingThread = new Thread(ThreadTask) {IsBackground = false}; 31 | _waitingThread.Start(); 32 | } 33 | 34 | private static void ThreadTask(object owner) 35 | { 36 | _waitingForm = new WaitingForm(_parentForm); 37 | _waitingForm.Owner = (Form) owner; 38 | Application.Run(_waitingForm); 39 | } 40 | 41 | public static void CloseDialogDown() 42 | { 43 | Application.ExitThread(); 44 | } 45 | 46 | public static void CloseForm() 47 | { 48 | while (_waitingForm == null || !_waitingForm.IsHandleCreated) 49 | { 50 | Thread.Sleep(10); 51 | } 52 | 53 | TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.NoProgress); 54 | 55 | var mi = new MethodInvoker(CloseDialogDown); 56 | _waitingForm.Invoke(mi); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tabler/Forms/WaitingForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /tabler/Helper/GitHubHelper.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Net; 3 | using System.Text; 4 | using System.Threading.Tasks; 5 | using Newtonsoft.Json; 6 | 7 | namespace tabler.Helper 8 | { 9 | public class GitHubHelper 10 | { 11 | private const string RELEASE_URL = "https://api.github.com/repos/bux578/tabler/releases"; 12 | 13 | public async Task GetUrlContentsAsync(string url) 14 | { 15 | // The downloaded resource ends up in the variable named content. 16 | var content = new MemoryStream(); 17 | 18 | // Initialize an HttpWebRequest for the current URL. 19 | var webReq = (HttpWebRequest)WebRequest.Create(url); 20 | webReq.Method = "GET"; 21 | webReq.Accept = "application/vnd.github.v3+json"; 22 | webReq.UserAgent = "tabler"; 23 | 24 | var result = ""; 25 | var serializer = new JsonSerializer(); 26 | 27 | // Send the request to the Internet resource and wait for 28 | // the response. 29 | using (WebResponse response = await webReq.GetResponseAsync()) 30 | { 31 | 32 | using (var sr = new StreamReader(response.GetResponseStream())) 33 | { 34 | 35 | using (var jsonTextReader = new JsonTextReader(sr)) 36 | { 37 | try 38 | { 39 | return serializer.Deserialize(jsonTextReader); 40 | } 41 | catch (System.Exception) 42 | { 43 | 44 | throw; 45 | } 46 | 47 | } 48 | 49 | 50 | 51 | 52 | } 53 | 54 | //using (Stream responseStream = response.GetResponseStream()) { 55 | // await responseStream.CopyToAsync(content); 56 | //} 57 | } 58 | 59 | //return content.ToArray(); 60 | //return result; 61 | } 62 | 63 | public object GetGitRepo(string url) 64 | { 65 | 66 | // The downloaded resource ends up in the variable named content. 67 | //var content = new MemoryStream(); 68 | 69 | // Initialize an HttpWebRequest for the current URL. 70 | var webReq = (HttpWebRequest)WebRequest.Create(url); 71 | webReq.Method = "GET"; 72 | webReq.Accept = "application/vnd.github.v3+json"; 73 | webReq.UserAgent = "tabler"; 74 | webReq.MediaType = "UTF-8"; 75 | 76 | var result = ""; 77 | 78 | 79 | // Send the request to the Internet resource and wait for 80 | // the response. 81 | using (WebResponse response = webReq.GetResponse()) 82 | { 83 | 84 | using (var sr = new StreamReader(response.GetResponseStream())) 85 | { 86 | 87 | using (var jsonTextReader = new JsonTextReader(sr)) 88 | { 89 | try 90 | { 91 | 92 | 93 | 94 | 95 | 96 | var serializer = new JsonSerializer(); 97 | return serializer.Deserialize(jsonTextReader); 98 | } 99 | catch (System.Exception) 100 | { 101 | 102 | throw; 103 | } 104 | 105 | } 106 | 107 | 108 | 109 | 110 | } 111 | 112 | //using (Stream responseStream = response.GetResponseStream()) { 113 | // await responseStream.CopyToAsync(content); 114 | //} 115 | } 116 | 117 | //return content.ToArray(); 118 | //return result; 119 | 120 | 121 | } 122 | 123 | 124 | public async Task GetJsonAsync(string url) 125 | { 126 | var content = new MemoryStream(); 127 | 128 | // Initialize an HttpWebRequest for the current URL. 129 | var webReq = (HttpWebRequest)WebRequest.Create(url); 130 | webReq.Method = "GET"; 131 | webReq.Accept = "application/vnd.github.v3+json"; 132 | webReq.UserAgent = "tabler"; 133 | 134 | // Send the request to the Internet resource and wait for 135 | // the response. 136 | // Note: you can't use HttpWebRequest.GetResponse in a Windows Store app. 137 | using (WebResponse response = await webReq.GetResponseAsync()) 138 | { 139 | // Get the data stream that is associated with the specified URL. 140 | using (Stream responseStream = response.GetResponseStream()) 141 | { 142 | // Read the bytes in responseStream and copy them to content. 143 | await responseStream.CopyToAsync(content); 144 | 145 | 146 | var serializer = new JsonSerializer(); 147 | 148 | using (var sr = new StreamReader(content)) 149 | using (var jsonTextReader = new JsonTextReader(sr)) 150 | { 151 | return serializer.Deserialize(jsonTextReader); 152 | } 153 | 154 | } 155 | } 156 | 157 | 158 | } 159 | } 160 | } -------------------------------------------------------------------------------- /tabler/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows.Forms; 4 | 5 | namespace tabler 6 | { 7 | internal static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | private static void Main(string[] args) 14 | { 15 | if (!args.Any()) 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new GridUI()); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tabler/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("tabler")] 8 | [assembly: AssemblyDescription("Arma 3 Translation Helper")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("https://github.com/bux/tabler/")] 11 | [assembly: AssemblyProduct("tabler")] 12 | [assembly: AssemblyCopyright("© Copyright MaMilaCan, bux")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("570ff6fa-19a8-48c1-b9da-f47a8ac91233")] 23 | 24 | // http://semver.org/ 25 | // Version information for an assembly consists of the following values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Patch 30 | 31 | [assembly: AssemblyVersion("1.0.0")] 32 | [assembly: AssemblyFileVersion("1.0.0")] 33 | -------------------------------------------------------------------------------- /tabler/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace tabler.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("tabler.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to Current version is up to date. 65 | /// 66 | internal static string GridUI_CheckForNewVersion_Current_version_is_up_to_date { 67 | get { 68 | return ResourceManager.GetString("GridUI_CheckForNewVersion_Current_version_is_up_to_date", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to Download the new version at. 74 | /// 75 | internal static string GridUI_CheckForNewVersion_Download_the_new_version_at { 76 | get { 77 | return ResourceManager.GetString("GridUI_CheckForNewVersion_Download_the_new_version_at", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// Looks up a localized string similar to New version available. 83 | /// 84 | internal static string GridUI_CheckForNewVersion_New_version_available { 85 | get { 86 | return ResourceManager.GetString("GridUI_CheckForNewVersion_New_version_available", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// Looks up a localized string similar to Discard all changes?. 92 | /// 93 | internal static string GridUI_Discard_all_changes { 94 | get { 95 | return ResourceManager.GetString("GridUI_Discard_all_changes", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// Looks up a localized string similar to Duplicate Key(s) found. 101 | ///Name: '{0}' 102 | ///File: '{1}' 103 | ///Entry: '{2}'. 104 | /// 105 | internal static string GridUI_Duplicate_key_found { 106 | get { 107 | return ResourceManager.GetString("GridUI_Duplicate_key_found", resourceCulture); 108 | } 109 | } 110 | 111 | /// 112 | /// Looks up a localized string similar to Duplicate Key Error. 113 | /// 114 | internal static string GridUI_Duplicate_key_found_title { 115 | get { 116 | return ResourceManager.GetString("GridUI_Duplicate_key_found_title", resourceCulture); 117 | } 118 | } 119 | 120 | /// 121 | /// Looks up a localized string similar to Exit?. 122 | /// 123 | internal static string GridUI_Exit { 124 | get { 125 | return ResourceManager.GetString("GridUI_Exit", resourceCulture); 126 | } 127 | } 128 | 129 | /// 130 | /// Looks up a localized string similar to Generic XML Exception. 131 | ///Name: '{0}' 132 | ///File: '{1}' 133 | ///Entry: '{2}'. 134 | /// 135 | internal static string GridUI_Generic_xml_exception { 136 | get { 137 | return ResourceManager.GetString("GridUI_Generic_xml_exception", resourceCulture); 138 | } 139 | } 140 | 141 | /// 142 | /// Looks up a localized string similar to XML Exception. 143 | /// 144 | internal static string GridUI_Generic_xml_exception_title { 145 | get { 146 | return ResourceManager.GetString("GridUI_Generic_xml_exception_title", resourceCulture); 147 | } 148 | } 149 | 150 | /// 151 | /// Looks up a localized string similar to Malformed Stringtable Encountered. 152 | ///File: '{0}' 153 | ///Message: '{1}' 154 | /// 155 | ///More information: https://community.bistudio.com/wiki/Stringtable.xml. 156 | /// 157 | internal static string GridUI_Malformed_Stringtable_exception { 158 | get { 159 | return ResourceManager.GetString("GridUI_Malformed_Stringtable_exception", resourceCulture); 160 | } 161 | } 162 | 163 | /// 164 | /// Looks up a localized string similar to Malformed Stringtable. 165 | /// 166 | internal static string GridUI_Malformed_Stringtable_exception_title { 167 | get { 168 | return ResourceManager.GetString("GridUI_Malformed_Stringtable_exception_title", resourceCulture); 169 | } 170 | } 171 | 172 | /// 173 | /// Looks up a localized string similar to No 'stringtable.xml' files found.. 174 | /// 175 | internal static string GridUI_No_stringtable_xml_files_found { 176 | get { 177 | return ResourceManager.GetString("GridUI_No_stringtable_xml_files_found", resourceCulture); 178 | } 179 | } 180 | 181 | /// 182 | /// Looks up a localized string similar to Open?. 183 | /// 184 | internal static string GridUI_Open { 185 | get { 186 | return ResourceManager.GetString("GridUI_Open", resourceCulture); 187 | } 188 | } 189 | 190 | /// 191 | /// Looks up a localized string similar to Successfully saved.. 192 | /// 193 | internal static string GridUI_saveToolStripMenuItem_Click_Successfully_saved { 194 | get { 195 | return ResourceManager.GetString("GridUI_saveToolStripMenuItem_Click_Successfully_saved", resourceCulture); 196 | } 197 | } 198 | 199 | /// 200 | /// Looks up a localized string similar to Languages. 201 | /// 202 | internal static string TranslationProgress_AxisX_Title { 203 | get { 204 | return ResourceManager.GetString("TranslationProgress_AxisX_Title", resourceCulture); 205 | } 206 | } 207 | 208 | /// 209 | /// Looks up a localized string similar to Number of Missing Translations. 210 | /// 211 | internal static string TranslationProgress_AxisY_Title { 212 | get { 213 | return ResourceManager.GetString("TranslationProgress_AxisY_Title", resourceCulture); 214 | } 215 | } 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /tabler/Properties/Resources.de.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Aktuelle Version ist auf dem neusten Stand 122 | 123 | 124 | Neuere Version hier herunterladen 125 | 126 | 127 | Neuere Version verfügbar 128 | 129 | 130 | Änderungen verwerfen? 131 | 132 | 133 | Doppelte(n) Key(s) gefunden. 134 | Name: '{0}' 135 | Datei: '{1}' 136 | Eintrag: '{2}' 137 | 138 | 139 | Doppelten Key gefunden 140 | 141 | 142 | Beenden? 143 | 144 | 145 | Allgemeiner XML-Fehler. 146 | Name: '{0}' 147 | Datei: '{1}' 148 | Eintrag: '{2}' 149 | 150 | 151 | XML-Fehler 152 | 153 | 154 | Fehlerhaftes Format einer Stringtable-Datei gefunden. 155 | Datei: '{0}' 156 | Nachricht: '{1}' 157 | 158 | Mehr Informationen unter: https://community.bistudio.com/wiki/Stringtable.xml 159 | 160 | 161 | Fehlerhaftes Stringtable Format 162 | 163 | 164 | Keine 'stringtable.xml'-Dateien gefunden. 165 | 166 | 167 | Öffnen? 168 | 169 | 170 | Erfolgreich gespeichert 171 | 172 | 173 | Sprachen 174 | 175 | 176 | Anzahl fehlender Übersetzungen 177 | 178 | -------------------------------------------------------------------------------- /tabler/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Discard all changes? 122 | 123 | 124 | Duplicate Key(s) found. 125 | Name: '{0}' 126 | File: '{1}' 127 | Entry: '{2}' 128 | 129 | 130 | Duplicate Key Error 131 | 132 | 133 | Exit? 134 | That's a question 135 | 136 | 137 | Generic XML Exception. 138 | Name: '{0}' 139 | File: '{1}' 140 | Entry: '{2}' 141 | 142 | 143 | XML Exception 144 | 145 | 146 | No 'stringtable.xml' files found. 147 | 148 | 149 | New version available 150 | 151 | 152 | Current version is up to date 153 | 154 | 155 | Download the new version at 156 | 157 | 158 | Successfully saved. 159 | 160 | 161 | Languages 162 | 163 | 164 | Number of Missing Translations 165 | 166 | 167 | Malformed Stringtable Encountered. 168 | File: '{0}' 169 | Message: '{1}' 170 | 171 | More information: https://community.bistudio.com/wiki/Stringtable.xml 172 | 173 | 174 | Malformed Stringtable 175 | 176 | 177 | Open? 178 | 179 | -------------------------------------------------------------------------------- /tabler/Properties/Resources.ru.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | text/microsoft-resx 51 | 52 | 53 | 2.0 54 | 55 | 56 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 57 | 58 | 59 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 60 | 61 | 62 | Отменить все изменения? 63 | 64 | 65 | Найден дублирующийся ключ. 66 | Имя: '{0}' 67 | Файл: '{1}' 68 | Запись: '{2}' 69 | 70 | 71 | Ошибка дублирующихся ключей 72 | 73 | 74 | Выйти? 75 | 76 | 77 | Общее XML-исключение. 78 | Имя: '{0}' 79 | Файл: '{1}' 80 | Запись: '{2}' 81 | 82 | 83 | XML-исключение 84 | 85 | 86 | 'stringtable.xml' файлы не найдены. 87 | 88 | -------------------------------------------------------------------------------- /tabler/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace tabler.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tabler/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tabler/Properties/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 48 | 55 | 56 | 70 | -------------------------------------------------------------------------------- /tabler/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bux/tabler/c724d6b75f1937e48b94359be527c9422eda7aad/tabler/icon.ico -------------------------------------------------------------------------------- /tabler/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tabler/tabler.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {FE0D5379-28A9-47F8-86F5-19100816A8D9} 8 | WinExe 9 | Properties 10 | tabler 11 | tabler 12 | v4.7.2 13 | 512 14 | false 15 | 16 | C:\Users\dev\Documents\GitHub\tabler\tabler\dist\ 17 | true 18 | Disk 19 | false 20 | Foreground 21 | 7 22 | Days 23 | false 24 | false 25 | true 26 | 0 27 | 0.6.0.0 28 | false 29 | true 30 | true 31 | 32 | 33 | AnyCPU 34 | true 35 | full 36 | false 37 | bin\Debug\ 38 | DEBUG;TRACE 39 | prompt 40 | 4 41 | 42 | 43 | AnyCPU 44 | none 45 | true 46 | bin\Release\ 47 | TRACE 48 | prompt 49 | 4 50 | true 51 | 52 | 53 | icon.ico 54 | 55 | 56 | tabler.Program 57 | 58 | 59 | 212B362871CF9433B395E819B0543F09111C4C57 60 | 61 | 62 | tabler_TemporaryKey.pfx 63 | 64 | 65 | false 66 | 67 | 68 | false 69 | 70 | 71 | LocalIntranet 72 | 73 | 74 | Properties\app.manifest 75 | 76 | 77 | 78 | ..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll 79 | 80 | 81 | False 82 | ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | Form 103 | 104 | 105 | AboutBox.cs 106 | 107 | 108 | Form 109 | 110 | 111 | RemoveLanguage.cs 112 | 113 | 114 | Form 115 | 116 | 117 | AddLanguage.cs 118 | 119 | 120 | 121 | Form 122 | 123 | 124 | FindForm.cs 125 | 126 | 127 | Form 128 | 129 | 130 | GridUI.cs 131 | 132 | 133 | Form 134 | 135 | 136 | Form 137 | 138 | 139 | TabSelector.cs 140 | 141 | 142 | Form 143 | 144 | 145 | WaitingForm.cs 146 | 147 | 148 | 149 | 150 | 151 | Form 152 | 153 | 154 | SettingsForm.cs 155 | 156 | 157 | Form 158 | 159 | 160 | TranslationProgress.cs 161 | 162 | 163 | AboutBox.cs 164 | 165 | 166 | AboutBox.cs 167 | 168 | 169 | AboutBox.cs 170 | 171 | 172 | RemoveLanguage.cs 173 | 174 | 175 | RemoveLanguage.cs 176 | 177 | 178 | AddLanguage.cs 179 | 180 | 181 | AddLanguage.cs 182 | 183 | 184 | AddLanguage.cs 185 | 186 | 187 | FindForm.cs 188 | 189 | 190 | FindForm.cs 191 | 192 | 193 | GridUI.cs 194 | 195 | 196 | GridUI.cs 197 | 198 | 199 | GridUI.cs 200 | 201 | 202 | TabSelector.cs 203 | 204 | 205 | WaitingForm.cs 206 | 207 | 208 | ResXFileCodeGenerator 209 | Resources.Designer.cs 210 | Designer 211 | 212 | 213 | True 214 | Resources.resx 215 | True 216 | 217 | 218 | 219 | 220 | SettingsForm.cs 221 | 222 | 223 | SettingsForm.cs 224 | 225 | 226 | SettingsForm.cs 227 | 228 | 229 | TranslationProgress.cs 230 | 231 | 232 | TranslationProgress.cs 233 | 234 | 235 | TranslationProgress.cs 236 | 237 | 238 | 239 | 240 | 241 | 242 | Designer 243 | 244 | 245 | 246 | SettingsSingleFileGenerator 247 | Settings.Designer.cs 248 | 249 | 250 | True 251 | Settings.settings 252 | True 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | PreserveNewest 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | False 271 | Microsoft .NET Framework 4.5 %28x86 and x64%29 272 | true 273 | 274 | 275 | False 276 | .NET Framework 3.5 SP1 Client Profile 277 | false 278 | 279 | 280 | False 281 | .NET Framework 3.5 SP1 282 | false 283 | 284 | 285 | 286 | 287 | {651801fa-f7ae-4f9b-9a7c-2ddea5965440} 288 | tabler.Logic 289 | 290 | 291 | 292 | 299 | -------------------------------------------------------------------------------- /tabler/tabler.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | Yes --------------------------------------------------------------------------------