示例#1
0
        private void RefreshSize()
        {
            int Local_Multi = (int)System.Math.Ceiling((double)this.NumberChamp / (double)2);

            this.Width = 330 + (Local_Multi * 72) + 72;

            TacheFond.RealignerOnRefreshSize();
        }
        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);
            }
        }
        private void ResetPlacement(bool _ByUser)
        {
            foreach (SlotPlacement Slot in this.MySlotPlacement)
            {
                Slot.SetChampionOnPlacement(null, false);
            }

            if (_ByUser)
            {
                TacheFond.RefreshUserProfile();
            }
        }
        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"));
            }
        }
示例#5
0
        public void SetChampionOnPlacement(Champion _Champion, bool _ByUser)
        {
            if (_Champion != null)
            {
                this.ChampionOnSlot      = _Champion;
                this.ChampionIcon.Source = this.ChampionOnSlot.GetIcon;
                this.ToolTip             = this.ChampionOnSlot.GetName;
                ToolTipService.SetIsEnabled(this, true);
            }
            else
            {
                this.ChampionOnSlot      = null;
                this.ChampionIcon.Source = new BitmapImage(new Uri("/Antize TFT;component/Ressources/empty.png", UriKind.Relative));
                this.ToolTip             = "";
                ToolTipService.SetIsEnabled(this, false);
            }

            if (_ByUser)
            {
                TacheFond.RefreshUserProfile();
            }
        }
 private void Window_LocationChanged(object sender, EventArgs e)
 {
     TacheFond.RealignerFenetre(Enum_State.MovedFromGestionItem, false);
 }
示例#7
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"));
            }
        }
示例#8
0
        /*****************************/
        /*** Bouton ******************/
        /*****************************/
        private void Champion_MouseDown(object sender, MouseButtonEventArgs e)
        {
            bool Local_Refresh = false;

            if (this.ChampionOnSlot != null)
            {
                if (e.ChangedButton == MouseButton.Left)
                {
                    if (this.IsUserSlot)
                    {
                        if (TacheFond.GetMainRef.GetPlacementIsOpen)
                        {
                            TacheFond.GetMainRef.GetPlacementRef.SetAttente(this.ChampionOnSlot);

                            return;
                        }

                        this.AddOrRemoveChampion(null, true);

                        TacheFond.RefreshUserProfile();
                        Local_Refresh = true;

                        TacheFond.GetMainRef.GetDetailChampionRef.Hide();
                    }
                    else
                    {
                        if (this.SelfEnabled)
                        {
                            if (TacheFond.GetMainRef.AddChampionToSlot(this.ChampionOnSlot))
                            {
                                TacheFond.RefreshUserProfile();
                                Local_Refresh = true;
                            }
                        }
                    }

                    if (Local_Refresh)
                    {
                        TacheFond.GetMainRef.GetListOfChampionRef.RefreshList();
                    }
                }
                else if (e.ChangedButton == MouseButton.Right)
                {
                    if (TacheFond.GetMainRef.GetPlacementIsOpen)
                    {
                        TacheFond.GetMainRef.ShowHidePlacement(true);
                    }

                    if (this.ChampionOnSlot == TacheFond.GetMainRef.GetGestionItemRef.GetSelectedChampion)
                    {
                        if (TacheFond.GetMainRef.GetGestionItemIsOpen == true)
                        {
                            TacheFond.GetMainRef.ForceShowHideGestionItem(false);
                        }
                        else
                        {
                            TacheFond.GetMainRef.ForceShowHideGestionItem(true);
                        }
                    }
                    else
                    {
                        TacheFond.GetMainRef.GetGestionItemRef.RefreshChampion(this.ChampionOnSlot);

                        if (TacheFond.GetMainRef.GetGestionItemIsOpen == false)
                        {
                            TacheFond.GetMainRef.ForceShowHideGestionItem(true);
                        }
                        else if (TacheFond.GetMainRef.GetListOfChampionVisible == false)
                        {
                            TacheFond.GetMainRef.ShowHideListOfChampion(true, false);
                        }
                    }
                }
            }
        }
示例#9
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);
            }
        }
 private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     TacheFond.RealignerFenetre(Enum_State.SizedFromListChamp, false);
 }