Ejemplo n.º 1
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        protected virtual void ChangeUILanguage(string locale)
        {
            string imageProperties = this.toolStripStatusLabelDimValue.Text; // retain values of image properties in statusbar
            string totalPage       = this.toolStripLabelPageNum.Text;

            FormLocalizer localizer = new FormLocalizer(this, typeof(GUI));

            localizer.ApplyCulture(new CultureInfo(locale));

            this.toolStripStatusLabel1.Text = null;

            foreach (Form form in this.OwnedForms)
            {
                HtmlHelpForm helpForm = form as HtmlHelpForm;
                if (helpForm != null)
                {
                    helpForm.Text = Properties.Resources.VietOCR_Help;
                }
            }

            this.contextMenuStrip1.ChangeUILanguage();

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GUI));
            this.toolTip1.SetToolTip(this.buttonCollapseExpand, resources.GetString("buttonCollapseExpand.ToolTipText"));
            this.toolStripStatusLabelDimValue.Text = imageProperties; // restore prior values
            this.toolStripLabelPageNum.Text        = totalPage;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        protected override void ChangeUILanguage(string locale)
        {
            base.ChangeUILanguage(locale);
            FormLocalizer localizer = new FormLocalizer(this, typeof(GUIWithInputMethod));

            localizer.ApplyCulture(new CultureInfo(locale));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        protected override void ChangeUILanguage(string locale)
        {
            base.ChangeUILanguage(locale);

            foreach (Form form in this.OwnedForms)
            {
                ChangeCaseDialog changeCaseDlg = form as ChangeCaseDialog;
                if (changeCaseDlg != null)
                {
                    FormLocalizer localizer = new FormLocalizer(changeCaseDlg, typeof(ChangeCaseDialog));
                    localizer.ApplyCulture(new CultureInfo(locale));
                    break;
                }
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        protected override void ChangeUILanguage(string locale)
        {
            base.ChangeUILanguage(locale);
            FormLocalizer localizer = new FormLocalizer(this, typeof(GUIWithInputMethod));

            localizer.ApplyCulture(new CultureInfo(locale));

            //this.overviewToolStripMenuItem.Text = strProgName + " " + Properties.Resources.Help;
            //this.aboutToolStripMenuItem.Text = Properties.Resources.About + " " + strProgName;

            //if (!String.IsNullOrEmpty(sourceEncoding))
            //{
            //    this.comboBox1.Text = sourceEncoding;
            //}
            //this.comboBox1.SelectedItem = sourceEncoding;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        protected virtual void ChangeUILanguage(string locale)
        {
            FormLocalizer localizer = new FormLocalizer(this, typeof(GUI));

            localizer.ApplyCulture(new CultureInfo(locale));

            if (imageTotal > 0)
            {
                this.lblCurIndex.Text = Properties.Resources.Page_ + (imageIndex + 1) + Properties.Resources._of_ + imageTotal;
            }

            this.toolStripStatusLabel1.Text = null;

            foreach (Form form in this.OwnedForms)
            {
                HtmlHelpForm helpForm = form as HtmlHelpForm;
                if (helpForm != null)
                {
                    helpForm.Text = strProgName + Properties.Resources._Help;
                }
            }
        }
Ejemplo n.º 6
0
Archivo: GUI.cs Proyecto: ADTC/VietOCR
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        protected virtual void ChangeUILanguage(string locale)
        {
            FormLocalizer localizer = new FormLocalizer(this, typeof(GUI));
            localizer.ApplyCulture(new CultureInfo(locale));

            if (imageTotal > 0)
            {
                this.lblCurIndex.Text = Properties.Resources.Page_ + (imageIndex + 1) + Properties.Resources._of_ + imageTotal;
            }

            this.toolStripStatusLabel1.Text = null;

            foreach (Form form in this.OwnedForms)
            {
                HtmlHelpForm helpForm = form as HtmlHelpForm;
                if (helpForm != null)
                {
                    helpForm.Text = strProgName + Properties.Resources._Help;
                }
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Changes localized text and messages
 /// </summary>
 /// <param name="locale"></param>
 /// <param name="firstTime"></param>
 public virtual void ChangeUILanguage(string locale)
 {
     FormLocalizer localizer = new FormLocalizer(this, typeof(WatchForm));
     localizer.ApplyCulture(new CultureInfo(locale));
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        public virtual void ChangeUILanguage(string locale)
        {
            FormLocalizer localizer = new FormLocalizer(this, typeof(OptionsDialog));

            localizer.ApplyCulture(new CultureInfo(locale));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        protected override void UpdateUI(string locale)
        {
            base.UpdateUI(locale);
            FormLocalizer localizer = new FormLocalizer(this, typeof(GUIWithInputMethod));
            localizer.ApplyCulture(new CultureInfo(locale));

            //this.overviewToolStripMenuItem.Text = strProgName + " " + Properties.Resources.Help;
            //this.aboutToolStripMenuItem.Text = Properties.Resources.About + " " + strProgName;

            //if (!String.IsNullOrEmpty(sourceEncoding))
            //{
            //    this.comboBox1.Text = sourceEncoding;
            //}
            //this.comboBox1.SelectedItem = sourceEncoding;
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Changes localized text and messages
 /// </summary>
 /// <param name="locale"></param>
 /// <param name="firstTime"></param>
 protected override void ChangeUILanguage(string locale)
 {
     base.ChangeUILanguage(locale);
     FormLocalizer localizer = new FormLocalizer(this, typeof(GUIWithInputMethod));
     localizer.ApplyCulture(new CultureInfo(locale));
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="firstTime"></param>
        protected override void ChangeUILanguage(string locale)
        {
            base.ChangeUILanguage(locale);

            foreach (Form form in this.OwnedForms)
            {
                ChangeCaseDialog changeCaseDlg = form as ChangeCaseDialog;
                if (changeCaseDlg != null)
                {
                    FormLocalizer localizer = new FormLocalizer(changeCaseDlg, typeof(ChangeCaseDialog));
                    localizer.ApplyCulture(new CultureInfo(locale));
                    break;
                }
            }
        }