public static void CreateFilterModel(Zetbox.App.GUI.RangeFilterConfiguration obj, MethodReturnEventArgs <Zetbox.API.IFilterModel> e) { var mdl = new RangeFilterModel(); mdl.Label = obj.GetLabel(); mdl.Required = obj.Required; mdl.ValueSource = FilterValueSource.FromProperty(obj.Property); mdl.ViewModelType = obj.ViewModelDescriptor; mdl.RequestedKind = obj.RequestedKind; mdl.FilterArguments.Add(new FilterArgumentConfig(obj.Property.GetDetachedValueModel(true), /*cfg.ArgumentViewModel ?? */ obj.Property.ValueModelDescriptor)); mdl.FilterArguments.Add(new FilterArgumentConfig(obj.Property.GetDetachedValueModel(true), /*cfg.ArgumentViewModel ?? */ obj.Property.ValueModelDescriptor)); e.Result = mdl; }
public static void NotifyCreated(Zetbox.App.GUI.RangeFilterConfiguration obj) { obj.ViewModelDescriptor = ViewModelDescriptors.Zetbox_Client_Presentables_FilterViewModels_RangeFilterViewModel.Find(obj.Context); }