/// <summary>
        /// Load images from the ressources.
        /// </summary>
        private void LoadImages()
        {
            BitmapSource bmpSrc;
            MapCodeImg   mapCodeImg;

            bmpSrc     = BitmapToBitmapSource(Resources.Help_icon);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.DlgQuestion, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);

            // "warning-icon.png";
            bmpSrc     = BitmapToBitmapSource(Resources.warning_icon);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.DlgWarning, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);

            // "X-red-border-128.png";
            bmpSrc     = BitmapToBitmapSource(Resources.X_red_border_128);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.DlgError, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);

            // "Info-round-white-Blue-128.png";
            bmpSrc     = BitmapToBitmapSource(Resources.Info_round_white_Blue_128);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.DlgInformation, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);

            // "check-green-24.png";
            bmpSrc     = BitmapToBitmapSource(Resources.check_green_24);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.BtnOk, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);

            // "check-green-24.png";
            bmpSrc     = BitmapToBitmapSource(Resources.check_green_24);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.BtnYes, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);

            // "cancel-red-24.png";
            bmpSrc     = BitmapToBitmapSource(Resources.cancel_red_24);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.BtnNo, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);

            // "exit-arrow-door-24.png";
            bmpSrc     = BitmapToBitmapSource(Resources.exit_arrow_door_24);
            mapCodeImg = new MapCodeImg {
                ImageCode = ImageCode.BtnCancel, BitmapSource = bmpSrc
            };
            _listMapCodeImg.Add(mapCodeImg);
        }
        /// <summary>
        /// Get an image by the code.
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        //public BitmapImage GetImg(ImageCode code)
        //{
        //    MapCodeImg mapCodeImg= _listMapCodeImg.Find(m => m.ImageCode == code);
        //    if (mapCodeImg == null)
        //        return null;
        //    return mapCodeImg.BmpImage;
        //}

        /// <summary>
        /// Get an image by the code.
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public BitmapSource GetImg(ImageCode code)
        {
            MapCodeImg mapCodeImg = _listMapCodeImg.Find(m => m.ImageCode == code);

            if (mapCodeImg == null)
            {
                return(null);
            }
            return(mapCodeImg.BitmapSource);
        }