Ejemplo n.º 1
0
        private Bitmap GetBitmap(EModeBoutonDetaille mode)
        {
            switch (mode)
            {
            case EModeBoutonDetaille.UpSurvol:
                return(Properties.Resources.up_vert);

            case EModeBoutonDetaille.UpClic:
                return(Properties.Resources.up_red);

            case EModeBoutonDetaille.UpBase:
                return(Properties.Resources.up_blue);

            case EModeBoutonDetaille.DownSurvol:
                return(Properties.Resources.down_vert);

            case EModeBoutonDetaille.DownClic:
                return(Properties.Resources.down_red);

            case EModeBoutonDetaille.DownBase:
                return(Properties.Resources.down_blue);

            default:
                return(Properties.Resources.Supprimer);
            }
        }
Ejemplo n.º 2
0
        private void SetImage(Button btn, EModeBouton mode)
        {
            EModeBoutonDetaille modeDetaille = EModeBoutonDetaille.DownBase;

            if (btn == m_btnBas)
            {
                switch (mode)
                {
                case EModeBouton.Survol:
                    modeDetaille = EModeBoutonDetaille.DownSurvol;
                    break;

                case EModeBouton.Clic:
                    modeDetaille = EModeBoutonDetaille.DownClic;
                    break;

                case EModeBouton.Base:
                    modeDetaille = EModeBoutonDetaille.DownBase;
                    break;
                }
            }
            else
            {
                switch (mode)
                {
                case EModeBouton.Survol:
                    modeDetaille = EModeBoutonDetaille.UpSurvol;
                    break;

                case EModeBouton.Clic:
                    modeDetaille = EModeBoutonDetaille.UpClic;
                    break;

                case EModeBouton.Base:
                    modeDetaille = EModeBoutonDetaille.UpBase;
                    break;
                }
            }
            btn.BackgroundImage = GetBitmap(modeDetaille);
        }