public static void LoadStrings(string rootPath) { try { using (var fs = new FileStream(Path.Combine(rootPath, @".\strings\client_strings.xml"), FileMode.Open, FileAccess.Read)) using (var reader = XmlReader.Create(fs)) { XmlSerializer ser = new XmlSerializer(typeof(Strings)); StringIndex = (Strings)ser.Deserialize(reader); StringIndex.CreateIndex(); } } catch (Exception ex) { Debug.Print(ex.ToString()); } try { using (var fs = new FileStream(Path.Combine(rootPath, @".\strings\stringtable_dialog.xml"), FileMode.Open, FileAccess.Read)) using (var reader = XmlReader.Create(fs)) { XmlSerializer ser = new XmlSerializer(typeof(DialogStrings)); DialogStringIndex = (DialogStrings)ser.Deserialize(reader); DialogStringIndex.CreateIndex(); } } catch (Exception ex) { Debug.Print(ex.ToString()); } }