コード例 #1
0
ファイル: Remapper.cs プロジェクト: sarmadh17/PS4Macro
        public void LoadBindings()
        {
            var container = BindingsContainer.Deserialize(GetBindingsFilePath());

            MappingsDataBinding = container.Mappings;
            MacrosDataBinding   = container.Macros;
        }
コード例 #2
0
        public static void Serialize(string path, BindingsContainer container)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(BindingsContainer));

            using (TextWriter writer = new StreamWriter(path))
            {
                serializer.Serialize(writer, container);
            }
        }
コード例 #3
0
ファイル: Remapper.cs プロジェクト: sarmadh17/PS4Macro
        public void SaveBindings()
        {
            var container = new BindingsContainer();

            container.Mappings = MappingsDataBinding;
            container.Macros   = MacrosDataBinding;

            BindingsContainer.Serialize(GetBindingsFilePath(), container);
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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;
        }
コード例 #6
0
ファイル: Remapper.cs プロジェクト: MChrisGM/PS4Macro
        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;
        }
コード例 #7
0
        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);
        }
コード例 #8
0
ファイル: Remapper.cs プロジェクト: MChrisGM/PS4Macro
        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);
        }