Esempio n. 1
0
        /// <summary>
        /// 设置目标属性
        /// </summary>
        /// <param name="source"></param>
        /// <param name="element"></param>
        internal static void SetTargetAttribute(this LinkBehave source, IHtmlElement element)
        {
            var target = source.GetTarget();

            if (target == null)
            {
                return;
            }
            element.Attribute(HtmlAttribute.Target, target);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取目标内容
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        internal static string GetTarget(this LinkBehave source)
        {
            switch (source)
            {
            case LinkBehave.Open:
                return("_open");

            case LinkBehave.Call:
                return("_call");

            case LinkBehave.Self:
                return("_self");

            case LinkBehave.Blank:
                return("_blank");

            default:
                return(null);
            }
        }
Esempio n. 3
0
 public DynamicTableAction(string text, string location, LinkBehave behave)
     : base(text, location, behave)
 {
 }
Esempio n. 4
0
 public TableAction(string text, string location, LinkBehave behave)
 {
     Text     = text;
     Location = location;
     Behave   = behave;
 }
Esempio n. 5
0
 /// <summary>
 /// 创建路径
 /// </summary>
 /// <param name="display"></param>
 /// <param name="path"></param>
 /// <param name="icon"></param>
 /// <param name="behave"></param>
 /// <returns></returns>
 public static ILocation Create(string display, string path, FontAwesome icon, LinkBehave behave)
 {
     return(new Location(path)
     {
         Display = display, Icon = icon, Behave = behave
     });
 }