コード例 #1
0
        private void CambiarImagen(TipoBoton img)
        {
            switch (img)
            {
            case TipoBoton.Buscar:
                this.Boton.Image         = Properties.Resources.buscar;
                this.Boton.ImageLocation = ImageLocation.MiddleCenter;
                base.Size       = new Size(0x23, 0x1b);
                this.Boton.Text = string.Empty;
                break;

            case TipoBoton.BuscarPrompt:
                this.Boton.Image         = Properties.Resources.prompt;
                this.Boton.ImageLocation = ImageLocation.MiddleLeft;
                base.Size       = new Size(0x23, 0x1b);
                this.Boton.Text = string.Empty;
                break;

            case TipoBoton.Agregar:
                this.Boton.Image         = Properties.Resources.nuevo;
                this.Boton.ImageLocation = ImageLocation.MiddleLeft;
                base.Size       = new Size(100, 0x18);
                this.Boton.Text = "&Agregar";
                break;

            case TipoBoton.Modificar:
                this.Boton.Image         = Properties.Resources.editar;
                this.Boton.ImageLocation = ImageLocation.MiddleLeft;
                base.Size       = new Size(100, 0x18);
                this.Boton.Text = "&Modificar";
                break;

            case TipoBoton.Eliminar:
                this.Boton.Image         = Properties.Resources.eliminar;
                this.Boton.ImageLocation = ImageLocation.MiddleLeft;
                base.Size       = new Size(100, 0x18);
                this.Boton.Text = "&Eliminar";
                break;
            }
            this.Boton.Size = base.Size;
        }
コード例 #2
0
        private void CambiarImagen(TipoBoton img)
        {
            switch (img)
            {
                case TipoBoton.Buscar:
                    this.Boton.Image = Properties.Resources.buscar;
                    this.Boton.ImageLocation = ImageLocation.MiddleCenter;
                    base.Size = new Size(0x23, 0x1b);
                    this.Boton.Text = string.Empty;
                    break;

                case TipoBoton.BuscarPrompt:
                    this.Boton.Image =Properties.Resources.prompt;
                    this.Boton.ImageLocation =ImageLocation.MiddleLeft;
                    base.Size = new Size(0x23, 0x1b);
                    this.Boton.Text = string.Empty;
                    break;

                case TipoBoton.Agregar:
                    this.Boton.Image =Properties.Resources.nuevo;
                    this.Boton.ImageLocation = ImageLocation.MiddleLeft;
                    base.Size = new Size(100, 0x18);
                    this.Boton.Text = "&Agregar";
                    break;

                case TipoBoton.Modificar:
                    this.Boton.Image =Properties.Resources.editar;
                    this.Boton.ImageLocation = ImageLocation.MiddleLeft;
                    base.Size = new Size(100, 0x18);
                    this.Boton.Text = "&Modificar";
                    break;

                case TipoBoton.Eliminar:
                    this.Boton.Image =Properties.Resources.eliminar;
                    this.Boton.ImageLocation = ImageLocation.MiddleLeft;
                    base.Size = new Size(100, 0x18);
                    this.Boton.Text = "&Eliminar";
                    break;
            }
            this.Boton.Size = base.Size;
        }