static XBoxConfig() { if (!LoadMapPack()) { for (var i = 0; i < 7; i++) { var map = new XboxMap(); map.ControlMaps = MakeControlGroups(); if (i < 5) { map.Name = Enum.GetName(typeof(ImageSetType), (ImageSetType)i); } else if (i == 5) { map.Name = "Sky - Local Horizon Mode"; } else { map.Name = "Modeless Xbox Controller Map"; } map.Slot = i; xboxMaps.Add(map); } } //LoadMaps(); }
static XBoxConfig() { if (!LoadMapPack()) { for (int i = 0; i < 7; i++) { XboxMap map = new XboxMap(); map.ControlMaps = MakeControlGroups(); if (i < 5) { map.Name = Enum.GetName(typeof(ImageSetType), (ImageSetType)i); } else if (i == 5) { map.Name = "Sky - Local Horizon Mode"; } else { map.Name = "Modeless Xbox Controller Map"; } map.Slot = i; xboxMaps.Add(map); } } //LoadMaps(); }
public static void SaveMap(XboxMap map, string filename) { XmlSerializer serializer = new XmlSerializer(typeof(XboxMap)); StreamWriter sw = new StreamWriter(filename); serializer.Serialize(sw, map); sw.Close(); }
public static XboxMap LoadMap(string filename, bool update) { XmlSerializer serializer = new XmlSerializer(typeof(XboxMap)); FileStream fs = new FileStream(filename, FileMode.Open); XboxMap map = (XboxMap)serializer.Deserialize(fs); map.Dirty = true; fs.Close(); map.UpdateMapLinks(); return(map); }
public static void SaveMap(XboxMap map, string filename) { var serializer = new XmlSerializer(typeof(XboxMap)); var sw = new StreamWriter(filename); serializer.Serialize(sw, map); sw.Close(); }