Example #1
0
 internal static void LoadItems(string root)
 {
     try {
         using (var fs = new FileStream(Path.Combine(root, @".\items\client_items.xml"),
                                        FileMode.Open, FileAccess.Read))
             using (var reader = XmlReader.Create(fs)) {
                 XmlSerializer ser = new XmlSerializer(typeof(ItemsFile));
                 ItemIndex = (ItemsFile)ser.Deserialize(reader);
                 ItemIndex.CreateIndex();
             }
     } catch (Exception ex) {
         Debug.Print(ex.ToString());
     }
 }
Example #2
0
 internal static void LoadItems(string root)
 {
     try {
         using (var fs = new FileStream(Path.Combine(root, @".\items\client_items.xml"),
                                        FileMode.Open, FileAccess.Read))
         using (var reader = XmlReader.Create(fs)) {
             XmlSerializer ser = new XmlSerializer(typeof(ItemsFile));
             ItemIndex = (ItemsFile)ser.Deserialize(reader);
             ItemIndex.CreateIndex();
         }
     } catch (Exception ex) {
         Debug.Print(ex.ToString());
     }
 }