diff --git a/TestBenchFramework/LocalSettings.cs b/TestBenchFramework/LocalSettings.cs index 6ccc83528..ae34193fb 100644 --- a/TestBenchFramework/LocalSettings.cs +++ b/TestBenchFramework/LocalSettings.cs @@ -24,8 +24,17 @@ namespace TBF { en, de, + fr, + es, + it, + ru, + pl, + cz, sk, - Count, + hu, + ro, + cn, + Count, } /// diff --git a/TestBenchFramework/PrintOrderDocument.cs b/TestBenchFramework/PrintOrderDocument.cs index 8331afc50..da5542641 100644 --- a/TestBenchFramework/PrintOrderDocument.cs +++ b/TestBenchFramework/PrintOrderDocument.cs @@ -418,5 +418,10 @@ namespace TBF RectangleF printArea = new RectangleF(x, y, 667, SpacingOne); e.Graphics.DrawString(text, this.boldFont, Brushes.Black, printArea); } + + private void InitializeComponent() + { + + } } } diff --git a/TestBenchFramework/Resources/Strings.sk.resx b/TestBenchFramework/PrintOrderDocument.resx similarity index 51% rename from TestBenchFramework/Resources/Strings.sk.resx rename to TestBenchFramework/PrintOrderDocument.resx index 43d4b6faa..a825336ee 100644 --- a/TestBenchFramework/Resources/Strings.sk.resx +++ b/TestBenchFramework/PrintOrderDocument.resx @@ -117,172 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - zavri - - - Klapka - - - Vypúšťací ventil - - - Chyba - - - Nepodarilo sa načítať používateľov z databázy: - - - Nepodarilo sa vytvoriť vzorovú databázu: - - - Nepodarilo sa exportovať databázu: - - - Neplatný používateľ, heslo alebo meno stanice - - - Názov - - - otvor - - - Heslo - - - Čerpadlo - - - P vst. - - - P výst. - - - Q od - - - Q do - - - Etalón - - - Reg. ventil - - - Aby sa zmenilo nastavenie jazyka musíte preštartovať program. - - - Váha - - - Senzor - - - Testovacia stanica - - - T kl. - - - T vst. - - - T výst. - - - Meno používateľa - - - Tlakomer - - - Doba [s] - - - nie - - - áno - - - PStol - - - PNapaj. - - - PQ - - - Procedúra - - - PSens - - - Test - - - - kópia - - - Parametre stanice - - - Reťazec na vytvorenie spojenia - - - Vytvor DB - - - Typ databázy - - - Procedúry - - - Specifikácia databáz stanice - - - Stanica je riadená týmto počítačom - - - Názov stanice - - - Test spojenia - - - Používatelia a skupiny - - - Water meter data - - - Typy vodomerov - - - Logovanie - - - Režim - - - Parametre - - - Nadradený komponent - - - - - - Typ - - - Konfigurácia komponentov stanice - + + zh-CN + + + True + + + False + \ No newline at end of file diff --git a/TestBenchFramework/Program.cs b/TestBenchFramework/Program.cs index f137343ea..5fda62ca9 100644 --- a/TestBenchFramework/Program.cs +++ b/TestBenchFramework/Program.cs @@ -127,7 +127,16 @@ namespace TBF File.Copy(Program.LocalSettingsFileName, Program.LocalSettingsBackupName, true); } - System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(LocalSettings.Language); + try + { + System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(LocalSettings.Language); + } + catch + { + MessageBox.Show("Selected language not supported.\nUsing English.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en"); + } + /// This belongs to Application.Run(new MainWnd()) ... /// and should be executed before opening 'loginDlg' diff --git a/TestBenchFramework/Resources/Strings.cn.Designer.cs b/TestBenchFramework/Resources/Strings.cn.Designer.cs new file mode 100644 index 000000000..61654016a --- /dev/null +++ b/TestBenchFramework/Resources/Strings.cn.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace TBF.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings_cn { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings_cn() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TBF.Resources.Strings.cn", typeof(Strings_cn).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/TestBenchFramework/Resources/Strings.cn.resx b/TestBenchFramework/Resources/Strings.cn.resx new file mode 100644 index 000000000..4fdb1b6af --- /dev/null +++ b/TestBenchFramework/Resources/Strings.cn.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index c1cc2dcd1..84c47b835 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -676,6 +676,11 @@ + + True + True + Strings.cn.resx + UserControl @@ -1252,7 +1257,13 @@ TabNameDlg.cs - + + PrintOrderDocument.cs + + + ResXFileCodeGenerator + Strings.cn.Designer.cs + PicturesTabPageCtrl.cs