当前位置: 首页>>代码示例>>C#>>正文


C# Controls.RockTextBox类代码示例

本文整理汇总了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;
        }
开发者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


注:本文中的Rock.Web.UI.Controls.RockTextBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。