示例#1
0
 protected virtual void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e)
 {
     if (this.MenuItemRendering != null)
     {
         this.MenuItemRendering.Invoke(this, e);
     }
 }
示例#2
0
        protected virtual bool CheckRender()
        {
            Type myType = this.GetType();
            DynamicMenuItemControlType ctrlType = DynamicMenuItemControlType.Command;

            if (!Enum.TryParse <DynamicMenuItemControlType>(myType.Name, out ctrlType))
            {
                ctrlType = DynamicMenuItemControlType.Command;
            }

            DynamicMenuItemRenderingEventArgs eArgs = new DynamicMenuItemRenderingEventArgs(this._menuItem, ctrlType);

            this.OnMenuItemRendering(eArgs);
            return(!eArgs.Cancel);
        }
示例#3
0
 protected void ctrl_MenuItemRendering(object sender, DynamicMenuItemRenderingEventArgs e)
 {
     this.OnMenuItemRendering(e);
 }
示例#4
0
 protected void childCtrl_OnRendering(object sender, DynamicMenuItemRenderingEventArgs e)
 {
     this.OnMenuItemRendering(e);
 }
示例#5
0
 protected void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e)
 {
     if (this.MenuItemRendering != null)
         this.MenuItemRendering(this, e);
 }
 protected virtual void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e)
 {
     if (this.MenuItemRendering != null)
         this.MenuItemRendering.Invoke(this, e);
 }
        protected virtual bool CheckRender()
        {
            Type myType = this.GetType();
            DynamicMenuItemControlType ctrlType = DynamicMenuItemControlType.Command;
            if (!Enum.TryParse<DynamicMenuItemControlType>(myType.Name, out ctrlType))
                ctrlType = DynamicMenuItemControlType.Command;

            DynamicMenuItemRenderingEventArgs eArgs = new DynamicMenuItemRenderingEventArgs(this._menuItem, ctrlType);
            this.OnMenuItemRendering(eArgs);
            return !eArgs.Cancel;
        }