Ejemplo n.º 1
0
 private void NewDocument()
 {
     m_TextProvider = new TextProvider();
     txNewCat.Text  = "";
     txDef.Text     = "";
     txText.Text    = "";
     lCat.Items.Clear();
     lDef.Items.Clear();
 }
Ejemplo n.º 2
0
        public Localizer()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            m_TextProvider = new TextProvider();
        }
Ejemplo n.º 3
0
		public static TextProvider Deserialize( string filename )
		{
			XmlDocument dom = new XmlDocument();

			dom.Load( filename );

			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;

				Hashtable hash = new Hashtable();

				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;
		}