public void InitBookData() { IEnumerable <XElement> enumerable = Utils.Xml_Result("mst_shiptext", "mst_shiptext", null); IEnumerable <XElement> enumerable2 = Utils.Xml_Result("mst_slotitemtext", "mst_slotitemtext", null); IEnumerable <XElement> enumerable3 = Utils.Xml_Result("mst_ship_class", "mst_ship_class", null); this.tempShipBookText = Enumerable.ToDictionary <XElement, int, string>(enumerable, (XElement key) => int.Parse(key.Element("Id").get_Value()), (XElement value) => value.Element("Sinfo").get_Value()); this.tempSlotBookText = Enumerable.ToDictionary <XElement, int, string>(enumerable2, (XElement key) => int.Parse(key.Element("Id").get_Value()), (XElement value) => value.Element("Info").get_Value()); this.tempShipClass = Enumerable.ToDictionary <XElement, int, string>(enumerable3, (XElement key) => int.Parse(key.Element("Id").get_Value()), (XElement value) => value.Element("Name").get_Value()); this.tempMstShipBook = ArrayMaster.GetShipBookInfo(); }
public void InitBookData() { IEnumerable <XElement> source = Utils.Xml_Result("mst_shiptext", "mst_shiptext", null); IEnumerable <XElement> source2 = Utils.Xml_Result("mst_slotitemtext", "mst_slotitemtext", null); IEnumerable <XElement> source3 = Utils.Xml_Result("mst_ship_class", "mst_ship_class", null); tempShipBookText = source.ToDictionary((XElement key) => int.Parse(key.Element("Id").Value), (XElement value) => value.Element("Sinfo").Value); tempSlotBookText = source2.ToDictionary((XElement key) => int.Parse(key.Element("Id").Value), (XElement value) => value.Element("Info").Value); tempShipClass = source3.ToDictionary((XElement key) => int.Parse(key.Element("Id").Value), (XElement value) => value.Element("Name").Value); tempMstShipBook = ArrayMaster.GetShipBookInfo(); }