public ConfigState ReadConfig()
        {
            var conf = new ConfigState();

            conf.ClickDelay = Properties.Settings.Default.ClickDelay;
            conf.FistSensitivity = Properties.Settings.Default.FistSensitivity;
            conf.ZoomSensitivity = Properties.Settings.Default.ZoomSensitivity;
            conf.ScrollSensitivity = Properties.Settings.Default.ScrollSensitivity;
            conf.DragSensitivity = Properties.Settings.Default.DragSensitivity;

            conf.EnableDragging = Properties.Settings.Default.EnableDragging;
            conf.EmulateMouseOrTouch = Properties.Settings.Default.EmulateMouseOrTouch;
            conf.InvertVerticalScroll = Properties.Settings.Default.InvertVerticalScrollDirection;

            return conf;
        }
        public void Save(ConfigState conf)
        {
            if (conf != null)
            {
                Properties.Settings.Default.ClickDelay = conf.ClickDelay;
                Properties.Settings.Default.FistSensitivity = conf.FistSensitivity;
                Properties.Settings.Default.ZoomSensitivity = conf.ZoomSensitivity;
                Properties.Settings.Default.ScrollSensitivity = conf.ScrollSensitivity;
                Properties.Settings.Default.DragSensitivity = conf.DragSensitivity;

                Properties.Settings.Default.EnableDragging = conf.EnableDragging;
                Properties.Settings.Default.EmulateMouseOrTouch = conf.EmulateMouseOrTouch;
                Properties.Settings.Default.InvertVerticalScrollDirection = conf.InvertVerticalScroll;

                Properties.Settings.Default.Save();
            }
        }
Esempio n. 3
0
        private void updateSettings(ConfigState conf)
        {
            fistSensitivity = conf.FistSensitivity;
            zoomSensitivity = conf.ZoomSensitivity;
            scrollSensitivity = conf.ScrollSensitivity;
            dragSensitivity = conf.DragSensitivity;
            clickDelay = conf.ClickDelay;

            enableDragging = conf.EnableDragging;
            useMouseClickOrTouch = conf.EmulateMouseOrTouch;
            invertVerticalScroll = conf.InvertVerticalScroll ? -1 : 1;
        }