Exemple #1
0
        private async void MessageBus_OnDelivery(Message Mesg)
        {
            // Handles secondary tile launch on App opened
            switch (Mesg.Content)
            {
            case AppKeys.SYS_2ND_TILE_LAUNCH:
            case AppKeys.SYS_FILE_LAUNCH:
                if (Navigating)
                {
                    ActionBlocked();
                    return;
                }

                BookItem Book = null;

                if (Mesg.Payload is string)
                {
                    Book = await ItemProcessor.GetBookFromTileCmd(( string )Mesg.Payload);
                }
                else if (ItemProcessor.RequestOpenXRBK(Mesg.Payload, out var ISF))
                {
                    Book = await _BgTaskContext.RunAsync(ItemProcessor.OpenXRBK, ISF);
                }

                if (Book != null)
                {
                    NavigateTo(PageId.MONO_REDIRECTOR, () => new MonoRedirector(), P => (( MonoRedirector )P).InfoView(Book));
                }
                break;
            }
        }
Exemple #2
0
        public async void SetHomePage(string Id, Func <Page> FPage, Action <Page> PageAct = null)
        {
            // Handles secondary tile launch when App closed
            if (LaunchArgs is string TileQStr && !string.IsNullOrEmpty(TileQStr))
            {
                Id = PageId.BOOK_INFO_VIEW;
                BookItem Book = await ItemProcessor.GetBookFromTileCmd(TileQStr);

                if (Book != null)
                {
                    FPage = () => new BookInfoView(Book);
                }

                LaunchArgs = null;
            }