Click here to Skip to main content
15,897,273 members
Articles / Desktop Programming / Windows Forms

UICultureChanger component

Rate me:
Please Sign up or sign in to vote.
4.67/5 (35 votes)
20 Aug 2006LGPL313 min read 163.3K   2.1K   113  
Presents a lightweight component that enables you to easily change the culture of your user interface at runtime.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>UICultureChanger</name>
    </assembly>
    <members>
        <member name="T:Troschuetz.UICultureChanger">
            <summary>
            Enables changes of the UI culture of a collection of <see cref="T:System.Windows.Forms.Form"/> objects at runtime.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.forms">
            <summary>
            Stores a collection of <see cref="T:System.Windows.Forms.Form"/> objects whose UI culture will be changed.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.applyText">
            <summary>
            Stores a value indicating whether localized Text values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.applySize">
            <summary>
            Stores a value indicating whether localized Size values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.applyLocation">
            <summary>
            Stores a value indicating whether localized Location values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.applyRightToLeft">
            <summary>
            Stores a value indicating whether localized RightToLeft values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.applyRightToLeftLayout">
            <summary>
            Stores a value indicating whether localized RightToLeftLayout values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.applyToolTip">
            <summary>
            Stores a value indicating whether localized ToolTip values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.applyHelp">
            <summary>
            Stores a value indicating whether localized Help values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.preserveFormSize">
            <summary>
            Stores a value indicating whether the Size values of forms remain unchanged when changing the UI culture.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.preserveFormLocation">
            <summary>
            Stores a value indicating whether the Location values of forms remain unchanged when changing the UI culture.
            </summary>
        </member>
        <member name="M:Troschuetz.UICultureChanger.#ctor">
            <summary>
            Initializes a new instance of the <see cref="T:Troschuetz.UICultureChanger"/> class.
            </summary>
        </member>
        <member name="M:Troschuetz.UICultureChanger.Dispose(System.Boolean)">
            <summary> 
            Releases the unmanaged resources used by the <see cref="T:Troschuetz.UICultureChanger"/> and optionally releases the managed 
              resources.
            </summary>
            <param name="disposing">
            <see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only 
              unmanaged resources. 
            </param>
        </member>
        <member name="M:Troschuetz.UICultureChanger.AddForm(System.Windows.Forms.Form)">
            <summary>
            Adds the specified <see cref="T:System.Windows.Forms.Form"/> object to the collection of forms whose UI cultures will be changed.
            </summary>
            <remarks>
            The <see cref="T:Troschuetz.UICultureChanger"/> component registers to the <see cref="E:System.Windows.Forms.Form.FormClosed"/> event of the specified
              <see cref="T:System.Windows.Forms.Form"/> object, so after being closed it can automatically be removed from the form collection.
            </remarks>
            <param name="form">The <see cref="T:System.Windows.Forms.Form"/> object to add to the end of the form collection.</param>
        </member>
        <member name="M:Troschuetz.UICultureChanger.RemoveForm(System.Windows.Forms.Form)">
            <summary>
            Removes the first occurrence of the specified <see cref="T:System.Windows.Forms.Form"/> object from the collection of forms 
              whose UI cultures will be changed.
            </summary>
            <param name="form">The <see cref="T:System.Windows.Forms.Form"/> object to remove from the form collection.</param>
            <returns>
            <see langword="true"/> if <paramref name="form"/> is successfully removed; otherwise, <see langword="false"/>. 
            This method also returns <see langword="false"/> if <paramref name="form"/> is a null reference 
              (<see langword="Nothing"/> in Visual Basic) or was not found in the form collection. 
            </returns>
        </member>
        <member name="M:Troschuetz.UICultureChanger.Form_FormClosed(System.Object,System.Windows.Forms.FormClosedEventArgs)">
            <summary>
            Removes the specified sender object from the collection of forms whose UI cultures will be changed, if it is a 
              <see cref="T:System.Windows.Forms.Form"/> object
            </summary>
            <param name="sender">The source of the event.</param>
            <param name="e">A <see cref="T:System.Windows.Forms.FormClosedEventArgs"/> object that contains the event data.</param>
        </member>
        <member name="M:Troschuetz.UICultureChanger.ApplyCulture(System.Globalization.CultureInfo)">
            <summary>
            Applies the specified <see cref="T:System.Globalization.CultureInfo"/> object to the <see cref="P:System.Threading.Thread.CurrentUICulture"/> field and 
              corresponding localized resources to all collected forms.
            </summary>
            <param name="cultureInfo">A <see cref="T:System.Globalization.CultureInfo"/> object representing the wanted UI culture.</param>
        </member>
        <member name="M:Troschuetz.UICultureChanger.ApplyCultureToForm(System.Windows.Forms.Form)">
            <summary>
            Applies localized resources to the specified <see cref="T:System.Windows.Forms.Form"/> object according to the 
              <see cref="P:System.Threading.Thread.CurrentUICulture"/>.
            </summary>
            <param name="form">The <see cref="T:System.Windows.Forms.Form"/> object to which changed UI culture should be applied.</param>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ApplyText">
            <summary>
            Gets or sets a value indicating whether localized Text values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ApplySize">
            <summary>
            Gets or sets a value indicating whether localized Size values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ApplyLocation">
            <summary>
            Gets or sets a value indicating whether localized Location values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ApplyRightToLeft">
            <summary>
            Gets or sets a value indicating whether localized RightToLeft values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ApplyRightToLeftLayout">
            <summary>
            Gets or sets a value indicating whether localized RightToLeftLayout values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ApplyToolTip">
            <summary>
            Gets or sets a value indicating whether localized ToolTip values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ApplyHelp">
            <summary>
            Gets or sets a value indicating whether localized Help values are applied when changing the UI culture.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.PreserveFormSize">
            <summary>
            Gets or sets a value indicating whether the Size values of forms remain unchanged when changing the UI culture.
            </summary>
            <remarks>
            This property has no effect unless <see cref="P:Troschuetz.UICultureChanger.ApplySize"/> is <see langword="true"/>.
            </remarks>
        </member>
        <member name="P:Troschuetz.UICultureChanger.PreserveFormLocation">
            <summary>
            Gets or sets a value indicating whether the Location values of forms remain unchanged when changing the UI culture.
            </summary>
            <remarks>
            This property has no effect unless <see cref="P:Troschuetz.UICultureChanger.ApplyLocation"/> is <see langword="true"/>.
            </remarks>
        </member>
        <member name="T:Troschuetz.UICultureChanger.UICultureChangerCodeDomSerializer">
            <summary>
            Serializes an object graph of <see cref="T:Troschuetz.UICultureChanger"/> class to a series of CodeDOM statements.
            </summary>
            <remarks>
            The <see cref="M:Troschuetz.UICultureChanger.UICultureChangerCodeDomSerializer.Serialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)"/> method is customized, so CodeStatement for the object construction 
              doesn't use the default constructor of <see cref="T:Troschuetz.UICultureChanger"/> class.
            </remarks>
        </member>
        <member name="M:Troschuetz.UICultureChanger.UICultureChangerCodeDomSerializer.Deserialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)">
            <summary>
            Deserializes the specified serialized CodeDOM object into an object.
            </summary>
            <param name="manager">
            A serialization manager interface that is used during the deserialization process.
            </param>
            <param name="codeObject">A serialized CodeDOM object to deserialize.</param>
            <returns>The deserialized CodeDOM object.</returns>
        </member>
        <member name="M:Troschuetz.UICultureChanger.UICultureChangerCodeDomSerializer.Serialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)">
            <summary>
            Serializes the specified object into a CodeDOM object.
            </summary>
            <param name="manager">The serialization manager to use during serialization.</param>
            <param name="value">The object to serialize.</param>
            <returns>A CodeDOM object representing the object that has been serialized.</returns>
        </member>
        <member name="T:Troschuetz.UICultureChanger.ChangeInfo">
            <summary>
            Encapsulates all information needed to apply localized resources to a form or field.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.ChangeInfo.name">
            <summary>
            Stores the name of the form or field.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.ChangeInfo.value">
            <summary>
            Stores the instance of the form or field.
            </summary>
        </member>
        <member name="F:Troschuetz.UICultureChanger.ChangeInfo.type">
            <summary>
            Stores the <see cref="P:Troschuetz.UICultureChanger.ChangeInfo.Type"/> object of the form or field.
            </summary>
        </member>
        <member name="M:Troschuetz.UICultureChanger.ChangeInfo.#ctor(System.String,System.Object,System.Type)">
            <summary>
            Initializes a new instance of the <see cref="T:Troschuetz.UICultureChanger.ChangeInfo"/> class.
            </summary>
            <param name="name">The name of the form or field.</param>
            <param name="value">The instance of the form or field.</param>
            <param name="type">The <see cref="P:Troschuetz.UICultureChanger.ChangeInfo.Type"/> object of the form or field.</param>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ChangeInfo.Name">
            <summary>
            Gets the name of the form or field.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ChangeInfo.Value">
            <summary>
            Gets the instance of the form or field.
            </summary>
        </member>
        <member name="P:Troschuetz.UICultureChanger.ChangeInfo.Type">
            <summary>
            Gets the <see cref="P:Troschuetz.UICultureChanger.ChangeInfo.Type"/> object of the form or field.
            </summary>
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Software Developer
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions