本文整理汇总了C#中Zetbox.GetLabel方法的典型用法代码示例。如果您正苦于以下问题:C# Zetbox.GetLabel方法的具体用法?C# Zetbox.GetLabel怎么用?C# Zetbox.GetLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zetbox
的用法示例。
在下文中一共展示了Zetbox.GetLabel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateFilterModel
public static void CreateFilterModel(Zetbox.App.GUI.SinglePropertyFilterConfiguration obj, MethodReturnEventArgs<IFilterModel> e)
{
var mdl = new SingleValueFilterModel();
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));
if (obj.Property is StringProperty)
{
mdl.Operator = FilterOperators.Contains;
}
else if (obj.Property is EnumerationProperty)
{
mdl.RefreshOnFilterChanged = true;
}
else if (obj.Property is ObjectReferenceProperty)
{
mdl.RefreshOnFilterChanged = true;
}
e.Result = mdl;
}
示例2: CreateFilterModel
public static void CreateFilterModel(Zetbox.App.GUI.MonthFilterConfiguration obj, MethodReturnEventArgs<IFilterModel> e, Zetbox.API.IZetboxContext ctx)
{
var mdl = MonthValueFilterModel.Create(FrozenContext, obj.GetLabel(), FilterValueSource.FromProperty(obj.Property), obj.IsCurrentMonthDefault ?? false);
mdl.Required = obj.Required;
mdl.RefreshOnFilterChanged = obj.RefreshOnFilterChanged;
e.Result = mdl;
}
示例3: CreateFilterModel
public static void CreateFilterModel(Zetbox.App.GUI.DateRangeFilterConfiguration obj, MethodReturnEventArgs<IFilterModel> e)
{
e.Result = DateRangeFilterModel.Create(
FrozenContext,
obj.GetLabel(),
FilterValueSource.FromProperty(obj.Property),
obj.RequestedKind,
obj.IsCurrentYearDefault ?? false,
obj.IsCurrentQuaterDefault ?? false,
obj.IsCurrentMonthDefault ?? false);
}
示例4: CreateFilterModel
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;
}