Exemple #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));
            }
        }
Exemple #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;
        }
Exemple #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;
        }
Exemple #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 void tabEffectBitmapDraw()
        {
            AllSelData asd = new AllSelData();
            ImageFix   ifx = new ImageFix();

            if (tabEffectSel.SelectedIndex == 0 || tabEffectSel.SelectedIndex == 1)
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 0, 0, 0, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:saturation")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 35, 36, 248, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:wither")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 39, 42, 53, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:glowing")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 97, 160, 148, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:nausea")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 74, 29, 85, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:slowness")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 129, 108, 90, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:hunger")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 83, 118, 88, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:haste")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 67, 192, 217, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:fire_resistance")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 58, 154, 228, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:resistance")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 58, 69, 153, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:strength")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 35, 36, 147, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:unluck")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 77, 164, 192, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:levitation")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 255, 255, 206, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:absorption")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 58, 69, 153, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:regeneration")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 171, 92, 205, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:health_boost")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 35, 125, 248, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:blindness")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 35, 31, 31, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:water_breathing")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 153, 82, 46, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:instant_damage")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 9, 10, 67, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:instant_health")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 35, 36, 248, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:speed")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 198, 175, 124, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:jump_boost")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 151, 98, 120, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:mining_fatigue")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 23, 66, 74, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:luck")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 0, 153, 51, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:weakness")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 72, 77, 72, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:night_vision")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 161, 31, 31, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:invisibility")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 146, 131, 127, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
            else if (asd.getEffect(tabEffectSel.SelectedIndex, false) == "minecraft:poison")
            {
                BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 49, 147, 78, 255 });
                tempBitmap          = ifx.ChangeSize(tempBitmap, 8);
                tabEffectPic.Source = tempBitmap;
            }
        }
 private void tabEffectBitmapDraw()
 {
     ImageFix ifx = new ImageFix();
     if (tabEffectSel.SelectedIndex == 0 || tabEffectSel.SelectedIndex == 1)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 0, 0, 0, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 2)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 34, 35, 243, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 3)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 66, 189, 214, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 4)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 57, 152, 224, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 5)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 57, 68, 151, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 6)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 34, 35, 145, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 7)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 206, 103, 61, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 8)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 168, 91, 202, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 9)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 15, 117, 226, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 10)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 151, 81, 45, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 11)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 35, 36, 248, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 12)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 195, 172, 122, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 13)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 75, 250, 33, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 14)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 158, 31, 31, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 15)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 144, 129, 125, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 16)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 39, 42, 53, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 17)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 84, 29, 73, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 18)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 127, 106, 89, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 19)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 82, 116, 87, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 20)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 34, 31, 31, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 21)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 9, 10, 67, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 22)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 23, 65, 73, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 23)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 71, 76, 71, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 24)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 48, 145, 77, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 25)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 97, 160, 148, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.Source = tempBitmap;
     }
     else if (tabEffectSel.SelectedIndex == 26)
     {
         BitmapSource tempBitmap = ifx.ChangeColor(tabEffectRandomBitmap(), new byte[] { 27, 27, 27, 255 }, new byte[] { 255, 255, 206, 255 });
         tempBitmap = ifx.ChangeSize(tempBitmap, 8);
         tabEffectPic.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);
 }
 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;
 }