Inheritance: Windows.UI.Xaml.Controls.Page
Example #1
0
        public void LoadUrl( LocalModeTxtList.DownloadBookContext Context )
        {
            RuntimeCache rCache = new RuntimeCache();
            Logger.Log( ID, Context.Id, LogType.DEBUG );
            Logger.Log( ID, Context.Title, LogType.DEBUG );

            Worker.UIInvoke( () =>
            {
                StringResources stx = new StringResources( "AdvDM" );
                Loading = stx.Text( "Active" );
            } );

            rCache.GET( Context.Url, ( e, url ) =>
            {
                Loading = null;
                SaveTemp( e, Context );
            }
            , ( id, url, ex ) =>
            {
                Logger.Log( ID, "Cannot download: " + id, LogType.WARNING );
                Logger.Log( ID, ex.Message, LogType.WARNING );

            }, false );
        }
Example #2
0
        private async void SaveTemp( DRequestCompletedEventArgs e, LocalModeTxtList.DownloadBookContext Context )
        {
            StorageFile ISF = await AppStorage.MkTemp(
                Context.Id
                + ". "
                + ( string.IsNullOrEmpty( Context.Title ) ? "{ Parse Needed }" : Context.Title )
                + ".txt"
            );

            await ISF.WriteBytes( e.ResponseBytes );

            SearchSet = new LocalBook[] { new LocalBook( ISF ) };
        }