private void LoadVerses()
        {
            this.versesDictionary = null;

            this.versesDictionary = Formatters.IsBiblesKey(this.selectedKey) ?
                                    BiblesData.Database.GetVerses(this.selectedKey)
                :
                                    BiblesData.Database.GetVerses($"{this.Bible.BibleId}||{this.selectedKey}");

            this.ResetversSetup();

            for (int verse = 1; verse <= this.versesDictionary.Count; ++verse)
            {
                BibleVerseModel item = this.versesDictionary[verse];

                StackPanel panel = BibleLoader.GetVerseNumberPanel(this.Bible.BibleId, item, 0);

                this.uxVerseGrid.Children.Add(panel);

                HighlightRitchTextBox textBox = BibleLoader.GetVerseAsTextBox(this.Bible.BibleId, item, 1);

                textBox.GotFocus += this.Verse_GotFocus;

                this.uxVerseGrid.Children.Add(textBox);

                this.loadedTextBoxDictionary.Add(verse, textBox);

                this.loadedVerseStackDictionary.Add(verse, panel);
            }
        }
Beispiel #2
0
        private void LoadVerses()
        {
            this.versesDictionaryLeft = null;

            this.versesDictionaryRight = null;

            string bibleKeyRemoved = Formatters.RemoveBibleId(this.selectedKey);

            this.versesDictionaryLeft = BiblesData.Database.GetVerses($"{this.BibleLeft.BibleId}||{bibleKeyRemoved}");

            this.versesDictionaryRight = BiblesData.Database.GetVerses($"{this.BibleRight.BibleId}||{bibleKeyRemoved}");

            this.ResetversSetup();

            #region LOAD LEFTSIDE

            for (int verse = 1; verse <= this.versesDictionaryLeft.Count; ++verse)
            {
                BibleVerseModel item = this.versesDictionaryLeft[verse];

                StackPanel panel = BibleLoader.GetVerseNumberPanel(this.BibleLeft.BibleId, item, 0);

                this.uxVerseGrid.Children.Add(panel);

                HighlightRitchTextBox textBox = BibleLoader.GetVerseAsTextBox(this.BibleLeft.BibleId, item, 1);

                textBox.GotFocus += this.VerseLeft_GotFocus;

                this.uxVerseGrid.Children.Add(textBox);

                this.loadedTextBoxDictionaryLeft.Add(verse, textBox);

                this.loadedVerseStackDictionaryLeft.Add(verse, panel);
            }

            #endregion

            #region LOAD RIGHT

            for (int verse = 1; verse <= this.versesDictionaryRight.Count; ++verse)
            {
                BibleVerseModel item = this.versesDictionaryRight[verse];

                StackPanel panel = BibleLoader.GetVerseNumberPanel(this.BibleRight.BibleId, item, 2);

                this.uxVerseGrid.Children.Add(panel);

                HighlightRitchTextBox textBox = BibleLoader.GetVerseAsTextBox(this.BibleLeft.BibleId, item, 3);

                textBox.GotFocus += this.VerseRight_GotFocus;

                this.uxVerseGrid.Children.Add(textBox);

                this.loadedTextBoxDictionaryRight.Add(verse, textBox);

                this.loadedVerseStackDictionaryRight.Add(verse, panel);
            }

            #endregion
        }