Пример #1
0
        /// <summary>
        /// 此函数用于获取背景按钮对象,并绑定按钮事件,又皮肤框架调用
        /// </summary>
        protected override void ProcessUserButtons()
        {
            base.ProcessUserButtons();

            //获取背景按钮对象
            if (this.Layout.ButtonManager["btHorizontal"] != null)
            {
                btHorizontal1 = this.Layout.ButtonManager["btHorizontal"]["btHorizontal1"];
                btHorizontal2 = this.Layout.ButtonManager["btHorizontal"]["btHorizontal2"];
                btHorizontal3 = this.Layout.ButtonManager["btHorizontal"]["btHorizontal3"];
                btHorizontal4 = this.Layout.ButtonManager["btHorizontal"]["btHorizontal4"];
            }

            //绑定按钮事件
            if (btHorizontal1 != null)
            {
                btHorizontal1.SetClickEventHandler(OnbtHorizontalClick);
            }
            if (btHorizontal2 != null)
            {
                btHorizontal2.SetClickEventHandler(OnbtHorizontalClick);
            }
            if (btHorizontal3 != null)
            {
                btHorizontal3.SetClickEventHandler(OnbtHorizontalClick);
            }
            if (btHorizontal4 != null)
            {
                btHorizontal4.SetClickEventHandler(OnbtHorizontalClick);
            }
        }
Пример #2
0
        /// <summary>
        /// 此函数用于获取背景按钮对象,并绑定按钮事件,又皮肤框架调用
        /// </summary>
        protected override void ProcessUserButtons()
        {
            base.ProcessUserButtons();

            //获取背景按钮对象
            if (this.Layout.ButtonManager["Menu"] != null)
            {
                btMenuButton1 = this.Layout.ButtonManager["Menu"]["btMenu1"];
                btMenuButton2 = this.Layout.ButtonManager["Menu"]["btMenu2"];
                btMenuButton3 = this.Layout.ButtonManager["Menu"]["btMenu3"];
                btMenuButton4 = this.Layout.ButtonManager["Menu"]["btMenu4"];
                btMenuButton5 = this.Layout.ButtonManager["Menu"]["btMenu5"];
                btMenuButton6 = this.Layout.ButtonManager["Menu"]["btMenu6"];
                btMenuButton7 = this.Layout.ButtonManager["Menu"]["btMenu7"];
                btMenuButton8 = this.Layout.ButtonManager["Menu"]["btMenu8"];
            }

            //绑定按钮事件
            if (btMenuButton1 != null)
            {
                btMenuButton1.SetClickEventHandler(OnMenuButtonClick);
            }
            if (btMenuButton2 != null)
            {
                btMenuButton2.SetClickEventHandler(OnMenuButtonClick);
            }
            if (btMenuButton3 != null)
            {
                btMenuButton3.SetClickEventHandler(OnMenuButtonClick);
            }
            if (btMenuButton4 != null)
            {
                btMenuButton4.SetClickEventHandler(OnMenuButtonClick);
            }
            if (btMenuButton5 != null)
            {
                btMenuButton5.SetClickEventHandler(OnMenuButtonClick);
            }
            if (btMenuButton6 != null)
            {
                btMenuButton6.SetClickEventHandler(OnMenuButtonClick);
            }
            if (btMenuButton7 != null)
            {
                btMenuButton7.SetClickEventHandler(OnMenuButtonClick);
            }
            if (btMenuButton8 != null)
            {
                btMenuButton8.SetClickEventHandler(OnMenuButtonClick);
            }
        }