public void RefreshChampion(Champion _Champion)
        {
            this.SelectedChampion = _Champion;

            if (this.SelectedChampion != null)
            {
                this.Champion_Icon.Source = this.SelectedChampion.GetIcon;
                this.Champion_Name.Text   = this.SelectedChampion.GetName;

                //Rafraichi les items
                int Local_index = 1;

                foreach (Items Item in this.SelectedChampion.MyItem)
                {
                    BitmapImage Local_Icon = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));

                    if (Item != null)
                    {
                        Local_Icon = Item.GetIcon;
                    }

                    switch (Local_index)
                    {
                    case 1:
                        this.Stuff1.Source = Local_Icon;
                        break;

                    case 2:
                        this.Stuff2.Source = Local_Icon;
                        break;

                    case 3:
                        this.Stuff3.Source = Local_Icon;
                        break;

                    default:
                        break;
                    }

                    Local_index++;
                }

                //Met la couleur par le tier
                this.Champion_Name.Foreground = TacheFond.GetColorTier(this.SelectedChampion.GetTier);
            }
            else
            {
                this.Champion_Icon.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));
                this.Champion_Name.Text   = "";

                this.Stuff1.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));
                this.Stuff2.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));
                this.Stuff3.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));

                this.Champion_Name.Foreground = TacheFond.GetColorTier(0);
            }
        }
        public ChampionOnClasseOrigine(Champion _Champ, bool _AlreadyTake)
        {
            this.InitializeComponent();

            if (_Champ != null)
            {
                if (TacheFond.GetUserSettingsRef.OnlyOneType)
                {
                    if (_AlreadyTake)
                    {
                        this.Disabler.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        this.Disabler.Visibility = Visibility.Hidden;
                    }
                }
                else
                {
                    this.Disabler.Visibility = Visibility.Hidden;
                }

                this.Champion_Icon.Source = _Champ.GetIcon;
                this.Name_Champion.Text   = _Champ.GetName;

                this.Classe_1.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champ.GetClasse_One}.png", UriKind.Relative));
                this.Classe_2.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champ.GetClasse_Two}.png", UriKind.Relative));
                this.Classe_3.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champ.GetClasse_Three}.png", UriKind.Relative));

                //Met la couleur par le tier
                this.Name_Champion.Foreground = TacheFond.GetColorTier(_Champ.GetTier);
            }
            else
            {
                this.Champion_Icon.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));
                this.Name_Champion.Text   = "";

                this.Classe_1.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Classes/Invisible.png", UriKind.Relative));
                this.Classe_2.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Classes/Invisible.png", UriKind.Relative));
                this.Classe_3.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Classes/Invisible.png", UriKind.Relative));

                this.Name_Champion.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#8C9095"));
            }
        }
示例#3
0
        /*****************************/
        /*** Fonctions ***************/
        /*****************************/
        public void AddOrRemoveChampion(Champion _Champion, bool _ByUser)
        {
            this.ChampionOnSlot = _Champion;

            this.OrigineClasseOne   = null;
            this.OrigineClasseTwo   = null;
            this.OrigineClasseThree = null;

            int Local_Number = int.Parse(TacheFond.GetMainRef.GetSetActualNumber);

            if (_Champion != null)
            {
                if (_ByUser)
                {
                    Local_Number++;
                    TacheFond.GetMainRef.GetSetActualNumber = Local_Number.ToString();
                }

                this.Champion_Icon.Source = _Champion.GetIcon;
                this.Name_Champion.Text   = _Champion.GetName;

                this.Classe_1.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champion.GetClasse_One}.png", UriKind.Relative));
                this.Classe_2.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champion.GetClasse_Two}.png", UriKind.Relative));
                this.Classe_3.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champion.GetClasse_Three}.png", UriKind.Relative));

                //Recupere les Origines et Classes
                bool Local_MakeOne   = true;
                bool Local_MakeTwo   = true;
                bool Local_MakeThree = true;

                if (_Champion.GetClasse_One == Enums.Enum_Classe.None)
                {
                    Local_MakeOne = false;
                }

                if (_Champion.GetClasse_Two == Enums.Enum_Classe.None)
                {
                    Local_MakeTwo = false;
                }

                if (_Champion.GetClasse_Three == Enums.Enum_Classe.None)
                {
                    Local_MakeThree = false;
                }

                if (Local_MakeOne == true || Local_MakeTwo == true || Local_MakeThree == true)
                {
                    foreach (OrigineClasse item in TacheFond.ListOrigineClasse)
                    {
                        if (Local_MakeOne == true && _Champion.GetClasse_One == item.GetClasseType)
                        {
                            this.OrigineClasseOne = item;
                            Local_MakeOne         = false;
                        }
                        else if (Local_MakeTwo == true && _Champion.GetClasse_Two == item.GetClasseType)
                        {
                            this.OrigineClasseTwo = item;
                            Local_MakeTwo         = false;
                        }
                        else if (Local_MakeThree == true && _Champion.GetClasse_Three == item.GetClasseType)
                        {
                            this.OrigineClasseThree = item;
                            Local_MakeThree         = false;
                        }
                    }
                }

                //Met la couleur par le tier
                this.Name_Champion.Foreground = TacheFond.GetColorTier(_Champion.GetTier);
            }
            else
            {
                if (_ByUser)
                {
                    Local_Number--;
                    TacheFond.GetMainRef.GetSetActualNumber = Local_Number.ToString();
                }

                this.Champion_Icon.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));
                this.Name_Champion.Text   = "";

                this.Classe_1.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Classes/Invisible.png", UriKind.Relative));
                this.Classe_2.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Classes/Invisible.png", UriKind.Relative));
                this.Classe_3.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Classes/Invisible.png", UriKind.Relative));

                this.Name_Champion.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#8C9095"));
            }
        }
示例#4
0
        public void UpdateDetailChampion(Champion _Champion)
        {
            if (_Champion != null)
            {
                //Attribue les informations
                this.Champion_Icon.Source = _Champion.GetIcon;
                this.Champion_Name.Text   = _Champion.GetName;
                this.ChampionHealth.Text  = _Champion.GetHealth;
                this.ChampionDamage.Text  = _Champion.GetDamage;

                this.Tier.Text = _Champion.GetTier.ToString();

                this.Classe_One.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champion.GetClasse_One}.png", UriKind.Relative));
                this.Classe_Two.Source = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champion.GetClasse_Two}.png", UriKind.Relative));

                this.Classe_One_Name.Text = _Champion.GetClasse_One.ToString();
                this.Classe_Two_Name.Text = _Champion.GetClasse_Two.ToString();


                if (_Champion.GetClasse_Three.ToString().Contains("None"))
                {
                    this.Classe_Three.Source    = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Classes/Inivisible.png", UriKind.Relative));
                    this.Classe_Three_Name.Text = "";
                }
                else
                {
                    this.Classe_Three.Source    = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Classes/{_Champion.GetClasse_Three}.png", UriKind.Relative));
                    this.Classe_Three_Name.Text = _Champion.GetClasse_Three.ToString();
                }

                //Rafraichi les items
                int Local_index = 1;

                foreach (Items Item in _Champion.MyItem)
                {
                    BitmapImage Local_Icon_Stuff      = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));
                    BitmapImage Local_Icon_StuffNeed1 = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));
                    BitmapImage Local_Icon_StuffNeed2 = new BitmapImage(new Uri("/Antize TFT;component/Ressources/Empty.png", UriKind.Relative));

                    if (Item != null)
                    {
                        Local_Icon_Stuff = Item.GetIcon;

                        if (Item.GetNeeded_Type1 != Enums.Enum_Item.None)
                        {
                            Local_Icon_StuffNeed1 = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Items/{Item.GetNeeded_Type1}.png", UriKind.Relative));
                            Local_Icon_StuffNeed2 = new BitmapImage(new Uri($"/Antize TFT;component/Ressources/Items/{Item.GetNeeded_Type2}.png", UriKind.Relative));
                        }
                    }

                    switch (Local_index)
                    {
                    case 1:
                        this.Stuff1.Source       = Local_Icon_Stuff;
                        this.Stuff1_Need1.Source = Local_Icon_StuffNeed1;
                        this.Stuff1_Need2.Source = Local_Icon_StuffNeed2;
                        break;

                    case 2:
                        this.Stuff2.Source       = Local_Icon_Stuff;
                        this.Stuff2_Need1.Source = Local_Icon_StuffNeed1;
                        this.Stuff2_Need2.Source = Local_Icon_StuffNeed2;
                        break;

                    case 3:
                        this.Stuff3.Source       = Local_Icon_Stuff;
                        this.Stuff3_Need1.Source = Local_Icon_StuffNeed1;
                        this.Stuff3_Need2.Source = Local_Icon_StuffNeed2;
                        break;

                    default:
                        break;
                    }

                    Local_index++;
                }

                //Met la couleur par le tier
                this.Champion_Name.Foreground = TacheFond.GetColorTier(_Champion.GetTier);
                this.Tier.Foreground          = TacheFond.GetColorTier(_Champion.GetTier);
            }
        }