public MulManagerForm( MulManager manager ) { InitializeComponent(); m_Text = Pandora.Localization.TextProvider; Pandora.Localization.LocalizeControl( this ); m_Manager = manager; }
public MulManagerForm( MulManager manager, TextProvider tp ) { InitializeComponent(); m_Text = tp; Text = m_Text[ Text ]; foreach( Control c in Controls ) { c.Text = m_Text[ c.Text ]; foreach( Control c2 in c.Controls ) { c2.Text = m_Text[ c2.Text ]; } } m_Manager = manager; }
/// <summary> /// Reads a TextProvider item from an Xml document /// </summary> /// <param name="dom">The XmlDocument containing the object</param> /// <returns>A TextProvider object</returns> public static TextProvider Deserialize(XmlDocument dom) { XmlNode data = dom.ChildNodes[1]; TextProvider text = new TextProvider(); text.m_Language = data.Attributes["language"].Value; foreach (XmlNode section in data.ChildNodes) { string topkey = section.Attributes["name"].Value; Dictionary<string, string> hash = new Dictionary<string, string>(); foreach (XmlNode entry in section.ChildNodes) { string lowkey = entry.Attributes["name"].Value; string t = entry.Attributes["text"].Value; hash.Add(lowkey, t); } text.m_Sections.Add(topkey, hash); } return text; }