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))); }
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))); }
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)); }
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)); }
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)); }
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)); }