Ejemplo n.º 1
0
 public Task Initialize(
     Dictionary<int, Grid> verses,
     ReadingColor color)
 {
     this.verses = verses;
     this.BackgroundColor = color.SecondBarColor;
     return Task.FromResult(true);
 }
Ejemplo n.º 2
0
        public async Task Initialize(
            ReadingInfo readingInfo, 
            int chaptersCount,
            ReadingColor color)
        {
            this.BackgroundColor = color.SecondBarColor;

            this.UpdateText(readingInfo);

            this.readingInfo = readingInfo;
            this.chaptersCount = chaptersCount;
        }
Ejemplo n.º 3
0
        public async Task Initialize(
            ReadingInfo readingInfo,
            BookInfo bookInfo,
            Dictionary<int, Grid> verses,
            ReadingColor color)
        {
            this.BackgroundColor = color.SecondBarColor;

            await this.chapterLabel.Initialize(
                readingInfo: readingInfo,
                chaptersCount: bookInfo.ChaptersCount,
                color: color);

            await this.bookLabel.Initialize(
                author: readingInfo.Author,
                isNT: readingInfo.IsNT,
                bookNumber: readingInfo.BookNumber, 
                bookName: bookInfo.Name,
                color: color);

            await this.verseLabel.Initialize(verses, color);

            this.settingsLabel.Initialize(color);
        }
Ejemplo n.º 4
0
        private async Task UpdateContent(bool isFirstTime, ReadingColor color)
        {
            // Update content
            string content = await FileHelper.GetFile(
                this.readingInfo.Author,
                this.readingInfo.IsNT,
                this.readingInfo.BookNumber,
                this.readingInfo.ChapterNumber);

            List<View> views = ContentFormatter.FormatContent(content, color, out this.verses);

            StackLayout chapterLayout = new StackLayout
            {
                Orientation = StackOrientation.Vertical,
                Padding = new Thickness(10),
                HorizontalOptions = LayoutOptions.End,
            };

            foreach (View view in views)
            {
                chapterLayout.Children.Add(view);
            }

            this.scrollView.BackgroundColor = color.BackgroundColor;
            this.scrollView.Content = chapterLayout;

            TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
            tapGestureRecognizer.Tapped += (s, e) =>
            {
                this.isFullScreen = !this.isFullScreen;
                this.AdjustFullScreen();
            };

            chapterLayout.GestureRecognizers.Add(tapGestureRecognizer);
        }
Ejemplo n.º 5
0
 public void Initialize(ReadingColor color)
 {
     this.BackgroundColor = color.SecondBarColor;
 }