Exemple #1
0
        private static object UpperValueCoerceValueCallback(DependencyObject target, object valueObject)
        {
            simpleModeParameterEditor targetSlider = (simpleModeParameterEditor)target;
            double value = (double)valueObject;

            return(Math.Max(value, targetSlider.lowerSlider.Value));
        }
Exemple #2
0
        public simpleModeParameterEditor toSMPE()
        {
            //de New Simplemodeparametereditor duurt 10 SECONDEN wtf
            simpleModeParameterEditor ret = new simpleModeParameterEditor();

            ret.varChooser.SelectedIndex = variable;
            //ret.UpperValue = endRange;
            //ret.LowerValue = beginRange;
            ret.actionChooser.SelectedIndex = actionId;
            ByteConverter bc = new ByteConverter();

            switch (actionId)
            {
            case 0:
                //ret.KeyPressChooser.Text = ((char)arg1).ToString();
                int comp  = (int)arg1;
                var myKey = ASCII_table.ascii_table.FirstOrDefault(x => x.Value == comp).Key;
                ret.KeyPressChooser.Text = myKey;
                break;
            //still todo

            case 1:
                ret.MousePressChooser.SelectedIndex = (int)arg1;
                break;

            case 2:
                ret.MouseMoveBox1.Text = arg1.ToString();
                ret.MouseMoveBox2.Text = arg2.ToString();
                break;

            case 3:
                break;
            }
            ret.initializeVars(this);
            return(ret);
        }