Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }