//MOUSE ENTER AND LEAVE (METHO GENERAL)
        private void Control_MouseEnter(object sender, EventArgs e)
        {
            _objControlEventBL = new ControlEventBL();
            var ctn = (Button)sender;

            ctn = _objControlEventBL.MouseEnter(sender);
        }
        private void Control_MouseLeave(object sender, EventArgs e)
        {
            var ctn = (Button)sender;

            ctn = _objControlEventBL.MouseLeave(sender);
            _objControlEventBL = null;
        }
示例#3
0
        public void CreateChannels(int x)
        {
            panelLeftDownChannels.Controls.Clear();
            panelLeftDownChannels.AutoScroll = false;
            panelLeftDownChannels.HorizontalScroll.Enabled = false;
            panelLeftDownChannels.HorizontalScroll.Visible = false;
            panelLeftDownChannels.HorizontalScroll.Maximum = 0;
            panelLeftDownChannels.AutoScroll = true;

            CanalBL objCanalBL             = new CanalBL();
            var     listMSTt04_canal_vtaBL = objCanalBL.ListCanal();
            //NEW
            ControlCreateBL objControlCreateBL = new ControlCreateBL();

            //CREATE AND DELETE
            objControlEventBL = new ControlEventBL();
            listBtnCretae     = new List <Control>();

            for (int i = 0; i < listMSTt04_canal_vtaBL.Count; i++)
            {
                //SEND VALUE CHANNELS BY DEFAULT
                if (i == 0)
                {
                    channels = listMSTt04_canal_vtaBL[i].txt_desc;
                }

                //Button btnNuevo = new Button();
                MetroTile btnNuevo = new MetroTile();
                btnNuevo = objControlCreateBL.CreateButton(
                    listMSTt04_canal_vtaBL[i].txt_abrv,
                    listMSTt04_canal_vtaBL[i].txt_desc,
                    listMSTt04_canal_vtaBL[i].cod_can_vta
                    );
                //ASSIGN EVENT
                // btnNuevo = (MetroTile)objControlEventBL.SendCorrectEvent(btnNuevo);
                btnNuevo.Click      += new EventHandler(Control_SetChannels);
                btnNuevo.MouseEnter += new EventHandler(btnCustomerBackColor_MouseEnter);
                btnNuevo.MouseLeave += new EventHandler(btnCustomerBackColor_MouseLeave);
                panelLeftDownChannels.Controls.Add(btnNuevo);

                //STYLE CUSTOM
                btnNuevo.Width  = 210;
                btnNuevo.Height = 135;

                listBtnCretae.Add(btnNuevo);
            }
            objControlEventBL = null;
        }