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.statusLabel.Content = null;

            foreach (Window dlg in this.OwnedWindows)
            {
                HtmlHelpDialog helpForm = dlg as HtmlHelpDialog;
                if (helpForm != null)
                {
                    helpForm.Title = 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>
        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.º 3
0
        /// <summary>
        /// Changes localized text and messages
        /// </summary>
        /// <param name="locale"></param>
        protected override void ChangeUILanguage(string locale)
        {
            base.ChangeUILanguage(locale);

            foreach (Window form in this.OwnedWindows)
            {
                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 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.º 5
0
        public virtual void ChangeUILanguage(string locale)
        {
            FormLocalizer localizer = new FormLocalizer(this, typeof(OptionsDialog));

            localizer.ApplyCulture(new CultureInfo(locale));
        }
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 = Properties.Resources.VietOCR_Help;
                }
            }

            this.contextMenuStrip1.ChangeUILanguage();
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Changes localized text and messages
 /// </summary>
 /// <param name="locale"></param>
 public virtual void ChangeUILanguage(string locale)
 {
     FormLocalizer localizer = new FormLocalizer(this, typeof(SplitPdfDialog));
     localizer.ApplyCulture(new CultureInfo(locale));
 }