Chummer.LanguageManager.UpdateControls(System.Windows.Forms.Control)

Here are the examples of the csharp api class Chummer.LanguageManager.UpdateControls(System.Windows.Forms.Control) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

Project: chummer5a
Source File: clsLanguageManager.cs
private static void UpdateUserControl(UserControl objControl)
        {
            UpdateControls(objControl);
        }

2. Example

Project: chummer5a
Source File: clsLanguageManager.cs
private static void UpdateForm(Form objForm)
        {
            // Translatable items are identified by having a value in their Tag attribute. The contents of Tag is the string to lookup in the language list.
            // Update the Form itself.
            if (objForm.Tag != null)
            {
                objForm.Text = GetString(objForm.Tag.ToString());
            }

            // update any menu strip items that have tags
            if (objForm.MainMenuStrip != null)
            {
                foreach (ToolStripMenuItem objItem in objForm.MainMenuStrip.Items)
                    SetMenuItemsRecursively(objItem);
            }

            // Run through any StatusStrips.
            foreach (ToolStrip objStrip in objForm.Controls.OfType<ToolStrip>())
            {
                foreach (ToolStripStatusLabel tssLabel in objStrip.Items.OfType<ToolStripStatusLabel>())
                {
                    if (tssLabel.Tag != null)
                        tssLabel.Text = GetString(tssLabel.Tag.ToString());
                }
            }

            // Handle control over to the method that handles translating all of the other Controls.
            UpdateControls(objForm);
        }

3. Example

Project: chummer5a
Source File: clsLanguageManager.cs
private static void UpdateControls(Control objParent)
        {
            if (objParent == null)
 /n ..... /n //View Source file for more details /n }