private async Task LoadCurrent() { if (!IsLoading) { IsLoading = true; _tempIndexOfNumberChapterInPage = await _truyen.LoadChapterWithNoiDung(CurrentChapter.PageOfChapter, _tempIndexOfNumberChapterInPage); CacheNextChapter = _truyen.GetChapterByIndex(_tempIndexOfNumberChapterInPage); if (CacheNextChapter != null) { CurrentChapter = CacheNextChapter; if (TextScrollViewer != null) { TextScrollViewer.ChangeView(0, 0, null, true); } _tempIndexOfNumberChapterInPage = _currentIndexOfNumberChapter; } else { if (_truyen.Site != SiteTruyen.LuongSonBac) { if (_tempIndexOfNumberChapterInPage <= 0) { _tempIndexOfNumberChapterInPage = 1; } if (_tempIndexOfNumberChapterInPage > 0) { _tempIndexOfNumberChapterInPage -= 1; } } _dialogService.ShowS("K0 tìm thấy chương sau đó", "Lỗi"); } IsLoading = false; } }
public void ViewModel_SetScale(float scale) { TextScrollViewer.ChangeView(0.0, 0.0, ViewModel.ScaleValue); }