Пример #1
0
        public void FullReload()
        {
            // This is an HTML5 Canvas/JS spinner icon. It is awesome
            // and renders immediately, going away when the store loads.
            LoadString(AssemblyResource.GetFileContents("loading.html"),
                       "text/html", "UTF-8", null);

            // Here we download and save for later injection some JavaScript
            // to fix-up the Amazon pages. We don't store this locally since
            // it may need to be updated if Amazon's page structure changes.
            // We're mainly concerned about hiding the "You don't have Flash"
            // messages, since we do the streaming of previews natively.
            if (FixupJavascriptUrl != null && !fixup_javascript_fetched)
            {
                fixup_javascript_fetched = true;
                new HttpStringDownloader
                {
                    Uri      = new Uri(FixupJavascriptUrl),
                    Finished = d => {
                        if (d.State.Success)
                        {
                            fixup_javascript = d.Content;
                        }
                        LoadHome();
                    },
                    AcceptContentTypes = new [] { "text/javascript" }
                }.Start();
            }
            else
            {
                LoadHome();
            }
        }