Ejemplo n.º 1
0
        private async void RuneComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!QuickLoad) //Make loading quicker
                return;

            var selectedRunePage = new SpellBookPageDTO();
            int i = 0;
            bool hasChanged = false;
            foreach (SpellBookPageDTO runePage in MyRunes.BookPages)
            {
                string runePageName = runePage.Name;
                if (runePageName.StartsWith("@@"))
                    runePageName = "Rune Page " + ++i;

                runePage.Current = false;
                if (runePageName != (string)RuneComboBox.SelectedItem)
                    continue;

                runePage.Current = true;
                selectedRunePage = runePage;
                hasChanged = true;
                var tr = new TextRange(ChatText.Document.ContentEnd, ChatText.Document.ContentEnd)
                {
                    Text = "Selected " + runePageName + " as Rune Page" + Environment.NewLine
                };
                tr.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.White);
                ChatText.ScrollToEnd();
            }
            if (hasChanged)
                await RiotCalls.SelectDefaultSpellBookPage(selectedRunePage);
        }
Ejemplo n.º 2
0
        private void RunePageListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            foreach (
                var spellPage in
                    Client.LoginPacket.AllSummonerData.SpellBook.BookPages.Where(spellPage => spellPage.Current))
            {
                spellPage.Current = false;
            }

            Client.LoginPacket.AllSummonerData.SpellBook.BookPages[RunePageListBox.SelectedIndex].Current = true;
            selectedBook = Client.LoginPacket.AllSummonerData.SpellBook.BookPages[RunePageListBox.SelectedIndex];
            RuneTextBox.Text = selectedBook.Name;
            RefreshAvailableRunes();
            RenderRunes();
        }
Ejemplo n.º 3
0
        private async void RunePage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!QuickLoad) //Make loading quicker
                return;

            var SelectedRunePage = new SpellBookPageDTO();
            int i = 0;
            bool HasChanged = false;
            foreach (SpellBookPageDTO RunePage in MyRunes.BookPages)
            {
                string RunePageName = RunePage.Name;
                if (RunePageName.StartsWith("@@"))
                {
                    RunePageName = "Rune Page " + ++i;
                }
                RunePage.Current = false;
                if (RunePageName == (string)TeamPlayer.RunePage.SelectedItem)
                {
                    RunePage.Current = true;
                    SelectedRunePage = RunePage;
                    HasChanged = true;
                    var tr = new TextRange(ChatText.Document.ContentEnd, ChatText.Document.ContentEnd);
                    tr.Text = "Selected " + RunePageName + " as Rune Page" + Environment.NewLine;
                    tr.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.White);
                }
            }
            if (HasChanged)
            {
                await RiotCalls.SelectDefaultSpellBookPage(SelectedRunePage);
            }
        }
Ejemplo n.º 4
0
 private void RunePageListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     foreach (SpellBookPageDTO SpellPage in Client.LoginPacket.AllSummonerData.SpellBook.BookPages)
     {
         if (SpellPage.Current)
         {
             SpellPage.Current = false;
         }
     }
     Client.LoginPacket.AllSummonerData.SpellBook.BookPages[RunePageListView.SelectedIndex].Current = true;
     SelectedBook = Client.LoginPacket.AllSummonerData.SpellBook.BookPages[RunePageListView.SelectedIndex];
     RuneTextBox.Text = SelectedBook.Name;
     RefreshAvailableRunes();
     RenderRunes();
 }