示例#1
0
        private async Task LoadSettingsIntoLeap()
        {
            var settingsFile = new LeapifySettings();
            var settings     = await settingsFile.Read();

            _leap.Gesture.SwipeFingersRequired = settings.SwipeFingersRequired;
            _leap.Gesture.SwipeToolsRequired   = settings.SwipeToolsRequired;
            _leap.Gesture.TapFingersRequired   = settings.TapFingersRequired;
            _leap.Gesture.TapToolsRequired     = settings.TapToolsRequired;
            _leap.Gesture.DistanceRequired     = settings.DistanceRequired;
            _leap.Gesture.SpeedRequired        = settings.SpeedRequired;
            _leap.Gesture.TimeBeforeNextAction = settings.TimeBeforeNextAction;

            _volumeSpeedIncrease = settings.VolumeSpeedIncrease;
        }
示例#2
0
        private async void SettingsForm_Load(object sender, EventArgs e)
        {
            this.Icon = Images.leapify_active;

            var settingsFile = new LeapifySettings();
            var settings     = await settingsFile.Read();

            timeBeforeNextAction.Value = settings.TimeBeforeNextAction;
            swipeFingersRequired.Value = settings.SwipeFingersRequired;
            swipeToolsRequired.Value   = settings.SwipeToolsRequired;
            distanceRequired.Value     = settings.DistanceRequired;
            speedRequired.Value        = settings.SpeedRequired;
            tapToolsRequired.Value     = settings.TapToolsRequired;
            tapFingersRequired.Value   = settings.TapFingersRequired;
            volumeIncreaseSpeed.Value  = settings.VolumeSpeedIncrease;

            lblDistanceValue.Text = settings.DistanceRequired.ToString();
            lblSpeedValue.Text    = settings.SpeedRequired.ToString();
        }