示例#1
0
    public static int RecalculateMasking(IntPtr l)
    {
        int result;

        try
        {
            IMaskable maskable = (IMaskable)LuaObject.checkSelf(l);
            maskable.RecalculateMasking();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
示例#2
0
        /// <summary>
        ///
        /// <para>
        /// Notify all IMaskable under the given component that they need to recalculate masking.
        /// </para>
        ///
        /// </summary>
        /// <param name="mask"/>
        public static void NotifyStencilStateChanged(Component mask)
        {
            List <Component> list = ListPool <Component> .Get();

            mask.GetComponentsInChildren <Component>(list);
            for (int index = 0; index < list.Count; ++index)
            {
                if (!((Object)list[index] == (Object)null) && !((Object)list[index].gameObject == (Object)mask.gameObject))
                {
                    IMaskable maskable = list[index] as IMaskable;
                    if (maskable != null)
                    {
                        maskable.RecalculateMasking();
                    }
                }
            }
            ListPool <Component> .Release(list);
        }
        /// <summary>
        /// <para>Notify all IMaskable under the given component that they need to recalculate masking.</para>
        /// </summary>
        /// <param name="mask"></param>
        public static void NotifyStencilStateChanged(Component mask)
        {
            List <Component> results = ListPool <Component> .Get();

            mask.GetComponentsInChildren <Component>(results);
            for (int i = 0; i < results.Count; i++)
            {
                if ((results[i] != null) && (results[i].gameObject != mask.gameObject))
                {
                    IMaskable maskable = results[i] as IMaskable;
                    if (maskable != null)
                    {
                        maskable.RecalculateMasking();
                    }
                }
            }
            ListPool <Component> .Release(results);
        }
示例#4
0
        public static void CalcJSMask(IMaskable d)
        {
            if (string.IsNullOrWhiteSpace(d.Mask))
            {
                d.JSMask = null;
                return;
            }

            string maskPart = d.Mask.Split(new char[] { '!' }, StringSplitOptions.RemoveEmptyEntries)[0];

            if (maskPart.Contains("%"))
            {
                d.JSMask = null;
                return;
            }

            if (d is DataDate)
            {
                d.JSMask = maskPart.Replace('#', '9');
                return;
            }

            d.JSMask = maskPart.Replace('#', '*');
        }
 public AddEditProductPopupBox(Window parentWindow)
     : this()
 {
     maskableParent = parentWindow as IMaskable;
 }
 public ProgressUpdateWindow(Window parentWindow, string message) : this()
 {
     maskableParent = parentWindow as IMaskable;
     this.UpdateString = message;
 }
示例#7
0
 public PopupBox(Window parentWindow) : this()
 {
     maskableParent = parentWindow as IMaskable;
 }
示例#8
0
 public CommentBox(Window parentWindow) : this()
 {
     maskableParent = parentWindow as IMaskable;
 }