コード例 #1
0
        public void CheckBox(string text, Expression <Func <T, bool> > path)
        {
            var prop = CodingHelper.GetPropertyInfo(path);

            addControl(new FluentCheckBox <T>(text, GetObject,
                                              x => (bool?)prop.GetValue(x),
                                              (x, v) => prop.SetValue(x, v)));
        }
コード例 #2
0
        public void ColorPicker(Expression <Func <T, Color4> > path)
        {
            var prop = CodingHelper.GetPropertyInfo(path);

            addControl(new FluentColorPicker <T>(GetObject,
                                                 x => (Color4)prop.GetValue(x),
                                                 (x, v) => prop.SetValue(x, v)));
        }
コード例 #3
0
        public void DropDown <TValue>(Expression <Func <T, TValue> > path, Dictionary <string, TValue> values)
        {
            var prop = CodingHelper.GetPropertyInfo(path);

            addControl(new FluentDropDown <T, TValue>(GetObject,
                                                      x => (TValue)prop.GetValue(x),
                                                      (x, v) => prop.SetValue(x, v), values));
        }
コード例 #4
0
        public void Slider(Expression <Func <T, float> > path, float minValue, float maxValue, int numSteps)
        {
            var prop = CodingHelper.GetPropertyInfo(path);

            addControl(new FluentSlider <T>(GetObject,
                                            x => (float)prop.GetValue(x),
                                            (x, v) => prop.SetValue(x, v),
                                            minValue, maxValue, numSteps));
        }
コード例 #5
0
        public void TextBox <TVal>(Expression <Func <T, TVal> > path, Func <TVal, string> valToStr, Func <string, TVal> strToVal)
        {
            var prop = CodingHelper.GetPropertyInfo(path);

            addControl(new FluentTextBox <T, TVal>(GetObject,
                                                   x => (TVal)prop.GetValue(x),
                                                   (x, v) => prop.SetValue(x, v),
                                                   valToStr, strToVal));
        }
コード例 #6
0
        public void NumericUpDown <TVal>(Expression <Func <T, TVal> > path, TVal minValue, TVal maxValue, Func <TVal, double> valToDouble, Func <double, TVal> doubleToVal)
        {
            var prop = CodingHelper.GetPropertyInfo(path);

            addControl(new FluentNumericUpDown <T, TVal>(GetObject,
                                                         x => (TVal)prop.GetValue(x),
                                                         (x, v) => prop.SetValue(x, v),
                                                         minValue, maxValue,
                                                         valToDouble, doubleToVal));
        }