/// <summary> /// Creates an instance of the class as new language /// </summary> /// <param name="parent">parent collection</param> /// <param name="template">role model</param> internal ToolLanguage(ToolLanguages parent, ToolLanguage template) { _parent = parent; _name = "New Language"; _nameGlobal = "New Language"; _lcid = 0; Initialize(); foreach (var item in template.Application.Components[0].ControlResources) { Application.Components[0].ControlResources[item.Value].Value2 = item.Value2; } foreach (var item in template.Application.Components[1].ControlResources) { Application.Components[1].ControlResources[item.Value].Value2 = item.Value2; } for (int i = 0; i < template.Components.Count; i++) { LocalizableCompoment templateComponent = template.Components[i]; LocalizableCompoment ownComponent = Components[i]; foreach (var item in templateComponent.ControlResources) { ownComponent.ControlResources[item.Value].Value2 = item.Value2; } } IsNew = true; }
/// <summary> /// Creates an instance of the class /// </summary> /// <param name="parent">parent collection</param> /// <param name="name">default kind</param> internal ToolDefaultLanguage(ToolLanguages parent, ToolDefaultLanguageName name) : base(parent, "", 1000) { DefaultLanguageName = name; }
/// <summary> /// Creates an instance of the class as existing language /// </summary> /// <param name="parent">parent collection</param> /// <param name="nameGlobal">international name</param> /// <param name="lcid">language id</param> internal ToolLanguage(ToolLanguages parent, string nameGlobal, int lcid) { _parent = parent; _nameGlobal = nameGlobal; _lcid = lcid; }