Add() public method

public Add ( string name, object data, bool lowPiority = false ) : void
name string
data object
lowPiority bool
return void
コード例 #1
0
        /// <summary>
        /// 變動 fancybox 規格
        /// </summary>
        /// <param name="url"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        public static TriggerContext FancyResize(this TriggerContext trigger, string width = null, string height = null)
        {
            trigger.Add("fancyResize", new FancyboxPack
            {
                width  = width,
                height = height
            },
                        lowPiority: false);

            return(trigger);
        }
コード例 #2
0
        /// <summary>
        /// 開啟一個 fancybox
        /// </summary>
        /// <param name="url"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        public static TriggerContext FancyOpen(this TriggerContext trigger, string url, string width = null, string height = null)
        {
            trigger.Add("fancyOpen", new FancyboxPack
            {
                url    = url,
                width  = width,
                height = height
            },
                        lowPiority: true);

            return(trigger);
        }
コード例 #3
0
        /// <summary>
        /// 關閉目前視窗中的 fancybox
        /// </summary>
        /// <returns></returns>
        public static TriggerContext FancyClose(this TriggerContext trigger)
        {
            trigger.Add("fancyClose", true, lowPiority: true);

            return(trigger);
        }