public TextPreview(Font font, CultureInfo locale) : this() { Thread.CurrentThread.CurrentUICulture = locale; ComponentResourceManager resources = new ComponentResourceManager(this.GetType()); Localizer.ApplyResourceToControl(resources, this, locale); Text = resources.GetString("$this.Text", locale); this.font = font; tText.Font = this.font; }
private void SetLanguage(Form form, CultureInfo lang) { Thread.CurrentThread.CurrentUICulture = lang; var resources = new ComponentResourceManager(form.GetType()); Localizer.ApplyResourceToControl(resources, trayMenu, lang); Localizer.ApplyResourceToControl(resources, form, lang); form.Text = resources.GetString("$this.Text", lang); lVersion.Text = String.Format("Version: {0}", Application.ProductVersion); }
public EditorForm(Image image, CultureInfo locale) : this() { imageBox1.Image = image; Thread.CurrentThread.CurrentUICulture = locale; var resources = new ComponentResourceManager(GetType()); Localizer.ApplyResourceToControl(resources, this, locale); Text = resources.GetString("$this.Text", locale); nSize.Value = Settings.Instance.BrushWidth; cForeColor.SelectedColor = Settings.Instance.ForeColor; cBackColor.SelectedColor = Settings.Instance.BackColor; Load += (s, e) => Helper.SetForegroundWindow(Handle); }