本文整理汇总了C#中ButtonType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ButtonType.ToString方法的具体用法?C# ButtonType.ToString怎么用?C# ButtonType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ButtonType
的用法示例。
在下文中一共展示了ButtonType.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MenuInfo
/// <summary>
/// 参数化构造函数
/// </summary>
/// <param name="name">按钮名称</param>
/// <param name="buttonType">菜单按钮类型</param>
/// <param name="value">按钮的键值(Click),或者连接URL(View)</param>
public MenuInfo(string name, ButtonType buttonType, string value)
{
this.name = name;
this.type = buttonType.ToString();
if (buttonType == ButtonType.click)
{
this.key = value;
}
else if (buttonType == ButtonType.view)
{
this.url = value;
}
}
示例2: Button
private MvcHtmlString Button(string text, string glyphicon, ButtonStyle style = ButtonStyle.Default, ButtonType type = ButtonType.Button)
{
var builder = new TagBuilder("button");
builder.MergeAttribute("class", "btn btn-" + style.ToString().ToLower());
builder.MergeAttribute("type", type.ToString().ToLower());
if (string.IsNullOrWhiteSpace(glyphicon))
{
builder.InnerHtml = text;
}
else
{
var glyphiconBuilder = new TagBuilder("span");
glyphiconBuilder.MergeAttribute("class", glyphicon);
builder.InnerHtml = glyphiconBuilder.ToString() + " " + text;
}
return MvcHtmlString.Create(builder.ToString());
}
示例3: Button
public static MvcHtmlString Button(this HtmlHelper helper, ButtonType type, string value, object attributes)
{
return Button(helper, type.ToString(), value, attributes);
}
示例4: SendButton
public void SendButton(ButtonType bt)
{
_connection.SendMessageAsync($"type:button\nname:{bt.ToString()}\n\n");
}
示例5: CreateButtonByType
private static RibbonButton CreateButtonByType(RibbonBase MyRibbon, AddinModule Module, ButtonType BtnType)
{
var props = _ButtonProperties[BtnType];
RibbonButton btn = MyRibbon.Factory.CreateRibbonButton();
btn.Name = BtnType.ToString() + Module.Name;
btn.Tag = Module.ShallowCopy();
btn.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
btn.Label = props.Label;
btn.SuperTip = props.SuperTip;
btn.OfficeImageId = props.OfficeImageId;
btn.ShowImage = true;
return btn;
}