public static void SaveKeybinds() { using (var sw = new StreamWriter(BESettings.GetPath("BEMainKeybinds"))) { var s = new XmlSerializer(typeof(List <BEKeybind>)); s.Serialize(sw, keybinds); } }
public static void LoadKeybinds() { using (var sr = new StreamReader(BESettings.GetPath("BEMainKeybinds"))) { var s = new XmlSerializer(typeof(List <BEKeybind>)); keybinds = (List <BEKeybind>)(s.Deserialize(sr) ?? new List <BEKeybind>()); } }