public IControl Build(object item) { if (item is EditableParameterViewModel <long> intParam && intParam.Parameter.Parameter is BoolParameter boolParameter && BoolParameter != null) { return(BoolParameter.Build(item)); } if (item is EditableParameterActionViewModel aevm && ButtonParameter != null) { return(ButtonParameter.Build(item)); } return(Generic?.Build(item) ?? new Panel()); }
public IControl Build(object item) { if (item is EditableParameterViewModel <long> intParam) { if (intParam.Parameter.Parameter is BoolParameter && BoolParameter != null) { return(BoolParameter.Build(item)); } if (intParam.Parameter.Parameter is FlagParameter && FlagParameter != null) { return(FlagParameter.Build(item)); } if (intParam.UseModernPicker && ItemsParameter != null) { return(ItemsParameter.Build(item)); } } else if (item is EditableParameterActionViewModel aevm && ButtonParameter != null) { return(ButtonParameter.Build(item)); } return(Generic?.Build(item) ?? new Panel()); }