本文整理汇总了C#中Rock.Web.UI.Controls.RockTextBox类的典型用法代码示例。如果您正苦于以下问题:C# RockTextBox类的具体用法?C# RockTextBox怎么用?C# RockTextBox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RockTextBox类属于Rock.Web.UI.Controls命名空间,在下文中一共展示了RockTextBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
List<Control> controls = new List<Control>();
var ddl = new RockDropDownList();
controls.Add( ddl );
ddl.Items.Add( new ListItem( None.Text, None.IdValue ) );
foreach ( var entityType in new EntityTypeService( new RockContext() ).GetEntities().OrderBy( e => e.FriendlyName ).ThenBy( e => e.Name ) )
{
ddl.Items.Add( new ListItem( entityType.FriendlyName, entityType.Name ) );
}
ddl.AutoPostBack = true;
ddl.SelectedIndexChanged += OnQualifierUpdated;
ddl.Label = "Entity Type";
ddl.Help = "The type of entity to display categories for.";
var tbColumn = new RockTextBox();
controls.Add( tbColumn );
tbColumn.AutoPostBack = true;
tbColumn.TextChanged += OnQualifierUpdated;
tbColumn.Label = "Qualifier Column";
tbColumn.Help = "Entity column qualifier.";
var tbValue = new RockTextBox();
controls.Add( tbValue );
tbValue.AutoPostBack = true;
tbValue.TextChanged += OnQualifierUpdated;
tbValue.Label = "Qualifier Value";
tbValue.Help = "Entity column value.";
return controls;
}
示例2: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override System.Collections.Generic.List<System.Web.UI.Control> ConfigurationControls()
{
var controls = base.ConfigurationControls();
var textbox = new RockTextBox();
controls.Add( textbox );
textbox.Label = "Date Format";
textbox.Help = "The format string to use for date (default is system short date).";
var cbDisplayDiff = new RockCheckBox();
controls.Add( cbDisplayDiff );
cbDisplayDiff.Label = "Display as Elapsed Time";
cbDisplayDiff.Text = "Yes";
cbDisplayDiff.Help = "Display value as an elapsed time.";
var cbDisplayCurrent = new RockCheckBox();
controls.Add( cbDisplayCurrent );
cbDisplayCurrent.AutoPostBack = true;
cbDisplayCurrent.CheckedChanged += OnQualifierUpdated;
cbDisplayCurrent.Label = "Display Current Option";
cbDisplayCurrent.Text = "Yes";
cbDisplayCurrent.Help = "Include option to specify value as the current date.";
return controls;
}
示例3: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
var controls = base.ConfigurationControls();
var tbValuePrompt = new RockTextBox();
controls.Add( tbValuePrompt );
tbValuePrompt.AutoPostBack = true;
tbValuePrompt.TextChanged += OnQualifierUpdated;
tbValuePrompt.Label = "Label Prompt";
tbValuePrompt.Help = "The text to display as a prompt in the label textbox.";
var ddl = new RockDropDownList();
controls.Add( ddl );
ddl.AutoPostBack = true;
ddl.SelectedIndexChanged += OnQualifierUpdated;
ddl.DataTextField = "Name";
ddl.DataValueField = "Id";
ddl.DataSource = new Rock.Model.DefinedTypeService( new RockContext() ).Queryable().OrderBy( d => d.Order ).ToList();
ddl.DataBind();
ddl.Items.Insert(0, new ListItem(string.Empty, string.Empty));
ddl.Label = "Defined Type";
ddl.Help = "Optional Defined Type to select values from, otherwise values will be free-form text fields.";
var tbCustomValues = new RockTextBox();
controls.Add( tbCustomValues );
tbCustomValues.TextMode = TextBoxMode.MultiLine;
tbCustomValues.Rows = 3;
tbCustomValues.AutoPostBack = true;
tbCustomValues.TextChanged += OnQualifierUpdated;
tbCustomValues.Label = "Custom Values";
tbCustomValues.Help = "Optional list of options to use for the values. Format is either 'value1,value2,value3,...', or 'value1:text1,value2:text2,value3:text3,...'.";
return controls;
}
示例4: FilterValueControl
/// <summary>
/// Gets the filter value control with the specified FilterMode
/// </summary>
/// <param name="configurationValues">The configuration values.</param>
/// <param name="id">The identifier.</param>
/// <param name="required">if set to <c>true</c> [required].</param>
/// <param name="filterMode">The filter mode.</param>
/// <returns></returns>
public override Control FilterValueControl( Dictionary<string, ConfigurationValue> configurationValues, string id, bool required, FilterMode filterMode )
{
var control = new RockTextBox { ID = id };
control.ID = string.Format( "{0}_ctlCompareValue", id );
control.AddCssClass( "js-filter-control" );
return control;
}
示例5: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
List<Control> controls = new List<Control>();
var textBoxGroupAndRolePickerLabel = new RockTextBox();
controls.Add( textBoxGroupAndRolePickerLabel );
textBoxGroupAndRolePickerLabel.Label = "Group/Role Picker Label";
textBoxGroupAndRolePickerLabel.Help = "The label for the group/role picker";
return controls;
}
示例6: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
List<Control> controls = new List<Control>();
var tbHelpText = new RockTextBox();
controls.Add( tbHelpText );
tbHelpText.Label = "Entity Control Help Text Format";
tbHelpText.Help = "Include a {0} in places where you want the EntityType name (Campus, Group, etc) to be included and a {1} in places where you the the pluralized EntityType name (Campuses, Groups, etc) to be included.";
return controls;
}
示例7: NoteControl
/// <summary>
/// Initializes a new instance of the <see cref="NoteControl"/> class.
/// </summary>
public NoteControl()
{
_tbNote = new RockTextBox();
_tbNote.Placeholder = "Write a note...";
_cbAlert = new CheckBox();
_cbPrivate = new CheckBox();
_lbSaveNote = new LinkButton();
_lbEditNote = new LinkButton();
_lbDeleteNote = new LinkButton();
_sbSecurity = new SecurityButton();
}
示例8: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
var controls = base.ConfigurationControls();
var tb = new RockTextBox();
controls.Add( tb );
tb.AutoPostBack = true;
tb.TextChanged += OnQualifierUpdated;
tb.Label = "Container Assembly Name";
tb.Help = "The assembly name of the MEF container to show components of.";
return controls;
}
示例9: NoteControl
/// <summary>
/// Initializes a new instance of the <see cref="NoteControl"/> class.
/// </summary>
public NoteControl()
{
_ddlNoteType = new DropDownList();
_tbNote = new RockTextBox();
_tbNote.Placeholder = "Write a note...";
_cbAlert = new CheckBox();
_cbPrivate = new CheckBox();
_lbSaveNote = new LinkButton();
_lbEditNote = new LinkButton();
_lbDeleteNote = new LinkButton();
_sbSecurity = new SecurityButton();
_dtCreateDate = new DateTimePicker();
}
示例10: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
var controls = base.ConfigurationControls();
var tbKeyPrompt = new RockTextBox();
controls.Insert(0, tbKeyPrompt );
tbKeyPrompt.AutoPostBack = true;
tbKeyPrompt.TextChanged += OnQualifierUpdated;
tbKeyPrompt.Label = "Key Prompt";
tbKeyPrompt.Help = "The text to display as a prompt in the key textbox.";
return controls;
}
示例11: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
List<Control> controls = new List<Control>();
var tb = new RockTextBox();
controls.Add( tb );
tb.TextMode = TextBoxMode.MultiLine;
tb.Rows = 3;
tb.AutoPostBack = true;
tb.TextChanged += OnQualifierUpdated;
tb.Label = "Values";
tb.Help = "The source of the values to display in a list. Format is either 'value1,value2,value3,...', 'value1:text1,value2:text2,value3:text3,...', or a SQL Select statement that returns result set with a 'Value' and 'Text' column.";
return controls;
}
示例12: NewFamilyMembersRow
/// <summary>
/// Initializes a new instance of the <see cref="NewFamilyMembersRow" /> class.
/// </summary>
public NewFamilyMembersRow()
: base()
{
_rblRole = new RockRadioButtonList();
_ddlTitle = new DropDownList();
_tbFirstName = new RockTextBox();
_tbLastName = new RockTextBox();
_ddlSuffix = new DropDownList();
_rblGender = new RockRadioButtonList();
_dpBirthdate = new DatePicker();
_ddlConnectionStatus = new DropDownList();
_ddlGrade = new RockDropDownList();
_lbDelete = new LinkButton();
}
示例13: NewFamilyMembersRow
/// <summary>
/// Initializes a new instance of the <see cref="NewFamilyMembersRow" /> class.
/// </summary>
public NewFamilyMembersRow()
: base()
{
_rblRole = new RockRadioButtonList();
_ddlTitle = new DropDownList();
_tbFirstName = new RockTextBox();
_tbLastName = new RockTextBox();
_ddlSuffix = new DropDownList();
_ddlConnectionStatus = new DropDownList();
_rblGender = new RockRadioButtonList();
_dpBirthdate = new DatePicker();
_ddlGradePicker = new GradePicker { UseAbbreviation = true, UseGradeOffsetAsValue = true };
_ddlGradePicker.Label = string.Empty;
_lbDelete = new LinkButton();
}
示例14: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
var controls = base.ConfigurationControls();
var tbCustomValues = new RockTextBox();
controls.Add( tbCustomValues );
tbCustomValues.TextMode = TextBoxMode.MultiLine;
tbCustomValues.Rows = 3;
tbCustomValues.AutoPostBack = true;
tbCustomValues.TextChanged += OnQualifierUpdated;
tbCustomValues.Label = "Limit Attributes by Field Type";
tbCustomValues.Help = "Optional list of field type classes for limiting selection to attributes using those field types (e.g. 'Rock.Field.Types.PersonFieldType|Rock.Field.Types.GroupFieldType').";
return controls;
}
示例15: ConfigurationControls
/// <summary>
/// Creates the HTML controls required to configure this type of field
/// </summary>
/// <returns></returns>
public override List<Control> ConfigurationControls()
{
var controls = base.ConfigurationControls();
var tbKeyPrompt = new RockTextBox();
controls.Insert(0, tbKeyPrompt );
tbKeyPrompt.AutoPostBack = true;
tbKeyPrompt.TextChanged += OnQualifierUpdated;
tbKeyPrompt.Label = "Key Prompt";
tbKeyPrompt.Help = "The text to display as a prompt in the key textbox.";
var cbDisplayValueFirst = new RockCheckBox();
controls.Insert( 4, cbDisplayValueFirst );
cbDisplayValueFirst.Label = "Display Value First";
cbDisplayValueFirst.Help = "Reverses the display order of the key and the value.";
return controls;
}