public void LoadBindings() { var container = BindingsContainer.Deserialize(GetBindingsFilePath()); MappingsDataBinding = container.Mappings; MacrosDataBinding = container.Macros; }
public static void Serialize(string path, BindingsContainer container) { XmlSerializer serializer = new XmlSerializer(typeof(BindingsContainer)); using (TextWriter writer = new StreamWriter(path)) { serializer.Serialize(writer, container); } }
public void SaveBindings() { var container = new BindingsContainer(); container.Mappings = MappingsDataBinding; container.Macros = MacrosDataBinding; BindingsContainer.Serialize(GetBindingsFilePath(), container); }
public static BindingsContainer Deserialize(string path) { XmlSerializer deserializer = new XmlSerializer(typeof(BindingsContainer)); using (TextReader reader = new StreamReader(path)) { object obj = deserializer.Deserialize(reader); BindingsContainer container = obj as BindingsContainer; return(container); } }
public void LoadBindings() { var container = BindingsContainer.Deserialize(GetBindingsFilePath()); MappingsDataBinding = container.Mappings; MacrosDataBinding = container.Macros; EnableMouseInput = container.EnableMouseInput; MouseSensitivity = container.MouseSensitivity; FrameRefresh = container.FrameRefresh; Borders = container.Borders; MouseMovementAnalog = container.MouseMovementAnalog; MouseInvertXAxis = container.MouseInvertXAxis; MouseInvertYAxis = container.MouseInvertYAxis; LeftMouseMapping = container.LeftMouseMapping; RightMouseMapping = container.RightMouseMapping; MiddleMouseMapping = container.MiddleMouseMapping; }
public void LoadBindings() { var container = BindingsContainer.Deserialize(GetBindingsFilePath()); MappingsDataBinding = container.Mappings; MacrosDataBinding = container.Macros; EnableMouseInput = container.EnableMouseInput; MouseSensitivity = container.MouseSensitivity; MouseDecayRate = container.MouseDecayRate; MouseDecayThreshold = container.MouseDecayThreshold; MouseAnalogDeadzone = container.MouseAnalogDeadzone; MouseMakeupSpeed = container.MouseMakeupSpeed; MouseMovementAnalog = container.MouseMovementAnalog; MouseInvertXAxis = container.MouseInvertXAxis; MouseInvertYAxis = container.MouseInvertYAxis; LeftMouseMapping = container.LeftMouseMapping; RightMouseMapping = container.RightMouseMapping; }
public void SaveBindings() { var container = new BindingsContainer { Mappings = MappingsDataBinding, Macros = MacrosDataBinding, EnableMouseInput = EnableMouseInput, MouseSensitivity = MouseSensitivity, FrameRefresh = FrameRefresh, Borders = Borders, MouseMovementAnalog = MouseMovementAnalog, MouseInvertXAxis = MouseInvertXAxis, MouseInvertYAxis = MouseInvertYAxis, LeftMouseMapping = LeftMouseMapping, RightMouseMapping = RightMouseMapping, MiddleMouseMapping = MiddleMouseMapping }; BindingsContainer.Serialize(GetBindingsFilePath(), container); }
public void SaveBindings() { var container = new BindingsContainer { Mappings = MappingsDataBinding, Macros = MacrosDataBinding, EnableMouseInput = EnableMouseInput, MouseSensitivity = MouseSensitivity, MouseDecayRate = MouseDecayRate, MouseDecayThreshold = MouseDecayThreshold, MouseAnalogDeadzone = MouseAnalogDeadzone, MouseMakeupSpeed = MouseMakeupSpeed, MouseMovementAnalog = MouseMovementAnalog, MouseInvertXAxis = MouseInvertXAxis, MouseInvertYAxis = MouseInvertYAxis, LeftMouseMapping = LeftMouseMapping, RightMouseMapping = RightMouseMapping }; BindingsContainer.Serialize(GetBindingsFilePath(), container); }