Inheritance: System.Windows.Forms.Form
Example #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;
        }
Example #2
0
        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OwnedForms.Length > 0)
            {
                return;
            }

            HtmlHelpForm helpForm = new HtmlHelpForm(Properties.Resources.readme, strProgName + Properties.Resources._Help);

            helpForm.Owner = this;
            helpForm.Show();
        }
Example #3
0
        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OwnedForms.Length > 0)
            {
                return;
            }

            HtmlHelpForm helpForm = new HtmlHelpForm(resources.GetString("readme"), strProgName + resources.GetString("_Help"));

            helpForm.Owner = this;
            helpForm.Show();
        }
Example #4
0
        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OwnedForms.Length > 0)
            {
                foreach (Form form in this.OwnedForms)
                {
                    HtmlHelpForm helpForm1 = form as HtmlHelpForm;
                    if (helpForm1 != null)
                    {
                        helpForm1.Show();
                        helpForm1.WindowState = FormWindowState.Normal;
                        return;
                    }
                }
            }
            HtmlHelpForm helpForm = new HtmlHelpForm(Properties.Resources.readme, strProgName + Properties.Resources._Help);

            helpForm.Owner = this;
            helpForm.Show();
        }
Example #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;
                }
            }
        }
Example #6
0
File: GUI.cs Project: ADTC/VietOCR
 private void helpToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (OwnedForms.Length > 0)
     {
         foreach (Form form in this.OwnedForms)
         {
             HtmlHelpForm helpForm1 = form as HtmlHelpForm;
             if (helpForm1 != null)
             {
                 helpForm1.Show();
                 helpForm1.WindowState = FormWindowState.Normal;
                 return;
             }
         }
     }
     HtmlHelpForm helpForm = new HtmlHelpForm(Properties.Resources.readme, strProgName + Properties.Resources._Help);
     helpForm.Owner = this;
     helpForm.Show();
 }
Example #7
0
File: GUI.cs Project: ADTC/VietOCR
        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OwnedForms.Length > 0)
                return;

            HtmlHelpForm helpForm = new HtmlHelpForm(resources.GetString("readme"), strProgName + resources.GetString("_Help"));
            helpForm.Owner = this;
            helpForm.Show();
        }
Example #8
0
File: GUI.cs Project: ADTC/VietOCR
        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OwnedForms.Length > 0)
                return;

            HtmlHelpForm helpForm = new HtmlHelpForm(Properties.Resources.readme, strProgName + Properties.Resources._Help);
            helpForm.Owner = this;
            helpForm.Show();
        }