Пример #1
0
        private void flushImagebox()
        {
            ImageFix     ifx        = new ImageFix();
            BitmapSource tempBitmap = ifx.ChangeColor(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/ColorSelIMG.png")), darkTheme), new byte[] { 0, 0, 0, 255 }, new byte[] { _B, _G, _R, 255 });

            tempBitmap = ifx.ChangeSize(tempBitmap, 8);
            ColorSelImageBox.Source = tempBitmap;
        }
        private BitmapSource tabEffectRandomBitmap()
        {
            if (playEffect < 7)
            {
                playEffect++;
            }
            else
            {
                playEffect = 0;
            }
            ImageFix ifx = new ImageFix();

            if (playEffect == 0)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect1.png")), darkTheme));
            }
            else if (playEffect == 1)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect2.png")), darkTheme));
            }
            else if (playEffect == 2)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect3.png")), darkTheme));
            }
            else if (playEffect == 3)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect4.png")), darkTheme));
            }
            else if (playEffect == 4)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect5.png")), darkTheme));
            }
            else if (playEffect == 5)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect6.png")), darkTheme));
            }
            else if (playEffect == 6)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect7.png")), darkTheme));
            }
            else if (playEffect == 7)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect8.png")), darkTheme));
            }
            else
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect6.png")), darkTheme));
            }
        }
Пример #3
0
        private BitmapSource HeadBackImg(string PlayerName)
        {
            string ValueURL = "";

            System.Net.HttpWebRequest ValueURLRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://skins.minecraft.net/MinecraftSkins/" + PlayerName + ".png");
            // http://skins.minecraft.net/MinecraftSkins/Notch.png Skin, just jump
            // http://skins.minecraft.net/MinecraftCloaks/Notch.png Cloak, jump and download
            ValueURLRequest.Method = "GET";
            try { ValueURL = ValueURLRequest.GetResponse().ResponseUri.ToString(); } catch (Exception) { }
            //http://textures.minecraft.net/texture/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            string aa = "true", headOnly = "true";

            if (!tabOther1GetHeadAA.IsChecked.Value)
            {
                aa = "false";
            }
            else
            {
                aa = "true";
            }
            if (tabOther1GetHeadFullBody.IsChecked.Value)
            {
                headOnly = "false";
            }
            else
            {
                headOnly = "true";
            }
            string       head3dURL = @"http://heads.freshcoal.com/3d/3d.php?user="******"&hrh=" + tabOther1GetHeadHrh.Value.Value + "&aa=" + aa + "&headOnly=" + headOnly + "&";
            ImageFix     ifx       = new ImageFix();
            BitmapSource img       = ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Head/steve.png")), darkTheme);

            System.Net.WebClient dc = new System.Net.WebClient();
            dc.DownloadFile(head3dURL, System.AppDomain.CurrentDomain.BaseDirectory + "player.png");

            System.Drawing.Bitmap m_Bitmap = new System.Drawing.Bitmap(System.AppDomain.CurrentDomain.BaseDirectory + "player.png", false);
            IntPtr       ip           = m_Bitmap.GetHbitmap();
            BitmapSource bitmapSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(ip, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());

            DeleteObject(ip);

            return(bitmapSource);
        }
        private BitmapSource HeadBackImg(string PlayerName)
        {
            string ValueURL = "";
            System.Net.HttpWebRequest ValueURLRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://skins.minecraft.net/MinecraftSkins/" + PlayerName + ".png");
            // http://skins.minecraft.net/MinecraftSkins/Notch.png Skin, just jump
            // http://skins.minecraft.net/MinecraftCloaks/Notch.png Cloak, jump and download
            ValueURLRequest.Method = "GET";
            try { ValueURL = ValueURLRequest.GetResponse().ResponseUri.ToString(); } catch (Exception) { }
            //http://textures.minecraft.net/texture/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            string aa = "true", headOnly = "true";
            if (!tabOther1GetHeadAA.IsChecked.Value) aa = "false"; else aa = "true";
            if (tabOther1GetHeadFullBody.IsChecked.Value) headOnly = "false"; else headOnly = "true";
            string head3dURL = @"http://heads.freshcoal.com/3d/3d.php?user="******"&hrh=" + tabOther1GetHeadHrh.Value.Value + "&aa=" + aa + "&headOnly=" + headOnly + "&";
            ImageFix ifx = new ImageFix();
            BitmapSource img = ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Head/steve.png")), darkTheme);

            System.Net.WebClient dc = new System.Net.WebClient();
            dc.DownloadFile(head3dURL, System.AppDomain.CurrentDomain.BaseDirectory + "player.png");

            System.Drawing.Bitmap m_Bitmap = new System.Drawing.Bitmap(System.AppDomain.CurrentDomain.BaseDirectory + "player.png", false);
            IntPtr ip = m_Bitmap.GetHbitmap();
            BitmapSource bitmapSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(ip, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
            DeleteObject(ip);

            return bitmapSource;
        }
Пример #5
0
        private void tabBannerPicCreater()
        {
            //show Bitmap
            ImageFix     ifix        = new ImageFix();
            AllSelData   asd         = new AllSelData();
            byte         r           = asd.getBannerColorArray(tabBannerBaseColor.SelectedIndex)[0];
            byte         g           = asd.getBannerColorArray(tabBannerBaseColor.SelectedIndex)[1];
            byte         b           = asd.getBannerColorArray(tabBannerBaseColor.SelectedIndex)[2];
            BitmapSource finalBitmap = ifix.ChangeColor(ifix.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/background.png")), false), new byte[] { 255, 255, 255, 255 }, new byte[] { b, g, r, 255 });
            int          showIndex   = 0;

            if (tabBannerMaxIndex <= 0 && tabBannerEditIndex == 0)
            {
                showIndex = tabBannerMaxIndex;
            }
            else if (tabBannerMaxIndex >= 0 && tabBannerEditIndex != 0 && tabBannerMaxIndex < globalBannerMaxIndex - 2)
            {
                showIndex = tabBannerMaxIndex + 1;
            }
            else
            {
                showIndex = tabBannerMaxIndex;
            }
            for (int i = 0; i <= showIndex; i++)
            {
                byte r1 = asd.getBannerColorArray(globalBannerColor[i])[0];
                byte g1 = asd.getBannerColorArray(globalBannerColor[i])[1];
                byte b1 = asd.getBannerColorArray(globalBannerColor[i])[2];
                //BitmapSource K1Bitmap;
                //if (globalBannerType[i] == 3 || globalBannerType[i] == 4)
                //{
                //    //K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 }, true);
                //    K1Bitmap =
                //    ifix.ChangeColor(
                //        ifix.ChangeColor(
                //            ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 }, true)
                //        , new byte[] { 2, 3, 6, 255 }, new byte[] { (byte)(b1 + 2), (byte)(g1 + 3), (byte)(r1 + 6), 255 }, true)
                //    , new byte[] { 6, 5, 8, 255 }, new byte[] { (byte)(b1 + 6), (byte)(g1 + 5), (byte)(r1 + 8), 255 }, true);
                //}
                //else
                //{
                //    K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 });
                //}
                BitmapSource K1Bitmap;
                if (globalBannerType[i] == 3)
                {
                    K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { b1, g1, r1, 255 }, true);
                }
                else if (globalBannerType[i] == 4)
                {
                    K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { b1, g1, r1, 255 }, false);
                }
                else
                {
                    K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 });
                }
                finalBitmap = ifix.Merger(finalBitmap, K1Bitmap);
            }
            finalBitmap         = ifix.ChangeSize(finalBitmap, 13);
            tabBannerPic.Source = finalBitmap;
        }
Пример #6
0
        private BitmapSource tabBannerTypeSel(int selected)
        {
            ImageFix ifx = new ImageFix();

            if (selected == 0)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_mc.png")), false));
            }
            else if (selected == 1)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_mr.png")), false));
            }
            else if (selected == 2)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ss.png")), false));
            }
            else if (selected == 3)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_gra.png")), false));
            }
            else if (selected == 4)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_gru.png")), false));
            }
            else if (selected == 5)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tl.png")), false));
            }
            else if (selected == 6)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tr.png")), false));
            }
            else if (selected == 7)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bl.png")), false));
            }
            else if (selected == 8)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_br.png")), false));
            }
            else if (selected == 9)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ls.png")), false));
            }
            else if (selected == 10)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_rs.png")), false));
            }
            else if (selected == 11)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ts.png")), false));
            }
            else if (selected == 12)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bs.png")), false));
            }
            else if (selected == 13)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_hh.png")), false));
            }
            else if (selected == 14)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_hhb.png")), false));
            }
            else if (selected == 15)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_vh.png")), false));
            }
            else if (selected == 16)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_vhr.png")), false));
            }
            else if (selected == 17)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_dls.png")), false));
            }
            else if (selected == 18)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_drs.png")), false));
            }
            else if (selected == 19)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cr.png")), false));
            }
            else if (selected == 20)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ms.png")), false));
            }
            else if (selected == 21)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cs.png")), false));
            }
            else if (selected == 22)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tt.png")), false));
            }
            else if (selected == 23)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bt.png")), false));
            }
            else if (selected == 24)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ld.png")), false));
            }
            else if (selected == 25)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_rd.png")), false));
            }
            else if (selected == 26)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_lud.png")), false));
            }
            else if (selected == 27)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_rud.png")), false));
            }
            else if (selected == 28)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tts.png")), false));
            }
            else if (selected == 29)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bts.png")), false));
            }
            else if (selected == 30)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_flo.png")), false));
            }
            else if (selected == 31)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bri.png")), false));
            }
            else if (selected == 32)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_sku.png")), false));
            }
            else if (selected == 33)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cre.png")), false));
            }
            else if (selected == 34)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bo.png")), false));
            }
            else if (selected == 35)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cbo.png")), false));
            }
            else if (selected == 36)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_sc.png")), false));
            }
            else if (selected == 37)
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_moj.png")), false));
            }
            else
            {
                return(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/background.png")), false));
            }
        }
 private BitmapSource tabEffectRandomBitmap()
 {
     if (playEffect < 7)
     {
         playEffect++;
     }
     else
     {
         playEffect = 0;
     }
     ImageFix ifx = new ImageFix();
     if (playEffect == 0) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect1.png")), darkTheme);
     else if (playEffect == 1) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect2.png")), darkTheme);
     else if (playEffect == 2) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect3.png")), darkTheme);
     else if (playEffect == 3) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect4.png")), darkTheme);
     else if (playEffect == 4) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect5.png")), darkTheme);
     else if (playEffect == 5) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect6.png")), darkTheme);
     else if (playEffect == 6) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect7.png")), darkTheme);
     else if (playEffect == 7) return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect8.png")), darkTheme);
     else return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Effect/Effect6.png")), darkTheme);
 }
 private void tabBannerPicCreater()
 {
     //show Bitmap
     ImageFix ifix = new ImageFix();
     AllSelData asd = new AllSelData();
     byte r = asd.getBannerColorArray(tabBannerBaseColor.SelectedIndex)[0];
     byte g = asd.getBannerColorArray(tabBannerBaseColor.SelectedIndex)[1];
     byte b = asd.getBannerColorArray(tabBannerBaseColor.SelectedIndex)[2];
     BitmapSource finalBitmap = ifix.ChangeColor(ifix.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/background.png")), false), new byte[] { 255, 255, 255, 255 }, new byte[] { b, g, r, 255 });
     int showIndex = 0;
     if (tabBannerMaxIndex <= 0 && tabBannerEditIndex == 0)
     {
         showIndex = tabBannerMaxIndex;
     }
     else if (tabBannerMaxIndex >= 0 && tabBannerEditIndex != 0 && tabBannerMaxIndex < globalBannerMaxIndex - 2)
     {
         showIndex = tabBannerMaxIndex + 1;
     }
     else
     {
         showIndex = tabBannerMaxIndex;
     }
     for (int i = 0; i <= showIndex; i++)
     {
         byte r1 = asd.getBannerColorArray(globalBannerColor[i])[0];
         byte g1 = asd.getBannerColorArray(globalBannerColor[i])[1];
         byte b1 = asd.getBannerColorArray(globalBannerColor[i])[2];
         //BitmapSource K1Bitmap;
         //if (globalBannerType[i] == 3 || globalBannerType[i] == 4)
         //{
         //    //K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 }, true);
         //    K1Bitmap =
         //    ifix.ChangeColor(
         //        ifix.ChangeColor(
         //            ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 }, true)
         //        , new byte[] { 2, 3, 6, 255 }, new byte[] { (byte)(b1 + 2), (byte)(g1 + 3), (byte)(r1 + 6), 255 }, true)
         //    , new byte[] { 6, 5, 8, 255 }, new byte[] { (byte)(b1 + 6), (byte)(g1 + 5), (byte)(r1 + 8), 255 }, true);
         //}
         //else
         //{
         //    K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 });
         //}
         BitmapSource K1Bitmap;
         if (globalBannerType[i] == 3)
         {
             K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { b1, g1, r1, 255 }, true);
         }
         else if (globalBannerType[i] == 4)
         {
             K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { b1, g1, r1, 255 }, false);
         }
         else
         {
             K1Bitmap = ifix.ChangeColor(tabBannerTypeSel(globalBannerType[i]), new byte[] { 0, 0, 0, 255 }, new byte[] { b1, g1, r1, 255 });
         }
         finalBitmap = ifix.Merger(finalBitmap, K1Bitmap);
     }
     finalBitmap = ifix.ChangeSize(finalBitmap, 13);
     tabBannerPic.Source = finalBitmap;
 }
 private BitmapSource tabBannerTypeSel(int selected)
 {
     ImageFix ifx = new ImageFix();
     if (selected == 0) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_mc.png")), false); }
     else if (selected == 1) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_mr.png")), false); }
     else if (selected == 2) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ss.png")), false); }
     else if (selected == 3) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_gra.png")), false); }
     else if (selected == 4) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_gru.png")), false); }
     else if (selected == 5) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tl.png")), false); }
     else if (selected == 6) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tr.png")), false); }
     else if (selected == 7) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bl.png")), false); }
     else if (selected == 8) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_br.png")), false); }
     else if (selected == 9) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ls.png")), false); }
     else if (selected == 10) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_rs.png")), false); }
     else if (selected == 11) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ts.png")), false); }
     else if (selected == 12) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bs.png")), false); }
     else if (selected == 13) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_hh.png")), false); }
     else if (selected == 14) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_hhb.png")), false); }
     else if (selected == 15) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_vh.png")), false); }
     else if (selected == 16) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_vhr.png")), false); }
     else if (selected == 17) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_dls.png")), false); }
     else if (selected == 18) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_drs.png")), false); }
     else if (selected == 19) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cr.png")), false); }
     else if (selected == 20) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ms.png")), false); }
     else if (selected == 21) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cs.png")), false); }
     else if (selected == 22) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tt.png")), false); }
     else if (selected == 23) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bt.png")), false); }
     else if (selected == 24) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_ld.png")), false); }
     else if (selected == 25) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_rd.png")), false); }
     else if (selected == 26) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_lud.png")), false); }
     else if (selected == 27) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_rud.png")), false); }
     else if (selected == 28) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_tts.png")), false); }
     else if (selected == 29) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bts.png")), false); }
     else if (selected == 30) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_flo.png")), false); }
     else if (selected == 31) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bri.png")), false); }
     else if (selected == 32) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_sku.png")), false); }
     else if (selected == 33) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cre.png")), false); }
     else if (selected == 34) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_bo.png")), false); }
     else if (selected == 35) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_cbo.png")), false); }
     else if (selected == 36) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_sc.png")), false); }
     else if (selected == 37) { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/t_moj.png")), false); }
     else { return ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/Banner/background.png")), false); }
 }
 private void flushImagebox()
 {
     ImageFix ifx = new ImageFix();
     BitmapSource tempBitmap = ifx.ChangeColor(ifx.BitmapImage2BitmapSource(new BitmapImage(new Uri("pack://application:,,,/Images/ColorSelIMG.png")), darkTheme), new byte[] { 0, 0, 0, 255 }, new byte[] { _B, _G, _R, 255 });
     tempBitmap = ifx.ChangeSize(tempBitmap, 8);
     ColorSelImageBox.Source = tempBitmap;
 }