本文整理汇总了C#中Rock.Web.UI.Controls.RockTextBox类的典型用法代码示例。如果您正苦于以下问题:C# RockTextBox类的具体用法?C# RockTextBox怎么用?C# RockTextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RockTextBox类属于Rock.Web.UI.Controls命名空间,在下文中一共展示了RockTextBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:azturner,项目名称:Rock,代码行数:36,代码来源:NoteTypeFieldType.cs
示例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;
}
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:29,代码来源:DateFieldType.cs
示例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;
}
开发者ID:NewSpring,项目名称:Rock,代码行数:38,代码来源:ValueListFieldType.cs
示例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;
}
开发者ID:NewSpring,项目名称:Rock,代码行数:15,代码来源:EmailFieldType.cs
示例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;
}
开发者ID:azturner,项目名称:Rock,代码行数:15,代码来源:GroupAndRoleFieldType.cs
示例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;
}
开发者ID:NewSpring,项目名称:Rock,代码行数:15,代码来源:EntityFieldType.cs
示例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();
}
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:14,代码来源:NoteControl.cs
示例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;
}
开发者ID:pkdevbox,项目名称:Rock,代码行数:16,代码来源:ComponentFieldType.cs
示例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();
}
开发者ID:NewSpring,项目名称:Rock,代码行数:16,代码来源:NoteControl.cs
示例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;
}
开发者ID:Ganon11,项目名称:Rock,代码行数:17,代码来源:KeyValueListFieldType.cs
示例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;
}
开发者ID:pkdevbox,项目名称:Rock,代码行数:18,代码来源:SelectMultiFieldType.cs
示例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();
}
开发者ID:Ganon11,项目名称:Rock,代码行数:17,代码来源:MembersRow.cs
示例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();
}
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:18,代码来源:MembersRow.cs
示例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;
}
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:19,代码来源:WorkflowAttributeFieldType.cs
示例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;
}
开发者ID:NewSpring,项目名称:Rock,代码行数:22,代码来源:KeyValueListFieldType.cs
示例16: 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>();
RockTextBox tbTrue = new RockTextBox();
controls.Add( tbTrue );
tbTrue.AutoPostBack = true;
tbTrue.TextChanged += OnQualifierUpdated;
tbTrue.Label = "True Text";
tbTrue.Text = "Yes";
tbTrue.Help = "The text to display when value is true.";
RockTextBox tbFalse = new RockTextBox();
controls.Add( tbFalse );
tbFalse.AutoPostBack = true;
tbFalse.TextChanged += OnQualifierUpdated;
tbFalse.Label = "False Text";
tbFalse.Text = "No";
tbFalse.Help = "The text to display when value is false.";
return controls;
}
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:25,代码来源:BooleanFieldType.cs
示例17: 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.";
var ddl = new RockDropDownList();
controls.Add( ddl );
ddl.Items.Add( new ListItem( "Drop Down List", "ddl" ) );
ddl.Items.Add( new ListItem( "Radio Buttons", "rb" ) );
ddl.AutoPostBack = true;
ddl.SelectedIndexChanged += OnQualifierUpdated;
ddl.Label = "Field Type";
ddl.Help = "Field type to use for selection";
return controls;
}
开发者ID:pkdevbox,项目名称:Rock,代码行数:27,代码来源:SelectSingleFieldType.cs
示例18: 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 ddl = new RockDropDownList();
controls.Add( ddl );
ddl.AutoPostBack = true;
ddl.SelectedIndexChanged += OnQualifierUpdated;
ddl.Label = "Toolbar Type";
ddl.Help = "The type of toolbar to display on editor.";
ddl.Items.Add( "Light" );
ddl.Items.Add( "Full" );
var tbDocumentRoot = new RockTextBox();
controls.Add(tbDocumentRoot);
tbDocumentRoot.AutoPostBack = true;
tbDocumentRoot.TextChanged += OnQualifierUpdated;
tbDocumentRoot.Label = "Document Root Folder";
tbDocumentRoot.Help = "The folder to use as the root when browsing or uploading documents ( e.g. ~/Content ).";
var tbImageRoot = new RockTextBox();
controls.Add( tbImageRoot );
tbImageRoot.AutoPostBack = true;
tbImageRoot.TextChanged += OnQualifierUpdated;
tbImageRoot.Label = "Image Root Folder";
tbImageRoot.Help = "The folder to use as the root when browsing or uploading images ( e.g. ~/Content ).";
var cbUserSpecificFolder = new RockCheckBox();
controls.Add( cbUserSpecificFolder );
cbUserSpecificFolder.AutoPostBack = true;
cbUserSpecificFolder.CheckedChanged += OnQualifierUpdated;
cbUserSpecificFolder.Label = "User Specific Folders";
cbUserSpecificFolder.Text = "Yes";
cbUserSpecificFolder.Help = "Should the root folders be specific to current user?";
return controls;
}
开发者ID:azturner,项目名称:Rock,代码行数:40,代码来源:HtmlFieldType.cs
示例19: CreateChildControls
/// <summary>
/// Creates the child controls.
/// </summary>
/// <returns></returns>
public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
{
var ddlGroupType = new RockDropDownList();
ddlGroupType.ID = filterControl.ID + "_0";
filterControl.Controls.Add( ddlGroupType );
foreach ( Rock.Model.GroupType groupType in new GroupTypeService().Queryable() )
{
ddlGroupType.Items.Add( new ListItem( groupType.Name, groupType.Id.ToString() ) );
}
var ddl = ComparisonControl( NumericFilterComparisonTypes );
ddl.ID = filterControl.ID + "_1";
filterControl.Controls.Add( ddl );
var tb = new RockTextBox();
tb.ID = filterControl.ID + "_2";
filterControl.Controls.Add( tb );
var tb2 = new RockTextBox();
tb2.ID = filterControl.ID + "_3";
filterControl.Controls.Add( tb );
var controls = new Control[4] { ddlGroupType, ddl, tb, tb2 };
SetSelection( entityType, controls, string.Format( "{0}|{1}|4|16",
ddlGroupType.Items.Count > 0 ? ddlGroupType.Items[0].Value : "0",
ComparisonType.GreaterThanOrEqualTo.ConvertToInt().ToString() ) );
return controls;
}
开发者ID:pkdevbox,项目名称:Rock,代码行数:35,代码来源:GroupTypeAttendanceFilter.cs
示例20: CreateChildControls
/// <summary>
/// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
/// </summary>
protected override void CreateChildControls()
{
Controls.Clear();
_hiddenField = new HiddenField();
_hiddenField.ID = this.ID + "_hiddenField";
Controls.Add( _hiddenField );
_textBox = new RockTextBox();
_textBox.ID = this.ID + "_textBox";
Controls.Add( _textBox );
_dropDownList = new RockDropDownList();
_dropDownList.ID = this.ID + "_dropDownList";
Controls.Add( _dropDownList );
}
开发者ID:Ganon11,项目名称:Rock,代码行数:19,代码来源:RockTextOrDropDownList.cs
注:本文中的Rock.Web.UI.Controls.RockTextBox类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论