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


C# XhtmlMobileTextWriter.AddOnEnterForwardSetVar方法代码示例

本文整理汇总了C#中XhtmlMobileTextWriter.AddOnEnterForwardSetVar方法的典型用法代码示例。如果您正苦于以下问题:C# XhtmlMobileTextWriter.AddOnEnterForwardSetVar方法的具体用法?C# XhtmlMobileTextWriter.AddOnEnterForwardSetVar怎么用?C# XhtmlMobileTextWriter.AddOnEnterForwardSetVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XhtmlMobileTextWriter的用法示例。


在下文中一共展示了XhtmlMobileTextWriter.AddOnEnterForwardSetVar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddOnEnterForward

 private void AddOnEnterForward(XhtmlMobileTextWriter writer) {
     if (Control.SelectType == ListSelectType.CheckBox) {
         // ASURT 142732
         writer.AddOnEnterForwardSetVar(Control.UniqueID);
         return;
     }
     bool firstIndex = true;
     StringBuilder builder = new StringBuilder();
     for (int i = 0; i < Control.Items.Count; i++) {
         if (Control.Items[i].Selected) {
             if (!firstIndex) {
                 builder.Append(";");
             }
             builder.Append(i.ToString(CultureInfo.InvariantCulture));
             firstIndex = false;
         }
     }
     writer.AddOnEnterForwardSetVar(Control.UniqueID, builder.ToString());
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:19,代码来源:XhtmlBasicSelectionListAdapter.cs

示例2: Render

        /// <include file='doc\XhtmlBasicTextBoxAdapter.uex' path='docs/doc[@for="XhtmlTextBoxAdapter.Render"]/*' />
        public override void Render(XhtmlMobileTextWriter writer) {
            ConditionalClearPendingBreak(writer);
            ConditionalEnterStyle(writer, Style);
            ConditionalRenderOpeningSpanElement(writer);

            if ((String) Device[XhtmlConstants.RequiresOnEnterForward] == "true") {
                writer.AddOnEnterForwardSetVar(Control.UniqueID, Control.Text);
            }
            
            writer.WriteBeginTag("input");

            writer.WriteAttribute("name", Control.UniqueID);

            ConditionalRenderCustomAttribute(writer, XhtmlConstants.AccessKeyCustomAttribute);
            String controlText = Control.Text;
            if (controlText != null && controlText.Length > 0 && !Control.Password) {
                writer.Write(" value=\"");
                writer.WriteEncodedText(controlText);
                writer.Write("\"");
            }

            if (Control.Size > 0) {
                writer.WriteAttribute("size", Control.Size.ToString(CultureInfo.InvariantCulture));
            }

            if (Control.MaxLength > 0) {
                writer.WriteAttribute("maxlength", Control.MaxLength.ToString(CultureInfo.InvariantCulture));
            }

            String requiresType = Device["requiresInputTypeAttribute"];
            if (Control.Password) {
                writer.WriteAttribute("type", "password");
            }
            // InvariantCulture not needed, but included for best practices.
            else if (requiresType != null && String.Equals(requiresType, "true", StringComparison.OrdinalIgnoreCase)) {
                writer.WriteAttribute("type", "text");
            }


            writer.Write("/>");
            // ConditionalSetPendingBreak should always be called *before* ConditionalExitStyle.
            // ConditionalExitStyle may render a block element and clear the pending break.
            ConditionalSetPendingBreakAfterInline(writer);            
            ConditionalRenderClosingSpanElement(writer);
            ConditionalExitStyle(writer, Style);
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:47,代码来源:XhtmlBasicTextBoxAdapter.cs


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