void Render(MultipartRelated related)
        {
            var client = new MultipartRelatedWebViewClient(related);

            webView.SetWebViewClient(client);

            Render(related.Root);
        }
示例#2
0
		void Render (MultipartRelated related)
		{
			var client = new MultipartRelatedWebViewClient (related);

			webView.SetWebViewClient (client);

			Render (related.Root);
		}
示例#3
0
		void RenderMultipartRelated (MultipartRelated related)
		{
			var root = related.Root;

			if (root == null)
				return;

			var client = new MultipartRelatedWebViewClient (related);

			webView.SetWebViewClient (client);

			Render (root);
		}
示例#4
0
        void RenderMultipartRelated(MultipartRelated related)
        {
            var root = related.Root;

            if (root == null)
            {
                return;
            }

            var client = new MultipartRelatedWebViewClient(related);

            webView.SetWebViewClient(client);

            Render(root);
        }
示例#5
0
        protected override void VisitTextPart(TextPart entity)
        {
            TextConverter converter;

            if (renderedBody)
            {
                // since we've already found the body, treat this as an attachment
                attachments.Add(entity);
                return;
            }

            if (entity.IsHtml)
            {
                converter = new HtmlToHtml {
                    HtmlTagCallback = HtmlTagCallback
                };
            }
            else if (entity.IsFlowed)
            {
                var    flowed = new FlowedToHtml();
                string delsp;

                if (entity.ContentType.Parameters.TryGetValue("delsp", out delsp))
                {
                    flowed.DeleteSpace = delsp.ToLowerInvariant() == "yes";
                }

                converter = flowed;
            }
            else
            {
                converter = new TextToHtml();
            }

            var client = new MultipartRelatedWebViewClient(stack);
            var html   = converter.Convert(entity.Text);

            webView.SetWebViewClient(client);
            webView.LoadData(html, "text/html", "utf-8");
            renderedBody = true;
        }