public Masteries()
        {
            InitializeComponent();
            MasteryPageListView.Items.Clear();
            foreach (var MasteryPage in Client.LoginPacket.AllSummonerData.MasteryBook.BookPages)
            {
                if (MasteryPage.Current)
                    SelectedBook = MasteryPage;
            }

            if (SelectedBook == null)
            {
                SelectedBook = Client.LoginPacket.AllSummonerData.MasteryBook.BookPages[0];
            }
            ChangeBook();
            RenderMasteries();
        }
예제 #2
0
 private void MasteryPageListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     foreach (masteries mastery in Client.Masteries)
     {
         mastery.selectedRank = 0;
     }
     foreach (MasteryBookPageDTO MasteryPage in Client.LoginPacket.AllSummonerData.MasteryBook.BookPages)
     {
         if (MasteryPage.Current)
         {
             MasteryPage.Current = false;
         }
         if (MasteryPage.PageId == MasteryPageOrder[MasteryPageListView.SelectedIndex])
         {
             MasteryPage.Current = true;
             SelectedBook = MasteryPage;
         }
     }
     ChangeBook();
     RenderMasteries();
 }