Example #1
0
 private async Task Open(ComicFileVM item)
 {
     try
     {
         var vm   = new Splash.SplashVM(item);
         var page = new Splash.SplashPage {
             BindingContext = vm
         };
         await App.Navigation().PushAsync(page);
     }
     catch (Exception ex) { await App.ShowMessage(ex); }
 }
Example #2
0
        public void OnRefreshingItem(ComicFileVM comicFile)
        {
            var comicFolder = this.ComicFolders
                              .Where(x => x.FolderPath == comicFile.ComicFile.FolderPath)
                              .FirstOrDefault();

            if (comicFolder == null)
            {
                return;
            }
            comicFolder.ComicFiles.Replace(comicFile);
        }
 private async void OnComicFileOpened(ComicFileVM value)
 {
     try
     {
         ViewExtensions.CancelAnimations(this.backgroundImage);
         await Task.Run(async() =>
         {
             await Task.WhenAll(
                 this.backgroundImage.FadeTo(0.2, 250, Easing.SinIn),
                 this.backgroundImage.RelScaleTo(1, 250, Easing.SinIn)
                 );
         });
     }
     catch (Exception ex) { Helpers.AppCenter.TrackEvent(ex); }
 }
 private async void OnComicFileOpening(ComicFileVM value)
 {
     try
     {
         NavigationPage.SetHasNavigationBar(this, false);
         await Task.Run(async() =>
         {
             await this.backgroundImage.FadeTo(0.8, 250, Easing.SinOut);
             await Task.WhenAll(
                 this.backgroundImage.FadeTo(0.05, 50000, Easing.SinInOut),
                 this.backgroundImage.RelScaleTo(20, 50000, Easing.SinInOut)
                 );
         });
     }
     catch (Exception ex) { Helpers.AppCenter.TrackEvent(ex); }
 }
Example #5
0
        public SplashVM(ComicFileVM file)
        {
            this.CurrentFile = file;
            this.Store       = DependencyService.Get <ComicsShelf.Store.ILibraryStore>();
            this.Library     = this.Store.GetLibrary(file.ComicFile.LibraryKey);

            this.FolderFiles = this.Store.LibraryFiles[ComicsShelf.Store.enLibraryFilesGroup.Libraries]
                               .Where(x =>
                                      x.ComicFile.LibraryKey == file.ComicFile.LibraryKey &&
                                      x.ComicFile.FolderPath == file.ComicFile.FolderPath &&
                                      x.ComicFile.Available == true)
                               .OrderByDescending(x => x.ComicFile.FilePath)
                               .ToList();

            this.ItemSelectedCommand = new Command(async(item) => await this.ItemSelected(item));
            this.ItemOpenCommand     = new Command(async() => await this.ItemOpen());
            this.ClearCacheCommand   = new Command(async() => await this.ClearCache());
        }
Example #6
0
 public ReadingVM(ComicFileVM comicFile)
 {
     this.ComicFile    = comicFile;
     this._ReadingPage = this.ComicFile.ReadingPage;
 }